mirror of
https://github.com/openziti/zrok.git
synced 2025-08-16 10:57:55 +02:00
admin/createFrontend api roughed in (#129)
This commit is contained in:
109
rest_server_zrok/operations/admin/create_frontend_responses.go
Normal file
109
rest_server_zrok/operations/admin/create_frontend_responses.go
Normal file
@ -0,0 +1,109 @@
|
||||
// Code generated by go-swagger; DO NOT EDIT.
|
||||
|
||||
package admin
|
||||
|
||||
// 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-test-kitchen/zrok/rest_model_zrok"
|
||||
)
|
||||
|
||||
// CreateFrontendCreatedCode is the HTTP code returned for type CreateFrontendCreated
|
||||
const CreateFrontendCreatedCode int = 201
|
||||
|
||||
/*
|
||||
CreateFrontendCreated frontend created
|
||||
|
||||
swagger:response createFrontendCreated
|
||||
*/
|
||||
type CreateFrontendCreated struct {
|
||||
|
||||
/*
|
||||
In: Body
|
||||
*/
|
||||
Payload *rest_model_zrok.CreateFrontendResponse `json:"body,omitempty"`
|
||||
}
|
||||
|
||||
// NewCreateFrontendCreated creates CreateFrontendCreated with default headers values
|
||||
func NewCreateFrontendCreated() *CreateFrontendCreated {
|
||||
|
||||
return &CreateFrontendCreated{}
|
||||
}
|
||||
|
||||
// WithPayload adds the payload to the create frontend created response
|
||||
func (o *CreateFrontendCreated) WithPayload(payload *rest_model_zrok.CreateFrontendResponse) *CreateFrontendCreated {
|
||||
o.Payload = payload
|
||||
return o
|
||||
}
|
||||
|
||||
// SetPayload sets the payload to the create frontend created response
|
||||
func (o *CreateFrontendCreated) SetPayload(payload *rest_model_zrok.CreateFrontendResponse) {
|
||||
o.Payload = payload
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *CreateFrontendCreated) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.WriteHeader(201)
|
||||
if o.Payload != nil {
|
||||
payload := o.Payload
|
||||
if err := producer.Produce(rw, payload); err != nil {
|
||||
panic(err) // let the recovery middleware deal with this
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
// CreateFrontendUnauthorizedCode is the HTTP code returned for type CreateFrontendUnauthorized
|
||||
const CreateFrontendUnauthorizedCode int = 401
|
||||
|
||||
/*
|
||||
CreateFrontendUnauthorized unauthorized
|
||||
|
||||
swagger:response createFrontendUnauthorized
|
||||
*/
|
||||
type CreateFrontendUnauthorized struct {
|
||||
}
|
||||
|
||||
// NewCreateFrontendUnauthorized creates CreateFrontendUnauthorized with default headers values
|
||||
func NewCreateFrontendUnauthorized() *CreateFrontendUnauthorized {
|
||||
|
||||
return &CreateFrontendUnauthorized{}
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *CreateFrontendUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
||||
|
||||
rw.WriteHeader(401)
|
||||
}
|
||||
|
||||
// CreateFrontendInternalServerErrorCode is the HTTP code returned for type CreateFrontendInternalServerError
|
||||
const CreateFrontendInternalServerErrorCode int = 500
|
||||
|
||||
/*
|
||||
CreateFrontendInternalServerError internal server error
|
||||
|
||||
swagger:response createFrontendInternalServerError
|
||||
*/
|
||||
type CreateFrontendInternalServerError struct {
|
||||
}
|
||||
|
||||
// NewCreateFrontendInternalServerError creates CreateFrontendInternalServerError with default headers values
|
||||
func NewCreateFrontendInternalServerError() *CreateFrontendInternalServerError {
|
||||
|
||||
return &CreateFrontendInternalServerError{}
|
||||
}
|
||||
|
||||
// WriteResponse to the client
|
||||
func (o *CreateFrontendInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
||||
|
||||
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
||||
|
||||
rw.WriteHeader(500)
|
||||
}
|
Reference in New Issue
Block a user