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 identity
|
|
|
|
// 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"
|
|
)
|
|
|
|
// DisableIdentityOKCode is the HTTP code returned for type DisableIdentityOK
|
|
const DisableIdentityOKCode int = 200
|
|
|
|
/*
|
|
DisableIdentityOK Base empty response
|
|
|
|
swagger:response disableIdentityOK
|
|
*/
|
|
type DisableIdentityOK struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.Empty `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDisableIdentityOK creates DisableIdentityOK with default headers values
|
|
func NewDisableIdentityOK() *DisableIdentityOK {
|
|
|
|
return &DisableIdentityOK{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the disable identity o k response
|
|
func (o *DisableIdentityOK) WithWWWAuthenticate(wWWAuthenticate []string) *DisableIdentityOK {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the disable identity o k response
|
|
func (o *DisableIdentityOK) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the disable identity o k response
|
|
func (o *DisableIdentityOK) WithPayload(payload *rest_model.Empty) *DisableIdentityOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the disable identity o k response
|
|
func (o *DisableIdentityOK) SetPayload(payload *rest_model.Empty) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DisableIdentityOK) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// DisableIdentityUnauthorizedCode is the HTTP code returned for type DisableIdentityUnauthorized
|
|
const DisableIdentityUnauthorizedCode int = 401
|
|
|
|
/*
|
|
DisableIdentityUnauthorized The supplied session does not have the correct access rights to request this resource
|
|
|
|
swagger:response disableIdentityUnauthorized
|
|
*/
|
|
type DisableIdentityUnauthorized struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDisableIdentityUnauthorized creates DisableIdentityUnauthorized with default headers values
|
|
func NewDisableIdentityUnauthorized() *DisableIdentityUnauthorized {
|
|
|
|
return &DisableIdentityUnauthorized{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the disable identity unauthorized response
|
|
func (o *DisableIdentityUnauthorized) WithWWWAuthenticate(wWWAuthenticate []string) *DisableIdentityUnauthorized {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the disable identity unauthorized response
|
|
func (o *DisableIdentityUnauthorized) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the disable identity unauthorized response
|
|
func (o *DisableIdentityUnauthorized) WithPayload(payload *rest_model.APIErrorEnvelope) *DisableIdentityUnauthorized {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the disable identity unauthorized response
|
|
func (o *DisableIdentityUnauthorized) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DisableIdentityUnauthorized) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// DisableIdentityNotFoundCode is the HTTP code returned for type DisableIdentityNotFound
|
|
const DisableIdentityNotFoundCode int = 404
|
|
|
|
/*
|
|
DisableIdentityNotFound The requested resource does not exist
|
|
|
|
swagger:response disableIdentityNotFound
|
|
*/
|
|
type DisableIdentityNotFound struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDisableIdentityNotFound creates DisableIdentityNotFound with default headers values
|
|
func NewDisableIdentityNotFound() *DisableIdentityNotFound {
|
|
|
|
return &DisableIdentityNotFound{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the disable identity not found response
|
|
func (o *DisableIdentityNotFound) WithWWWAuthenticate(wWWAuthenticate []string) *DisableIdentityNotFound {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the disable identity not found response
|
|
func (o *DisableIdentityNotFound) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the disable identity not found response
|
|
func (o *DisableIdentityNotFound) WithPayload(payload *rest_model.APIErrorEnvelope) *DisableIdentityNotFound {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the disable identity not found response
|
|
func (o *DisableIdentityNotFound) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DisableIdentityNotFound) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// DisableIdentityTooManyRequestsCode is the HTTP code returned for type DisableIdentityTooManyRequests
|
|
const DisableIdentityTooManyRequestsCode int = 429
|
|
|
|
/*
|
|
DisableIdentityTooManyRequests The resource requested is rate limited and the rate limit has been exceeded
|
|
|
|
swagger:response disableIdentityTooManyRequests
|
|
*/
|
|
type DisableIdentityTooManyRequests struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDisableIdentityTooManyRequests creates DisableIdentityTooManyRequests with default headers values
|
|
func NewDisableIdentityTooManyRequests() *DisableIdentityTooManyRequests {
|
|
|
|
return &DisableIdentityTooManyRequests{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the disable identity too many requests response
|
|
func (o *DisableIdentityTooManyRequests) WithWWWAuthenticate(wWWAuthenticate []string) *DisableIdentityTooManyRequests {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the disable identity too many requests response
|
|
func (o *DisableIdentityTooManyRequests) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the disable identity too many requests response
|
|
func (o *DisableIdentityTooManyRequests) WithPayload(payload *rest_model.APIErrorEnvelope) *DisableIdentityTooManyRequests {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the disable identity too many requests response
|
|
func (o *DisableIdentityTooManyRequests) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DisableIdentityTooManyRequests) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// DisableIdentityServiceUnavailableCode is the HTTP code returned for type DisableIdentityServiceUnavailable
|
|
const DisableIdentityServiceUnavailableCode int = 503
|
|
|
|
/*
|
|
DisableIdentityServiceUnavailable The request could not be completed due to the server being busy or in a temporarily bad state
|
|
|
|
swagger:response disableIdentityServiceUnavailable
|
|
*/
|
|
type DisableIdentityServiceUnavailable struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDisableIdentityServiceUnavailable creates DisableIdentityServiceUnavailable with default headers values
|
|
func NewDisableIdentityServiceUnavailable() *DisableIdentityServiceUnavailable {
|
|
|
|
return &DisableIdentityServiceUnavailable{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the disable identity service unavailable response
|
|
func (o *DisableIdentityServiceUnavailable) WithWWWAuthenticate(wWWAuthenticate []string) *DisableIdentityServiceUnavailable {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the disable identity service unavailable response
|
|
func (o *DisableIdentityServiceUnavailable) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the disable identity service unavailable response
|
|
func (o *DisableIdentityServiceUnavailable) WithPayload(payload *rest_model.APIErrorEnvelope) *DisableIdentityServiceUnavailable {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the disable identity service unavailable response
|
|
func (o *DisableIdentityServiceUnavailable) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DisableIdentityServiceUnavailable) 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
|
|
}
|
|
}
|
|
}
|