mirror of
https://github.com/openziti/zrok.git
synced 2024-12-27 17:19:13 +01:00
129 lines
3.6 KiB
Go
129 lines
3.6 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package tunnel
|
|
|
|
// This file was generated by the swagger tool.
|
|
// Editing this file might prove futile when you re-run the swagger generate command
|
|
|
|
import (
|
|
"fmt"
|
|
"io"
|
|
|
|
"github.com/go-openapi/runtime"
|
|
"github.com/go-openapi/strfmt"
|
|
|
|
"github.com/openziti-test-kitchen/zrok/rest_model_zrok"
|
|
)
|
|
|
|
// UntunnelReader is a Reader for the Untunnel structure.
|
|
type UntunnelReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *UntunnelReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewUntunnelOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 404:
|
|
result := NewUntunnelNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewUntunnelInternalServerError()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
default:
|
|
return nil, runtime.NewAPIError("response status code does not match any response statuses defined for this endpoint in the swagger spec", response, response.Code())
|
|
}
|
|
}
|
|
|
|
// NewUntunnelOK creates a UntunnelOK with default headers values
|
|
func NewUntunnelOK() *UntunnelOK {
|
|
return &UntunnelOK{}
|
|
}
|
|
|
|
/* UntunnelOK describes a response with status code 200, with default header values.
|
|
|
|
tunnel removed
|
|
*/
|
|
type UntunnelOK struct {
|
|
}
|
|
|
|
func (o *UntunnelOK) Error() string {
|
|
return fmt.Sprintf("[DELETE /untunnel][%d] untunnelOK ", 200)
|
|
}
|
|
|
|
func (o *UntunnelOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewUntunnelNotFound creates a UntunnelNotFound with default headers values
|
|
func NewUntunnelNotFound() *UntunnelNotFound {
|
|
return &UntunnelNotFound{}
|
|
}
|
|
|
|
/* UntunnelNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type UntunnelNotFound struct {
|
|
Payload rest_model_zrok.ErrorMessage
|
|
}
|
|
|
|
func (o *UntunnelNotFound) Error() string {
|
|
return fmt.Sprintf("[DELETE /untunnel][%d] untunnelNotFound %+v", 404, o.Payload)
|
|
}
|
|
func (o *UntunnelNotFound) GetPayload() rest_model_zrok.ErrorMessage {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *UntunnelNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewUntunnelInternalServerError creates a UntunnelInternalServerError with default headers values
|
|
func NewUntunnelInternalServerError() *UntunnelInternalServerError {
|
|
return &UntunnelInternalServerError{}
|
|
}
|
|
|
|
/* UntunnelInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type UntunnelInternalServerError struct {
|
|
Payload rest_model_zrok.ErrorMessage
|
|
}
|
|
|
|
func (o *UntunnelInternalServerError) Error() string {
|
|
return fmt.Sprintf("[DELETE /untunnel][%d] untunnelInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
func (o *UntunnelInternalServerError) GetPayload() rest_model_zrok.ErrorMessage {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *UntunnelInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), &o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|