2022-11-18 21:36:55 +01:00
|
|
|
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
|
2023-01-04 19:43:37 +01:00
|
|
|
package share
|
2022-11-18 21:36:55 +01:00
|
|
|
|
|
|
|
// 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"
|
|
|
|
|
2023-01-13 21:01:34 +01:00
|
|
|
"github.com/openziti/zrok/rest_model_zrok"
|
2022-11-18 21:36:55 +01:00
|
|
|
)
|
|
|
|
|
|
|
|
// ShareCreatedCode is the HTTP code returned for type ShareCreated
|
|
|
|
const ShareCreatedCode int = 201
|
|
|
|
|
|
|
|
/*
|
2023-01-04 19:43:37 +01:00
|
|
|
ShareCreated share created
|
2022-11-18 21:36:55 +01:00
|
|
|
|
|
|
|
swagger:response shareCreated
|
|
|
|
*/
|
|
|
|
type ShareCreated struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload *rest_model_zrok.ShareResponse `json:"body,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewShareCreated creates ShareCreated with default headers values
|
|
|
|
func NewShareCreated() *ShareCreated {
|
|
|
|
|
|
|
|
return &ShareCreated{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPayload adds the payload to the share created response
|
|
|
|
func (o *ShareCreated) WithPayload(payload *rest_model_zrok.ShareResponse) *ShareCreated {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the share created response
|
|
|
|
func (o *ShareCreated) SetPayload(payload *rest_model_zrok.ShareResponse) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *ShareCreated) 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
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// ShareUnauthorizedCode is the HTTP code returned for type ShareUnauthorized
|
|
|
|
const ShareUnauthorizedCode int = 401
|
|
|
|
|
|
|
|
/*
|
|
|
|
ShareUnauthorized unauthorized
|
|
|
|
|
|
|
|
swagger:response shareUnauthorized
|
|
|
|
*/
|
|
|
|
type ShareUnauthorized struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewShareUnauthorized creates ShareUnauthorized with default headers values
|
|
|
|
func NewShareUnauthorized() *ShareUnauthorized {
|
|
|
|
|
|
|
|
return &ShareUnauthorized{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *ShareUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
|
|
|
|
|
|
rw.WriteHeader(401)
|
|
|
|
}
|
|
|
|
|
2022-12-06 18:00:25 +01:00
|
|
|
// ShareNotFoundCode is the HTTP code returned for type ShareNotFound
|
|
|
|
const ShareNotFoundCode int = 404
|
|
|
|
|
|
|
|
/*
|
|
|
|
ShareNotFound not found
|
|
|
|
|
|
|
|
swagger:response shareNotFound
|
|
|
|
*/
|
|
|
|
type ShareNotFound struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewShareNotFound creates ShareNotFound with default headers values
|
|
|
|
func NewShareNotFound() *ShareNotFound {
|
|
|
|
|
|
|
|
return &ShareNotFound{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *ShareNotFound) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
|
|
|
|
|
|
|
|
rw.WriteHeader(404)
|
|
|
|
}
|
|
|
|
|
2022-11-18 21:36:55 +01:00
|
|
|
// ShareInternalServerErrorCode is the HTTP code returned for type ShareInternalServerError
|
|
|
|
const ShareInternalServerErrorCode int = 500
|
|
|
|
|
|
|
|
/*
|
|
|
|
ShareInternalServerError internal server error
|
|
|
|
|
|
|
|
swagger:response shareInternalServerError
|
|
|
|
*/
|
|
|
|
type ShareInternalServerError struct {
|
|
|
|
|
|
|
|
/*
|
|
|
|
In: Body
|
|
|
|
*/
|
|
|
|
Payload rest_model_zrok.ErrorMessage `json:"body,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewShareInternalServerError creates ShareInternalServerError with default headers values
|
|
|
|
func NewShareInternalServerError() *ShareInternalServerError {
|
|
|
|
|
|
|
|
return &ShareInternalServerError{}
|
|
|
|
}
|
|
|
|
|
|
|
|
// WithPayload adds the payload to the share internal server error response
|
|
|
|
func (o *ShareInternalServerError) WithPayload(payload rest_model_zrok.ErrorMessage) *ShareInternalServerError {
|
|
|
|
o.Payload = payload
|
|
|
|
return o
|
|
|
|
}
|
|
|
|
|
|
|
|
// SetPayload sets the payload to the share internal server error response
|
|
|
|
func (o *ShareInternalServerError) SetPayload(payload rest_model_zrok.ErrorMessage) {
|
|
|
|
o.Payload = payload
|
|
|
|
}
|
|
|
|
|
|
|
|
// WriteResponse to the client
|
|
|
|
func (o *ShareInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
|
|
|
|
|
|
|
|
rw.WriteHeader(500)
|
|
|
|
payload := o.Payload
|
|
|
|
if err := producer.Produce(rw, payload); err != nil {
|
|
|
|
panic(err) // let the recovery middleware deal with this
|
|
|
|
}
|
|
|
|
}
|