Files
zrok/rest_server_zrok/operations/agent/remote_access_responses.go
2025-06-02 17:01:23 -04:00

133 lines
3.5 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package agent
// 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"
)
// RemoteAccessOKCode is the HTTP code returned for type RemoteAccessOK
const RemoteAccessOKCode int = 200
/*
RemoteAccessOK ok
swagger:response remoteAccessOK
*/
type RemoteAccessOK struct {
/*
In: Body
*/
Payload *RemoteAccessOKBody `json:"body,omitempty"`
}
// NewRemoteAccessOK creates RemoteAccessOK with default headers values
func NewRemoteAccessOK() *RemoteAccessOK {
return &RemoteAccessOK{}
}
// WithPayload adds the payload to the remote access o k response
func (o *RemoteAccessOK) WithPayload(payload *RemoteAccessOKBody) *RemoteAccessOK {
o.Payload = payload
return o
}
// SetPayload sets the payload to the remote access o k response
func (o *RemoteAccessOK) SetPayload(payload *RemoteAccessOKBody) {
o.Payload = payload
}
// WriteResponse to the client
func (o *RemoteAccessOK) 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
}
}
}
// RemoteAccessUnauthorizedCode is the HTTP code returned for type RemoteAccessUnauthorized
const RemoteAccessUnauthorizedCode int = 401
/*
RemoteAccessUnauthorized unauthorized
swagger:response remoteAccessUnauthorized
*/
type RemoteAccessUnauthorized struct {
}
// NewRemoteAccessUnauthorized creates RemoteAccessUnauthorized with default headers values
func NewRemoteAccessUnauthorized() *RemoteAccessUnauthorized {
return &RemoteAccessUnauthorized{}
}
// WriteResponse to the client
func (o *RemoteAccessUnauthorized) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(401)
}
// RemoteAccessInternalServerErrorCode is the HTTP code returned for type RemoteAccessInternalServerError
const RemoteAccessInternalServerErrorCode int = 500
/*
RemoteAccessInternalServerError internal server error
swagger:response remoteAccessInternalServerError
*/
type RemoteAccessInternalServerError struct {
}
// NewRemoteAccessInternalServerError creates RemoteAccessInternalServerError with default headers values
func NewRemoteAccessInternalServerError() *RemoteAccessInternalServerError {
return &RemoteAccessInternalServerError{}
}
// WriteResponse to the client
func (o *RemoteAccessInternalServerError) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(500)
}
// RemoteAccessBadGatewayCode is the HTTP code returned for type RemoteAccessBadGateway
const RemoteAccessBadGatewayCode int = 502
/*
RemoteAccessBadGateway bad gateway; agent not reachable
swagger:response remoteAccessBadGateway
*/
type RemoteAccessBadGateway struct {
}
// NewRemoteAccessBadGateway creates RemoteAccessBadGateway with default headers values
func NewRemoteAccessBadGateway() *RemoteAccessBadGateway {
return &RemoteAccessBadGateway{}
}
// WriteResponse to the client
func (o *RemoteAccessBadGateway) WriteResponse(rw http.ResponseWriter, producer runtime.Producer) {
rw.Header().Del(runtime.HeaderContentType) //Remove Content-Type on empty responses
rw.WriteHeader(502)
}