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"
|
|
)
|
|
|
|
// DetailIdentityOKCode is the HTTP code returned for type DetailIdentityOK
|
|
const DetailIdentityOKCode int = 200
|
|
|
|
/*
|
|
DetailIdentityOK A single identity
|
|
|
|
swagger:response detailIdentityOK
|
|
*/
|
|
type DetailIdentityOK struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.DetailIdentityEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDetailIdentityOK creates DetailIdentityOK with default headers values
|
|
func NewDetailIdentityOK() *DetailIdentityOK {
|
|
|
|
return &DetailIdentityOK{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the detail identity o k response
|
|
func (o *DetailIdentityOK) WithWWWAuthenticate(wWWAuthenticate []string) *DetailIdentityOK {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the detail identity o k response
|
|
func (o *DetailIdentityOK) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the detail identity o k response
|
|
func (o *DetailIdentityOK) WithPayload(payload *rest_model.DetailIdentityEnvelope) *DetailIdentityOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the detail identity o k response
|
|
func (o *DetailIdentityOK) SetPayload(payload *rest_model.DetailIdentityEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DetailIdentityOK) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// DetailIdentityUnauthorizedCode is the HTTP code returned for type DetailIdentityUnauthorized
|
|
const DetailIdentityUnauthorizedCode int = 401
|
|
|
|
/*
|
|
DetailIdentityUnauthorized The supplied session does not have the correct access rights to request this resource
|
|
|
|
swagger:response detailIdentityUnauthorized
|
|
*/
|
|
type DetailIdentityUnauthorized struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDetailIdentityUnauthorized creates DetailIdentityUnauthorized with default headers values
|
|
func NewDetailIdentityUnauthorized() *DetailIdentityUnauthorized {
|
|
|
|
return &DetailIdentityUnauthorized{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the detail identity unauthorized response
|
|
func (o *DetailIdentityUnauthorized) WithWWWAuthenticate(wWWAuthenticate []string) *DetailIdentityUnauthorized {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the detail identity unauthorized response
|
|
func (o *DetailIdentityUnauthorized) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the detail identity unauthorized response
|
|
func (o *DetailIdentityUnauthorized) WithPayload(payload *rest_model.APIErrorEnvelope) *DetailIdentityUnauthorized {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the detail identity unauthorized response
|
|
func (o *DetailIdentityUnauthorized) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DetailIdentityUnauthorized) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// DetailIdentityNotFoundCode is the HTTP code returned for type DetailIdentityNotFound
|
|
const DetailIdentityNotFoundCode int = 404
|
|
|
|
/*
|
|
DetailIdentityNotFound The requested resource does not exist
|
|
|
|
swagger:response detailIdentityNotFound
|
|
*/
|
|
type DetailIdentityNotFound struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDetailIdentityNotFound creates DetailIdentityNotFound with default headers values
|
|
func NewDetailIdentityNotFound() *DetailIdentityNotFound {
|
|
|
|
return &DetailIdentityNotFound{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the detail identity not found response
|
|
func (o *DetailIdentityNotFound) WithWWWAuthenticate(wWWAuthenticate []string) *DetailIdentityNotFound {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the detail identity not found response
|
|
func (o *DetailIdentityNotFound) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the detail identity not found response
|
|
func (o *DetailIdentityNotFound) WithPayload(payload *rest_model.APIErrorEnvelope) *DetailIdentityNotFound {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the detail identity not found response
|
|
func (o *DetailIdentityNotFound) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DetailIdentityNotFound) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// DetailIdentityTooManyRequestsCode is the HTTP code returned for type DetailIdentityTooManyRequests
|
|
const DetailIdentityTooManyRequestsCode int = 429
|
|
|
|
/*
|
|
DetailIdentityTooManyRequests The resource requested is rate limited and the rate limit has been exceeded
|
|
|
|
swagger:response detailIdentityTooManyRequests
|
|
*/
|
|
type DetailIdentityTooManyRequests struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDetailIdentityTooManyRequests creates DetailIdentityTooManyRequests with default headers values
|
|
func NewDetailIdentityTooManyRequests() *DetailIdentityTooManyRequests {
|
|
|
|
return &DetailIdentityTooManyRequests{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the detail identity too many requests response
|
|
func (o *DetailIdentityTooManyRequests) WithWWWAuthenticate(wWWAuthenticate []string) *DetailIdentityTooManyRequests {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the detail identity too many requests response
|
|
func (o *DetailIdentityTooManyRequests) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the detail identity too many requests response
|
|
func (o *DetailIdentityTooManyRequests) WithPayload(payload *rest_model.APIErrorEnvelope) *DetailIdentityTooManyRequests {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the detail identity too many requests response
|
|
func (o *DetailIdentityTooManyRequests) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DetailIdentityTooManyRequests) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// DetailIdentityServiceUnavailableCode is the HTTP code returned for type DetailIdentityServiceUnavailable
|
|
const DetailIdentityServiceUnavailableCode int = 503
|
|
|
|
/*
|
|
DetailIdentityServiceUnavailable The request could not be completed due to the server being busy or in a temporarily bad state
|
|
|
|
swagger:response detailIdentityServiceUnavailable
|
|
*/
|
|
type DetailIdentityServiceUnavailable struct {
|
|
/*Denotes different type of security token related information
|
|
|
|
*/
|
|
WWWAuthenticate []string `json:"WWW-Authenticate"`
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewDetailIdentityServiceUnavailable creates DetailIdentityServiceUnavailable with default headers values
|
|
func NewDetailIdentityServiceUnavailable() *DetailIdentityServiceUnavailable {
|
|
|
|
return &DetailIdentityServiceUnavailable{}
|
|
}
|
|
|
|
// WithWWWAuthenticate adds the wWWAuthenticate to the detail identity service unavailable response
|
|
func (o *DetailIdentityServiceUnavailable) WithWWWAuthenticate(wWWAuthenticate []string) *DetailIdentityServiceUnavailable {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
return o
|
|
}
|
|
|
|
// SetWWWAuthenticate sets the wWWAuthenticate to the detail identity service unavailable response
|
|
func (o *DetailIdentityServiceUnavailable) SetWWWAuthenticate(wWWAuthenticate []string) {
|
|
o.WWWAuthenticate = wWWAuthenticate
|
|
}
|
|
|
|
// WithPayload adds the payload to the detail identity service unavailable response
|
|
func (o *DetailIdentityServiceUnavailable) WithPayload(payload *rest_model.APIErrorEnvelope) *DetailIdentityServiceUnavailable {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the detail identity service unavailable response
|
|
func (o *DetailIdentityServiceUnavailable) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *DetailIdentityServiceUnavailable) 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
|
|
}
|
|
}
|
|
}
|