2022-09-19 21:58:52 +02:00
|
|
|
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
|
2022-11-30 17:43:00 +01:00
|
|
|
package account
|
2022-09-19 21:58:52 +02:00
|
|
|
|
|
|
|
// 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"
|
|
|
|
|
2023-01-13 21:01:34 +01:00
|
|
|
"github.com/openziti/zrok/rest_model_zrok"
|
2022-09-19 21:58:52 +02:00
|
|
|
)
|
|
|
|
|
|
|
|
// VerifyReader is a Reader for the Verify structure.
|
|
|
|
type VerifyReader struct {
|
|
|
|
formats strfmt.Registry
|
|
|
|
}
|
|
|
|
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
|
|
func (o *VerifyReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
|
|
switch response.Code() {
|
|
|
|
case 200:
|
|
|
|
result := NewVerifyOK()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return result, nil
|
|
|
|
case 404:
|
|
|
|
result := NewVerifyNotFound()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
|
|
|
case 500:
|
|
|
|
result := NewVerifyInternalServerError()
|
|
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
|
|
return nil, err
|
|
|
|
}
|
|
|
|
return nil, result
|
|
|
|
default:
|
2023-12-07 20:26:03 +01:00
|
|
|
return nil, runtime.NewAPIError("[POST /verify] verify", response, response.Code())
|
2022-09-19 21:58:52 +02:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewVerifyOK creates a VerifyOK with default headers values
|
|
|
|
func NewVerifyOK() *VerifyOK {
|
|
|
|
return &VerifyOK{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
VerifyOK describes a response with status code 200, with default header values.
|
|
|
|
|
|
|
|
token ready
|
|
|
|
*/
|
|
|
|
type VerifyOK struct {
|
|
|
|
Payload *rest_model_zrok.VerifyResponse
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuccess returns true when this verify o k response has a 2xx status code
|
|
|
|
func (o *VerifyOK) IsSuccess() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsRedirect returns true when this verify o k response has a 3xx status code
|
|
|
|
func (o *VerifyOK) IsRedirect() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsClientError returns true when this verify o k response has a 4xx status code
|
|
|
|
func (o *VerifyOK) IsClientError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsServerError returns true when this verify o k response has a 5xx status code
|
|
|
|
func (o *VerifyOK) IsServerError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsCode returns true when this verify o k response a status code equal to that given
|
|
|
|
func (o *VerifyOK) IsCode(code int) bool {
|
|
|
|
return code == 200
|
|
|
|
}
|
|
|
|
|
2023-12-07 20:26:03 +01:00
|
|
|
// Code gets the status code for the verify o k response
|
|
|
|
func (o *VerifyOK) Code() int {
|
|
|
|
return 200
|
|
|
|
}
|
|
|
|
|
2022-09-19 21:58:52 +02:00
|
|
|
func (o *VerifyOK) Error() string {
|
2022-09-19 22:26:54 +02:00
|
|
|
return fmt.Sprintf("[POST /verify][%d] verifyOK %+v", 200, o.Payload)
|
2022-09-19 21:58:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *VerifyOK) String() string {
|
2022-09-19 22:26:54 +02:00
|
|
|
return fmt.Sprintf("[POST /verify][%d] verifyOK %+v", 200, o.Payload)
|
2022-09-19 21:58:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *VerifyOK) GetPayload() *rest_model_zrok.VerifyResponse {
|
|
|
|
return o.Payload
|
|
|
|
}
|
|
|
|
|
|
|
|
func (o *VerifyOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
o.Payload = new(rest_model_zrok.VerifyResponse)
|
|
|
|
|
|
|
|
// response payload
|
|
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
|
|
return err
|
|
|
|
}
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewVerifyNotFound creates a VerifyNotFound with default headers values
|
|
|
|
func NewVerifyNotFound() *VerifyNotFound {
|
|
|
|
return &VerifyNotFound{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
VerifyNotFound describes a response with status code 404, with default header values.
|
|
|
|
|
|
|
|
token not found
|
|
|
|
*/
|
|
|
|
type VerifyNotFound struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuccess returns true when this verify not found response has a 2xx status code
|
|
|
|
func (o *VerifyNotFound) IsSuccess() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsRedirect returns true when this verify not found response has a 3xx status code
|
|
|
|
func (o *VerifyNotFound) IsRedirect() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsClientError returns true when this verify not found response has a 4xx status code
|
|
|
|
func (o *VerifyNotFound) IsClientError() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsServerError returns true when this verify not found response has a 5xx status code
|
|
|
|
func (o *VerifyNotFound) IsServerError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsCode returns true when this verify not found response a status code equal to that given
|
|
|
|
func (o *VerifyNotFound) IsCode(code int) bool {
|
|
|
|
return code == 404
|
|
|
|
}
|
|
|
|
|
2023-12-07 20:26:03 +01:00
|
|
|
// Code gets the status code for the verify not found response
|
|
|
|
func (o *VerifyNotFound) Code() int {
|
|
|
|
return 404
|
|
|
|
}
|
|
|
|
|
2022-09-19 21:58:52 +02:00
|
|
|
func (o *VerifyNotFound) Error() string {
|
2022-09-19 22:26:54 +02:00
|
|
|
return fmt.Sprintf("[POST /verify][%d] verifyNotFound ", 404)
|
2022-09-19 21:58:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *VerifyNotFound) String() string {
|
2022-09-19 22:26:54 +02:00
|
|
|
return fmt.Sprintf("[POST /verify][%d] verifyNotFound ", 404)
|
2022-09-19 21:58:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *VerifyNotFound) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
|
|
|
|
// NewVerifyInternalServerError creates a VerifyInternalServerError with default headers values
|
|
|
|
func NewVerifyInternalServerError() *VerifyInternalServerError {
|
|
|
|
return &VerifyInternalServerError{}
|
|
|
|
}
|
|
|
|
|
|
|
|
/*
|
|
|
|
VerifyInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
|
|
|
|
internal server error
|
|
|
|
*/
|
|
|
|
type VerifyInternalServerError struct {
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsSuccess returns true when this verify internal server error response has a 2xx status code
|
|
|
|
func (o *VerifyInternalServerError) IsSuccess() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsRedirect returns true when this verify internal server error response has a 3xx status code
|
|
|
|
func (o *VerifyInternalServerError) IsRedirect() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsClientError returns true when this verify internal server error response has a 4xx status code
|
|
|
|
func (o *VerifyInternalServerError) IsClientError() bool {
|
|
|
|
return false
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsServerError returns true when this verify internal server error response has a 5xx status code
|
|
|
|
func (o *VerifyInternalServerError) IsServerError() bool {
|
|
|
|
return true
|
|
|
|
}
|
|
|
|
|
|
|
|
// IsCode returns true when this verify internal server error response a status code equal to that given
|
|
|
|
func (o *VerifyInternalServerError) IsCode(code int) bool {
|
|
|
|
return code == 500
|
|
|
|
}
|
|
|
|
|
2023-12-07 20:26:03 +01:00
|
|
|
// Code gets the status code for the verify internal server error response
|
|
|
|
func (o *VerifyInternalServerError) Code() int {
|
|
|
|
return 500
|
|
|
|
}
|
|
|
|
|
2022-09-19 21:58:52 +02:00
|
|
|
func (o *VerifyInternalServerError) Error() string {
|
2022-11-30 17:43:00 +01:00
|
|
|
return fmt.Sprintf("[POST /verify][%d] verifyInternalServerError ", 500)
|
2022-09-19 21:58:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *VerifyInternalServerError) String() string {
|
2022-11-30 17:43:00 +01:00
|
|
|
return fmt.Sprintf("[POST /verify][%d] verifyInternalServerError ", 500)
|
2022-09-19 21:58:52 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
func (o *VerifyInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
|
|
|
|
return nil
|
|
|
|
}
|