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 enroll
|
|
|
|
// 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"
|
|
)
|
|
|
|
// EnrollUpdbOKCode is the HTTP code returned for type EnrollUpdbOK
|
|
const EnrollUpdbOKCode int = 200
|
|
|
|
/*
|
|
EnrollUpdbOK Base empty response
|
|
|
|
swagger:response enrollUpdbOK
|
|
*/
|
|
type EnrollUpdbOK struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.Empty `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewEnrollUpdbOK creates EnrollUpdbOK with default headers values
|
|
func NewEnrollUpdbOK() *EnrollUpdbOK {
|
|
|
|
return &EnrollUpdbOK{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the enroll updb o k response
|
|
func (o *EnrollUpdbOK) WithWWWAuthenticate(wWWAuthenticate []string) *EnrollUpdbOK {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the enroll updb o k response
|
|
func (o *EnrollUpdbOK) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the enroll updb o k response
|
|
func (o *EnrollUpdbOK) WithPayload(payload *rest_model.Empty) *EnrollUpdbOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the enroll updb o k response
|
|
func (o *EnrollUpdbOK) SetPayload(payload *rest_model.Empty) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *EnrollUpdbOK) 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(200)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
// EnrollUpdbBadRequestCode is the HTTP code returned for type EnrollUpdbBadRequest
|
|
const EnrollUpdbBadRequestCode int = 400
|
|
|
|
/*
|
|
EnrollUpdbBadRequest 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 enrollUpdbBadRequest
|
|
*/
|
|
type EnrollUpdbBadRequest struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewEnrollUpdbBadRequest creates EnrollUpdbBadRequest with default headers values
|
|
func NewEnrollUpdbBadRequest() *EnrollUpdbBadRequest {
|
|
|
|
return &EnrollUpdbBadRequest{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the enroll updb bad request response
|
|
func (o *EnrollUpdbBadRequest) WithWWWAuthenticate(wWWAuthenticate []string) *EnrollUpdbBadRequest {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the enroll updb bad request response
|
|
func (o *EnrollUpdbBadRequest) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the enroll updb bad request response
|
|
func (o *EnrollUpdbBadRequest) WithPayload(payload *rest_model.APIErrorEnvelope) *EnrollUpdbBadRequest {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the enroll updb bad request response
|
|
func (o *EnrollUpdbBadRequest) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *EnrollUpdbBadRequest) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// EnrollUpdbNotFoundCode is the HTTP code returned for type EnrollUpdbNotFound
|
|
const EnrollUpdbNotFoundCode int = 404
|
|
|
|
/*
|
|
EnrollUpdbNotFound The requested resource does not exist
|
|
|
|
swagger:response enrollUpdbNotFound
|
|
*/
|
|
type EnrollUpdbNotFound struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewEnrollUpdbNotFound creates EnrollUpdbNotFound with default headers values
|
|
func NewEnrollUpdbNotFound() *EnrollUpdbNotFound {
|
|
|
|
return &EnrollUpdbNotFound{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the enroll updb not found response
|
|
func (o *EnrollUpdbNotFound) WithWWWAuthenticate(wWWAuthenticate []string) *EnrollUpdbNotFound {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the enroll updb not found response
|
|
func (o *EnrollUpdbNotFound) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the enroll updb not found response
|
|
func (o *EnrollUpdbNotFound) WithPayload(payload *rest_model.APIErrorEnvelope) *EnrollUpdbNotFound {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the enroll updb not found response
|
|
func (o *EnrollUpdbNotFound) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *EnrollUpdbNotFound) 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(404)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|
|
|
|
// EnrollUpdbTooManyRequestsCode is the HTTP code returned for type EnrollUpdbTooManyRequests
|
|
const EnrollUpdbTooManyRequestsCode int = 429
|
|
|
|
/*
|
|
EnrollUpdbTooManyRequests The resource requested is rate limited and the rate limit has been exceeded
|
|
|
|
swagger:response enrollUpdbTooManyRequests
|
|
*/
|
|
type EnrollUpdbTooManyRequests struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewEnrollUpdbTooManyRequests creates EnrollUpdbTooManyRequests with default headers values
|
|
func NewEnrollUpdbTooManyRequests() *EnrollUpdbTooManyRequests {
|
|
|
|
return &EnrollUpdbTooManyRequests{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the enroll updb too many requests response
|
|
func (o *EnrollUpdbTooManyRequests) WithWWWAuthenticate(wWWAuthenticate []string) *EnrollUpdbTooManyRequests {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the enroll updb too many requests response
|
|
func (o *EnrollUpdbTooManyRequests) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the enroll updb too many requests response
|
|
func (o *EnrollUpdbTooManyRequests) WithPayload(payload *rest_model.APIErrorEnvelope) *EnrollUpdbTooManyRequests {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the enroll updb too many requests response
|
|
func (o *EnrollUpdbTooManyRequests) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *EnrollUpdbTooManyRequests) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// EnrollUpdbServiceUnavailableCode is the HTTP code returned for type EnrollUpdbServiceUnavailable
|
|
const EnrollUpdbServiceUnavailableCode int = 503
|
|
|
|
/*
|
|
EnrollUpdbServiceUnavailable The request could not be completed due to the server being busy or in a temporarily bad state
|
|
|
|
swagger:response enrollUpdbServiceUnavailable
|
|
*/
|
|
type EnrollUpdbServiceUnavailable struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewEnrollUpdbServiceUnavailable creates EnrollUpdbServiceUnavailable with default headers values
|
|
func NewEnrollUpdbServiceUnavailable() *EnrollUpdbServiceUnavailable {
|
|
|
|
return &EnrollUpdbServiceUnavailable{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the enroll updb service unavailable response
|
|
func (o *EnrollUpdbServiceUnavailable) WithWWWAuthenticate(wWWAuthenticate []string) *EnrollUpdbServiceUnavailable {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the enroll updb service unavailable response
|
|
func (o *EnrollUpdbServiceUnavailable) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the enroll updb service unavailable response
|
|
func (o *EnrollUpdbServiceUnavailable) WithPayload(payload *rest_model.APIErrorEnvelope) *EnrollUpdbServiceUnavailable {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the enroll updb service unavailable response
|
|
func (o *EnrollUpdbServiceUnavailable) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *EnrollUpdbServiceUnavailable) 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
|
|
}
|
|
}
|
|
}
|