mirror of
https://github.com/openziti/ziti.git
synced 2026-10-13 15:51:21 +00:00
b562fb5c07
- splits Open API 2.0 (swagger) into client/management APIs - uses go-swaggers flatten capabilities - uses newer version of go-swagger (v0.27.0) - introduces /edge/client/v1, /edge/management/v1 - non-prefixed URLs default to /edge/client/v1 - splits some shared management/client API handlers - renames some REST models to "client" instead of "limited" - passes all apitests, fails dataflow upd test (main fails this as well) - updates generate rest script for powershell - todo: test generate rest script for bash - todo: use xweb (different branch)
171 lines
5.1 KiB
Go
171 lines
5.1 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 authentication
|
|
|
|
// 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/openziti/edge/rest_model"
|
|
)
|
|
|
|
// AuthenticateOKCode is the HTTP code returned for type AuthenticateOK
|
|
const AuthenticateOKCode int = 200
|
|
|
|
/*AuthenticateOK The API session associated with the session used to issue the request
|
|
|
|
swagger:response authenticateOK
|
|
*/
|
|
type AuthenticateOK struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.CurrentAPISessionDetailEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewAuthenticateOK creates AuthenticateOK with default headers values
|
|
func NewAuthenticateOK() *AuthenticateOK {
|
|
|
|
return &AuthenticateOK{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the authenticate o k response
|
|
func (o *AuthenticateOK) WithPayload(payload *rest_model.CurrentAPISessionDetailEnvelope) *AuthenticateOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the authenticate o k response
|
|
func (o *AuthenticateOK) SetPayload(payload *rest_model.CurrentAPISessionDetailEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *AuthenticateOK) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// AuthenticateBadRequestCode is the HTTP code returned for type AuthenticateBadRequest
|
|
const AuthenticateBadRequestCode int = 400
|
|
|
|
/*AuthenticateBadRequest 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 authenticateBadRequest
|
|
*/
|
|
type AuthenticateBadRequest struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewAuthenticateBadRequest creates AuthenticateBadRequest with default headers values
|
|
func NewAuthenticateBadRequest() *AuthenticateBadRequest {
|
|
|
|
return &AuthenticateBadRequest{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the authenticate bad request response
|
|
func (o *AuthenticateBadRequest) WithPayload(payload *rest_model.APIErrorEnvelope) *AuthenticateBadRequest {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the authenticate bad request response
|
|
func (o *AuthenticateBadRequest) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *AuthenticateBadRequest) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// AuthenticateForbiddenCode is the HTTP code returned for type AuthenticateForbidden
|
|
const AuthenticateForbiddenCode int = 403
|
|
|
|
/*AuthenticateForbidden The authentication request could not be processed as the credentials are invalid
|
|
|
|
swagger:response authenticateForbidden
|
|
*/
|
|
type AuthenticateForbidden struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewAuthenticateForbidden creates AuthenticateForbidden with default headers values
|
|
func NewAuthenticateForbidden() *AuthenticateForbidden {
|
|
|
|
return &AuthenticateForbidden{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the authenticate forbidden response
|
|
func (o *AuthenticateForbidden) WithPayload(payload *rest_model.APIErrorEnvelope) *AuthenticateForbidden {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the authenticate forbidden response
|
|
func (o *AuthenticateForbidden) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *AuthenticateForbidden) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(403)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|