mirror of
https://github.com/hanzozt/zt.git
synced 2026-11-03 05:01:58 +00:00
259 lines
8.5 KiB
Go
259 lines
8.5 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 raft
|
|
|
|
// 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/ziti/controller/rest_model"
|
|
)
|
|
|
|
// RaftTranferLeadershipOKCode is the HTTP code returned for type RaftTranferLeadershipOK
|
|
const RaftTranferLeadershipOKCode int = 200
|
|
|
|
/*RaftTranferLeadershipOK Base empty response
|
|
|
|
swagger:response raftTranferLeadershipOK
|
|
*/
|
|
type RaftTranferLeadershipOK struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.Empty `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftTranferLeadershipOK creates RaftTranferLeadershipOK with default headers values
|
|
func NewRaftTranferLeadershipOK() *RaftTranferLeadershipOK {
|
|
|
|
return &RaftTranferLeadershipOK{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft tranfer leadership o k response
|
|
func (o *RaftTranferLeadershipOK) WithPayload(payload *rest_model.Empty) *RaftTranferLeadershipOK {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft tranfer leadership o k response
|
|
func (o *RaftTranferLeadershipOK) SetPayload(payload *rest_model.Empty) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftTranferLeadershipOK) 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
|
|
}
|
|
}
|
|
}
|
|
|
|
// RaftTranferLeadershipUnauthorizedCode is the HTTP code returned for type RaftTranferLeadershipUnauthorized
|
|
const RaftTranferLeadershipUnauthorizedCode int = 401
|
|
|
|
/*RaftTranferLeadershipUnauthorized The currently supplied session does not have the correct access rights to request this resource
|
|
|
|
swagger:response raftTranferLeadershipUnauthorized
|
|
*/
|
|
type RaftTranferLeadershipUnauthorized struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftTranferLeadershipUnauthorized creates RaftTranferLeadershipUnauthorized with default headers values
|
|
func NewRaftTranferLeadershipUnauthorized() *RaftTranferLeadershipUnauthorized {
|
|
|
|
return &RaftTranferLeadershipUnauthorized{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft tranfer leadership unauthorized response
|
|
func (o *RaftTranferLeadershipUnauthorized) WithPayload(payload *rest_model.APIErrorEnvelope) *RaftTranferLeadershipUnauthorized {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft tranfer leadership unauthorized response
|
|
func (o *RaftTranferLeadershipUnauthorized) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftTranferLeadershipUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// RaftTranferLeadershipNotFoundCode is the HTTP code returned for type RaftTranferLeadershipNotFound
|
|
const RaftTranferLeadershipNotFoundCode int = 404
|
|
|
|
/*RaftTranferLeadershipNotFound The requested resource does not exist
|
|
|
|
swagger:response raftTranferLeadershipNotFound
|
|
*/
|
|
type RaftTranferLeadershipNotFound struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftTranferLeadershipNotFound creates RaftTranferLeadershipNotFound with default headers values
|
|
func NewRaftTranferLeadershipNotFound() *RaftTranferLeadershipNotFound {
|
|
|
|
return &RaftTranferLeadershipNotFound{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft tranfer leadership not found response
|
|
func (o *RaftTranferLeadershipNotFound) WithPayload(payload *rest_model.APIErrorEnvelope) *RaftTranferLeadershipNotFound {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft tranfer leadership not found response
|
|
func (o *RaftTranferLeadershipNotFound) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftTranferLeadershipNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// RaftTranferLeadershipTooManyRequestsCode is the HTTP code returned for type RaftTranferLeadershipTooManyRequests
|
|
const RaftTranferLeadershipTooManyRequestsCode int = 429
|
|
|
|
/*RaftTranferLeadershipTooManyRequests The resource requested is rate limited and the rate limit has been exceeded
|
|
|
|
swagger:response raftTranferLeadershipTooManyRequests
|
|
*/
|
|
type RaftTranferLeadershipTooManyRequests struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftTranferLeadershipTooManyRequests creates RaftTranferLeadershipTooManyRequests with default headers values
|
|
func NewRaftTranferLeadershipTooManyRequests() *RaftTranferLeadershipTooManyRequests {
|
|
|
|
return &RaftTranferLeadershipTooManyRequests{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft tranfer leadership too many requests response
|
|
func (o *RaftTranferLeadershipTooManyRequests) WithPayload(payload *rest_model.APIErrorEnvelope) *RaftTranferLeadershipTooManyRequests {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft tranfer leadership too many requests response
|
|
func (o *RaftTranferLeadershipTooManyRequests) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftTranferLeadershipTooManyRequests) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
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
|
|
}
|
|
}
|
|
}
|
|
|
|
// RaftTranferLeadershipInternalServerErrorCode is the HTTP code returned for type RaftTranferLeadershipInternalServerError
|
|
const RaftTranferLeadershipInternalServerErrorCode int = 500
|
|
|
|
/*RaftTranferLeadershipInternalServerError 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 raftTranferLeadershipInternalServerError
|
|
*/
|
|
type RaftTranferLeadershipInternalServerError struct {
|
|
|
|
/*
|
|
In: Body
|
|
*/
|
|
Payload *rest_model.APIErrorEnvelope `json:"body,omitempty"`
|
|
}
|
|
|
|
// NewRaftTranferLeadershipInternalServerError creates RaftTranferLeadershipInternalServerError with default headers values
|
|
func NewRaftTranferLeadershipInternalServerError() *RaftTranferLeadershipInternalServerError {
|
|
|
|
return &RaftTranferLeadershipInternalServerError{}
|
|
}
|
|
|
|
// WithPayload adds the payload to the raft tranfer leadership internal server error response
|
|
func (o *RaftTranferLeadershipInternalServerError) WithPayload(payload *rest_model.APIErrorEnvelope) *RaftTranferLeadershipInternalServerError {
|
|
o.Payload = payload
|
|
return o
|
|
}
|
|
|
|
// SetPayload sets the payload to the raft tranfer leadership internal server error response
|
|
func (o *RaftTranferLeadershipInternalServerError) SetPayload(payload *rest_model.APIErrorEnvelope) {
|
|
o.Payload = payload
|
|
}
|
|
|
|
// WriteResponse to the client
|
|
func (o *RaftTranferLeadershipInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
rw.WriteHeader(500)
|
|
if o.Payload != nil {
|
|
payload := o.Payload
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
panic(err) // let the recovery middleware deal with this
|
|
}
|
|
}
|
|
}
|