mirror of
https://github.com/openziti/zrok.git
synced 2024-11-30 12:03:31 +01:00
270 lines
8.4 KiB
Go
270 lines
8.4 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package metadata
|
|
|
|
// 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/zrok/rest_model_zrok"
|
|
)
|
|
|
|
// GetShareDetailReader is a Reader for the GetShareDetail structure.
|
|
type GetShareDetailReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetShareDetailReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetShareDetailOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetShareDetailUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 404:
|
|
result := NewGetShareDetailNotFound()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetShareDetailInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetShareDetailOK creates a GetShareDetailOK with default headers values
|
|
func NewGetShareDetailOK() *GetShareDetailOK {
|
|
return &GetShareDetailOK{}
|
|
}
|
|
|
|
/*
|
|
GetShareDetailOK describes a response with status code 200, with default header values.
|
|
|
|
ok
|
|
*/
|
|
type GetShareDetailOK struct {
|
|
Payload *rest_model_zrok.Share
|
|
}
|
|
|
|
// IsSuccess returns true when this get share detail o k response has a 2xx status code
|
|
func (o *GetShareDetailOK) IsSuccess() bool {
|
|
return true
|
|
}
|
|
|
|
// IsRedirect returns true when this get share detail o k response has a 3xx status code
|
|
func (o *GetShareDetailOK) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get share detail o k response has a 4xx status code
|
|
func (o *GetShareDetailOK) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get share detail o k response has a 5xx status code
|
|
func (o *GetShareDetailOK) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get share detail o k response a status code equal to that given
|
|
func (o *GetShareDetailOK) IsCode(code int) bool {
|
|
return code == 200
|
|
}
|
|
|
|
func (o *GetShareDetailOK) Error() string {
|
|
return fmt.Sprintf("[GET /detail/share/{shrToken}][%d] getShareDetailOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetShareDetailOK) String() string {
|
|
return fmt.Sprintf("[GET /detail/share/{shrToken}][%d] getShareDetailOK %+v", 200, o.Payload)
|
|
}
|
|
|
|
func (o *GetShareDetailOK) GetPayload() *rest_model_zrok.Share {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetShareDetailOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(rest_model_zrok.Share)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetShareDetailUnauthorized creates a GetShareDetailUnauthorized with default headers values
|
|
func NewGetShareDetailUnauthorized() *GetShareDetailUnauthorized {
|
|
return &GetShareDetailUnauthorized{}
|
|
}
|
|
|
|
/*
|
|
GetShareDetailUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
unauthorized
|
|
*/
|
|
type GetShareDetailUnauthorized struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get share detail unauthorized response has a 2xx status code
|
|
func (o *GetShareDetailUnauthorized) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get share detail unauthorized response has a 3xx status code
|
|
func (o *GetShareDetailUnauthorized) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get share detail unauthorized response has a 4xx status code
|
|
func (o *GetShareDetailUnauthorized) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get share detail unauthorized response has a 5xx status code
|
|
func (o *GetShareDetailUnauthorized) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get share detail unauthorized response a status code equal to that given
|
|
func (o *GetShareDetailUnauthorized) IsCode(code int) bool {
|
|
return code == 401
|
|
}
|
|
|
|
func (o *GetShareDetailUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /detail/share/{shrToken}][%d] getShareDetailUnauthorized ", 401)
|
|
}
|
|
|
|
func (o *GetShareDetailUnauthorized) String() string {
|
|
return fmt.Sprintf("[GET /detail/share/{shrToken}][%d] getShareDetailUnauthorized ", 401)
|
|
}
|
|
|
|
func (o *GetShareDetailUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetShareDetailNotFound creates a GetShareDetailNotFound with default headers values
|
|
func NewGetShareDetailNotFound() *GetShareDetailNotFound {
|
|
return &GetShareDetailNotFound{}
|
|
}
|
|
|
|
/*
|
|
GetShareDetailNotFound describes a response with status code 404, with default header values.
|
|
|
|
not found
|
|
*/
|
|
type GetShareDetailNotFound struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get share detail not found response has a 2xx status code
|
|
func (o *GetShareDetailNotFound) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get share detail not found response has a 3xx status code
|
|
func (o *GetShareDetailNotFound) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get share detail not found response has a 4xx status code
|
|
func (o *GetShareDetailNotFound) IsClientError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsServerError returns true when this get share detail not found response has a 5xx status code
|
|
func (o *GetShareDetailNotFound) IsServerError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsCode returns true when this get share detail not found response a status code equal to that given
|
|
func (o *GetShareDetailNotFound) IsCode(code int) bool {
|
|
return code == 404
|
|
}
|
|
|
|
func (o *GetShareDetailNotFound) Error() string {
|
|
return fmt.Sprintf("[GET /detail/share/{shrToken}][%d] getShareDetailNotFound ", 404)
|
|
}
|
|
|
|
func (o *GetShareDetailNotFound) String() string {
|
|
return fmt.Sprintf("[GET /detail/share/{shrToken}][%d] getShareDetailNotFound ", 404)
|
|
}
|
|
|
|
func (o *GetShareDetailNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetShareDetailInternalServerError creates a GetShareDetailInternalServerError with default headers values
|
|
func NewGetShareDetailInternalServerError() *GetShareDetailInternalServerError {
|
|
return &GetShareDetailInternalServerError{}
|
|
}
|
|
|
|
/*
|
|
GetShareDetailInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
internal server error
|
|
*/
|
|
type GetShareDetailInternalServerError struct {
|
|
}
|
|
|
|
// IsSuccess returns true when this get share detail internal server error response has a 2xx status code
|
|
func (o *GetShareDetailInternalServerError) IsSuccess() bool {
|
|
return false
|
|
}
|
|
|
|
// IsRedirect returns true when this get share detail internal server error response has a 3xx status code
|
|
func (o *GetShareDetailInternalServerError) IsRedirect() bool {
|
|
return false
|
|
}
|
|
|
|
// IsClientError returns true when this get share detail internal server error response has a 4xx status code
|
|
func (o *GetShareDetailInternalServerError) IsClientError() bool {
|
|
return false
|
|
}
|
|
|
|
// IsServerError returns true when this get share detail internal server error response has a 5xx status code
|
|
func (o *GetShareDetailInternalServerError) IsServerError() bool {
|
|
return true
|
|
}
|
|
|
|
// IsCode returns true when this get share detail internal server error response a status code equal to that given
|
|
func (o *GetShareDetailInternalServerError) IsCode(code int) bool {
|
|
return code == 500
|
|
}
|
|
|
|
func (o *GetShareDetailInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /detail/share/{shrToken}][%d] getShareDetailInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *GetShareDetailInternalServerError) String() string {
|
|
return fmt.Sprintf("[GET /detail/share/{shrToken}][%d] getShareDetailInternalServerError ", 500)
|
|
}
|
|
|
|
func (o *GetShareDetailInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
return nil
|
|
}
|