gtslib/client/health/ready_get_responses.go
decentral1se e4ade9c758
All checks were successful
continuous-integration/drone/push Build is passing
feat: init
2024-07-31 22:47:18 +02:00

151 lines
4.2 KiB
Go

// Code generated by go-swagger; DO NOT EDIT.
package health
// This file was generated by the swagger tool.
// Editing this file might prove futile when you re-run the swagger generate command
import (
"fmt"
"github.com/go-openapi/runtime"
"github.com/go-openapi/strfmt"
)
// ReadyGetReader is a Reader for the ReadyGet structure.
type ReadyGetReader struct {
formats strfmt.Registry
}
// ReadResponse reads a server response into the received o.
func (o *ReadyGetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
switch response.Code() {
case 200:
result := NewReadyGetOK()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return result, nil
case 500:
result := NewReadyGetInternalServerError()
if err := result.readResponse(response, consumer, o.formats); err != nil {
return nil, err
}
return nil, result
default:
return nil, runtime.NewAPIError("[GET /readyz] readyGet", response, response.Code())
}
}
// NewReadyGetOK creates a ReadyGetOK with default headers values
func NewReadyGetOK() *ReadyGetOK {
return &ReadyGetOK{}
}
/*
ReadyGetOK describes a response with status code 200, with default header values.
OK
*/
type ReadyGetOK struct {
}
// IsSuccess returns true when this ready get o k response has a 2xx status code
func (o *ReadyGetOK) IsSuccess() bool {
return true
}
// IsRedirect returns true when this ready get o k response has a 3xx status code
func (o *ReadyGetOK) IsRedirect() bool {
return false
}
// IsClientError returns true when this ready get o k response has a 4xx status code
func (o *ReadyGetOK) IsClientError() bool {
return false
}
// IsServerError returns true when this ready get o k response has a 5xx status code
func (o *ReadyGetOK) IsServerError() bool {
return false
}
// IsCode returns true when this ready get o k response a status code equal to that given
func (o *ReadyGetOK) IsCode(code int) bool {
return code == 200
}
// Code gets the status code for the ready get o k response
func (o *ReadyGetOK) Code() int {
return 200
}
func (o *ReadyGetOK) Error() string {
return fmt.Sprintf("[GET /readyz][%d] readyGetOK", 200)
}
func (o *ReadyGetOK) String() string {
return fmt.Sprintf("[GET /readyz][%d] readyGetOK", 200)
}
func (o *ReadyGetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}
// NewReadyGetInternalServerError creates a ReadyGetInternalServerError with default headers values
func NewReadyGetInternalServerError() *ReadyGetInternalServerError {
return &ReadyGetInternalServerError{}
}
/*
ReadyGetInternalServerError describes a response with status code 500, with default header values.
Not ready. Check logs for error message.
*/
type ReadyGetInternalServerError struct {
}
// IsSuccess returns true when this ready get internal server error response has a 2xx status code
func (o *ReadyGetInternalServerError) IsSuccess() bool {
return false
}
// IsRedirect returns true when this ready get internal server error response has a 3xx status code
func (o *ReadyGetInternalServerError) IsRedirect() bool {
return false
}
// IsClientError returns true when this ready get internal server error response has a 4xx status code
func (o *ReadyGetInternalServerError) IsClientError() bool {
return false
}
// IsServerError returns true when this ready get internal server error response has a 5xx status code
func (o *ReadyGetInternalServerError) IsServerError() bool {
return true
}
// IsCode returns true when this ready get internal server error response a status code equal to that given
func (o *ReadyGetInternalServerError) IsCode(code int) bool {
return code == 500
}
// Code gets the status code for the ready get internal server error response
func (o *ReadyGetInternalServerError) Code() int {
return 500
}
func (o *ReadyGetInternalServerError) Error() string {
return fmt.Sprintf("[GET /readyz][%d] readyGetInternalServerError", 500)
}
func (o *ReadyGetInternalServerError) String() string {
return fmt.Sprintf("[GET /readyz][%d] readyGetInternalServerError", 500)
}
func (o *ReadyGetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
return nil
}