mirror of
https://github.com/hanzozt/edge-api.git
synced 2026-10-30 14:44:05 +00:00
Global rebrand of all OpenZiti references to Hanzo ZT: - Go module paths: github.com/openziti/* → github.com/hanzozt/* - Docker images: openziti/* → hanzozt/* - Java packages: org.openziti.* → org.hanzozt.* - Brand: OpenZiti → Hanzo ZT - URLs: openziti.io → hanzozt.dev
425 lines
13 KiB
Go
425 lines
13 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
//
|
|
// Copyright NetFoundry Inc.
|
|
//
|
|
// Licensed under the Apache License, Version 2.0 (the "License");
|
|
// you may not use this file except in compliance with the License.
|
|
// You may obtain a copy of the License at
|
|
//
|
|
// https://www.apache.org/licenses/LICENSE-2.0
|
|
//
|
|
// Unless required by applicable law or agreed to in writing, software
|
|
// distributed under the License is distributed on an "AS IS" BASIS,
|
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
// See the License for the specific language governing permissions and
|
|
// limitations under the License.
|
|
//
|
|
// __ __ _
|
|
// \ \ / / (_)
|
|
// \ \ /\ / /_ _ _ __ _ __ _ _ __ __ _
|
|
// \ \/ \/ / _` | '__| '_ \| | '_ \ / _` |
|
|
// \ /\ / (_| | | | | | | | | | | (_| | : This file is generated, do not edit it.
|
|
// \/ \/ \__,_|_| |_| |_|_|_| |_|\__, |
|
|
// __/ |
|
|
// |___/
|
|
|
|
package service
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"net/http"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/swag"
|
|
|
|
"github.com/hanzozt/edge-api/rest_model"
|
|
)
|
|
|
|
// CreateServiceCreatedCode is the HTTP code returned for type CreateServiceCreated
|
|
const CreateServiceCreatedCode int = 201
|
|
|
|
/*
|
|
CreateServiceCreated The create request was successful and the resource has been added at the following location
|
|
|
|
swagger:response createServiceCreated
|
|
*/
|
|
type CreateServiceCreated struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.CreateEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateServiceCreated creates CreateServiceCreated with default headers values
|
|
func NewCreateServiceCreated() *CreateServiceCreated {
|
|
|
|
return &CreateServiceCreated{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create service created response
|
|
func (o *CreateServiceCreated) WithWWWAuthenticate(wWWAuthenticate []string) *CreateServiceCreated {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create service created response
|
|
func (o *CreateServiceCreated) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create service created response
|
|
func (o *CreateServiceCreated) WithPayload(payload *rest_model.CreateEnvelope) *CreateServiceCreated {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create service created response
|
|
func (o *CreateServiceCreated) SetPayload(payload *rest_model.CreateEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateServiceCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
rw.WriteHeader(201)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateServiceBadRequestCode is the HTTP code returned for type CreateServiceBadRequest
|
|
const CreateServiceBadRequestCode int = 400
|
|
|
|
/*
|
|
CreateServiceBadRequest The supplied request contains invalid fields or could not be parsed (json and non-json bodies). The error's code, message, and cause fields can be inspected for further information
|
|
|
|
swagger:response createServiceBadRequest
|
|
*/
|
|
type CreateServiceBadRequest struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateServiceBadRequest creates CreateServiceBadRequest with default headers values
|
|
func NewCreateServiceBadRequest() *CreateServiceBadRequest {
|
|
|
|
return &CreateServiceBadRequest{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create service bad request response
|
|
func (o *CreateServiceBadRequest) WithWWWAuthenticate(wWWAuthenticate []string) *CreateServiceBadRequest {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create service bad request response
|
|
func (o *CreateServiceBadRequest) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create service bad request response
|
|
func (o *CreateServiceBadRequest) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateServiceBadRequest {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create service bad request response
|
|
func (o *CreateServiceBadRequest) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateServiceBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
rw.WriteHeader(400)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateServiceUnauthorizedCode is the HTTP code returned for type CreateServiceUnauthorized
|
|
const CreateServiceUnauthorizedCode int = 401
|
|
|
|
/*
|
|
CreateServiceUnauthorized The supplied session does not have the correct access rights to request this resource
|
|
|
|
swagger:response createServiceUnauthorized
|
|
*/
|
|
type CreateServiceUnauthorized struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateServiceUnauthorized creates CreateServiceUnauthorized with default headers values
|
|
func NewCreateServiceUnauthorized() *CreateServiceUnauthorized {
|
|
|
|
return &CreateServiceUnauthorized{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create service unauthorized response
|
|
func (o *CreateServiceUnauthorized) WithWWWAuthenticate(wWWAuthenticate []string) *CreateServiceUnauthorized {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create service unauthorized response
|
|
func (o *CreateServiceUnauthorized) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create service unauthorized response
|
|
func (o *CreateServiceUnauthorized) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateServiceUnauthorized {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create service unauthorized response
|
|
func (o *CreateServiceUnauthorized) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateServiceUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
rw.WriteHeader(401)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateServiceTooManyRequestsCode is the HTTP code returned for type CreateServiceTooManyRequests
|
|
const CreateServiceTooManyRequestsCode int = 429
|
|
|
|
/*
|
|
CreateServiceTooManyRequests The resource requested is rate limited and the rate limit has been exceeded
|
|
|
|
swagger:response createServiceTooManyRequests
|
|
*/
|
|
type CreateServiceTooManyRequests struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateServiceTooManyRequests creates CreateServiceTooManyRequests with default headers values
|
|
func NewCreateServiceTooManyRequests() *CreateServiceTooManyRequests {
|
|
|
|
return &CreateServiceTooManyRequests{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create service too many requests response
|
|
func (o *CreateServiceTooManyRequests) WithWWWAuthenticate(wWWAuthenticate []string) *CreateServiceTooManyRequests {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create service too many requests response
|
|
func (o *CreateServiceTooManyRequests) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create service too many requests response
|
|
func (o *CreateServiceTooManyRequests) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateServiceTooManyRequests {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create service too many requests response
|
|
func (o *CreateServiceTooManyRequests) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateServiceTooManyRequests) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
rw.WriteHeader(429)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
// CreateServiceServiceUnavailableCode is the HTTP code returned for type CreateServiceServiceUnavailable
|
|
const CreateServiceServiceUnavailableCode int = 503
|
|
|
|
/*
|
|
CreateServiceServiceUnavailable The request could not be completed due to the server being busy or in a temporarily bad state
|
|
|
|
swagger:response createServiceServiceUnavailable
|
|
*/
|
|
type CreateServiceServiceUnavailable struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewCreateServiceServiceUnavailable creates CreateServiceServiceUnavailable with default headers values
|
|
func NewCreateServiceServiceUnavailable() *CreateServiceServiceUnavailable {
|
|
|
|
return &CreateServiceServiceUnavailable{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the create service service unavailable response
|
|
func (o *CreateServiceServiceUnavailable) WithWWWAuthenticate(wWWAuthenticate []string) *CreateServiceServiceUnavailable {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the create service service unavailable response
|
|
func (o *CreateServiceServiceUnavailable) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the create service service unavailable response
|
|
func (o *CreateServiceServiceUnavailable) WithPayload(payload *rest_model.APIErrorEnvelope) *CreateServiceServiceUnavailable {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the create service service unavailable response
|
|
func (o *CreateServiceServiceUnavailable) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *CreateServiceServiceUnavailable) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
// response header WWW-Authenticate
|
|
|
|
var wWWAuthenticateIR []string
|
|
for _, wWWAuthenticateI := range o.WWWAuthenticate {
|
|
wWWAuthenticateIS := wWWAuthenticateI
|
|
if wWWAuthenticateIS != "" {
|
|
wWWAuthenticateIR = append(wWWAuthenticateIR, wWWAuthenticateIS)
|
|
}
|
|
}
|
|
wWWAuthenticate := swag.JoinByFormat(wWWAuthenticateIR, "")
|
|
if len(wWWAuthenticate) > 0 {
|
|
hv := wWWAuthenticate[0]
|
|
if hv != "" {
|
|
rw.Header().Set("WWW-Authenticate", hv)
|
|
}
|
|
}
|
|
|
|
rw.WriteHeader(503)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|