Files
zeekay b7d8ccb10f rebrand: openziti → hanzozt (Hanzo Zero Trust)
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
2026-02-18 16:13:41 -08:00

271 lines
8.7 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"
)
// EnrollmentChallengeOKCode is the HTTP code returned for type EnrollmentChallengeOK
const EnrollmentChallengeOKCode int = 200
/*
EnrollmentChallengeOK A nonce challenge response. The contents will be the signature of the nonce, the key id used, and algorithm used to produce the signature.
swagger:response enrollmentChallengeOK
*/
type EnrollmentChallengeOK struct {
/*Denotes different type of security token related information
*/
WWWAuthenticate []string `json:"WWW-Authenticate"`
/*
In: Body
*/
Payload *rest_model.NonceSignature `json:"body,omitempty"`
}
// NewEnrollmentChallengeOK creates EnrollmentChallengeOK with default headers values
func NewEnrollmentChallengeOK() *EnrollmentChallengeOK {
return &EnrollmentChallengeOK{}
}
// WithWWWAuthenticate adds the wWWAuthenticate to the enrollment challenge o k response
func (o *EnrollmentChallengeOK) WithWWWAuthenticate(wWWAuthenticate []string) *EnrollmentChallengeOK {
o.WWWAuthenticate = wWWAuthenticate
return o
}
// SetWWWAuthenticate sets the wWWAuthenticate to the enrollment challenge o k response
func (o *EnrollmentChallengeOK) SetWWWAuthenticate(wWWAuthenticate []string) {
o.WWWAuthenticate = wWWAuthenticate
}
// WithPayload adds the payload to the enrollment challenge o k response
func (o *EnrollmentChallengeOK) WithPayload(payload *rest_model.NonceSignature) *EnrollmentChallengeOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the enrollment challenge o k response
func (o *EnrollmentChallengeOK) SetPayload(payload *rest_model.NonceSignature) {
o.Payload = payload
}
// WriteResponse to the client
func (o *EnrollmentChallengeOK) 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
}
}
}
// EnrollmentChallengeBadRequestCode is the HTTP code returned for type EnrollmentChallengeBadRequest
const EnrollmentChallengeBadRequestCode int = 400
/*
EnrollmentChallengeBadRequest 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 enrollmentChallengeBadRequest
*/
type EnrollmentChallengeBadRequest struct {
/*Denotes different type of security token related information
*/
WWWAuthenticate []string `json:"WWW-Authenticate"`
/*
In: Body
*/
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
}
// NewEnrollmentChallengeBadRequest creates EnrollmentChallengeBadRequest with default headers values
func NewEnrollmentChallengeBadRequest() *EnrollmentChallengeBadRequest {
return &EnrollmentChallengeBadRequest{}
}
// WithWWWAuthenticate adds the wWWAuthenticate to the enrollment challenge bad request response
func (o *EnrollmentChallengeBadRequest) WithWWWAuthenticate(wWWAuthenticate []string) *EnrollmentChallengeBadRequest {
o.WWWAuthenticate = wWWAuthenticate
return o
}
// SetWWWAuthenticate sets the wWWAuthenticate to the enrollment challenge bad request response
func (o *EnrollmentChallengeBadRequest) SetWWWAuthenticate(wWWAuthenticate []string) {
o.WWWAuthenticate = wWWAuthenticate
}
// WithPayload adds the payload to the enrollment challenge bad request response
func (o *EnrollmentChallengeBadRequest) WithPayload(payload *rest_model.APIErrorEnvelope) *EnrollmentChallengeBadRequest {
o.Payload = payload
return o
}
// SetPayload sets the payload to the enrollment challenge bad request response
func (o *EnrollmentChallengeBadRequest) SetPayload(payload *rest_model.APIErrorEnvelope) {
o.Payload = payload
}
// WriteResponse to the client
func (o *EnrollmentChallengeBadRequest) 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
}
}
}
// EnrollmentChallengeTooManyRequestsCode is the HTTP code returned for type EnrollmentChallengeTooManyRequests
const EnrollmentChallengeTooManyRequestsCode int = 429
/*
EnrollmentChallengeTooManyRequests The resource requested is rate limited and the rate limit has been exceeded
swagger:response enrollmentChallengeTooManyRequests
*/
type EnrollmentChallengeTooManyRequests struct {
/*Denotes different type of security token related information
*/
WWWAuthenticate []string `json:"WWW-Authenticate"`
/*
In: Body
*/
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
}
// NewEnrollmentChallengeTooManyRequests creates EnrollmentChallengeTooManyRequests with default headers values
func NewEnrollmentChallengeTooManyRequests() *EnrollmentChallengeTooManyRequests {
return &EnrollmentChallengeTooManyRequests{}
}
// WithWWWAuthenticate adds the wWWAuthenticate to the enrollment challenge too many requests response
func (o *EnrollmentChallengeTooManyRequests) WithWWWAuthenticate(wWWAuthenticate []string) *EnrollmentChallengeTooManyRequests {
o.WWWAuthenticate = wWWAuthenticate
return o
}
// SetWWWAuthenticate sets the wWWAuthenticate to the enrollment challenge too many requests response
func (o *EnrollmentChallengeTooManyRequests) SetWWWAuthenticate(wWWAuthenticate []string) {
o.WWWAuthenticate = wWWAuthenticate
}
// WithPayload adds the payload to the enrollment challenge too many requests response
func (o *EnrollmentChallengeTooManyRequests) WithPayload(payload *rest_model.APIErrorEnvelope) *EnrollmentChallengeTooManyRequests {
o.Payload = payload
return o
}
// SetPayload sets the payload to the enrollment challenge too many requests response
func (o *EnrollmentChallengeTooManyRequests) SetPayload(payload *rest_model.APIErrorEnvelope) {
o.Payload = payload
}
// WriteResponse to the client
func (o *EnrollmentChallengeTooManyRequests) 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
}
}
}