mirror of
https://github.com/rocky-linux/peridot.git
synced 2024-10-19 07:55:07 +00:00
182 lines
5.3 KiB
Go
182 lines
5.3 KiB
Go
// Code generated by go-swagger; DO NOT EDIT.
|
|
|
|
package admin
|
|
|
|
// 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/ory/hydra-client-go/models"
|
|
)
|
|
|
|
// GetJSONWebKeySetReader is a Reader for the GetJSONWebKeySet structure.
|
|
type GetJSONWebKeySetReader struct {
|
|
formats strfmt.Registry
|
|
}
|
|
|
|
// ReadResponse reads a server response into the received o.
|
|
func (o *GetJSONWebKeySetReader) ReadResponse(response runtime.ClientResponse, consumer runtime.Consumer) (interface{}, error) {
|
|
switch response.Code() {
|
|
case 200:
|
|
result := NewGetJSONWebKeySetOK()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return result, nil
|
|
case 401:
|
|
result := NewGetJSONWebKeySetUnauthorized()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 403:
|
|
result := NewGetJSONWebKeySetForbidden()
|
|
if err := result.readResponse(response, consumer, o.formats); err != nil {
|
|
return nil, err
|
|
}
|
|
return nil, result
|
|
case 500:
|
|
result := NewGetJSONWebKeySetInternalServerError()
|
|
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())
|
|
}
|
|
}
|
|
|
|
// NewGetJSONWebKeySetOK creates a GetJSONWebKeySetOK with default headers values
|
|
func NewGetJSONWebKeySetOK() *GetJSONWebKeySetOK {
|
|
return &GetJSONWebKeySetOK{}
|
|
}
|
|
|
|
/* GetJSONWebKeySetOK describes a response with status code 200, with default header values.
|
|
|
|
JSONWebKeySet
|
|
*/
|
|
type GetJSONWebKeySetOK struct {
|
|
Payload *models.JSONWebKeySet
|
|
}
|
|
|
|
func (o *GetJSONWebKeySetOK) Error() string {
|
|
return fmt.Sprintf("[GET /keys/{set}][%d] getJsonWebKeySetOK %+v", 200, o.Payload)
|
|
}
|
|
func (o *GetJSONWebKeySetOK) GetPayload() *models.JSONWebKeySet {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetJSONWebKeySetOK) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.JSONWebKeySet)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetJSONWebKeySetUnauthorized creates a GetJSONWebKeySetUnauthorized with default headers values
|
|
func NewGetJSONWebKeySetUnauthorized() *GetJSONWebKeySetUnauthorized {
|
|
return &GetJSONWebKeySetUnauthorized{}
|
|
}
|
|
|
|
/* GetJSONWebKeySetUnauthorized describes a response with status code 401, with default header values.
|
|
|
|
jsonError
|
|
*/
|
|
type GetJSONWebKeySetUnauthorized struct {
|
|
Payload *models.JSONError
|
|
}
|
|
|
|
func (o *GetJSONWebKeySetUnauthorized) Error() string {
|
|
return fmt.Sprintf("[GET /keys/{set}][%d] getJsonWebKeySetUnauthorized %+v", 401, o.Payload)
|
|
}
|
|
func (o *GetJSONWebKeySetUnauthorized) GetPayload() *models.JSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetJSONWebKeySetUnauthorized) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.JSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetJSONWebKeySetForbidden creates a GetJSONWebKeySetForbidden with default headers values
|
|
func NewGetJSONWebKeySetForbidden() *GetJSONWebKeySetForbidden {
|
|
return &GetJSONWebKeySetForbidden{}
|
|
}
|
|
|
|
/* GetJSONWebKeySetForbidden describes a response with status code 403, with default header values.
|
|
|
|
jsonError
|
|
*/
|
|
type GetJSONWebKeySetForbidden struct {
|
|
Payload *models.JSONError
|
|
}
|
|
|
|
func (o *GetJSONWebKeySetForbidden) Error() string {
|
|
return fmt.Sprintf("[GET /keys/{set}][%d] getJsonWebKeySetForbidden %+v", 403, o.Payload)
|
|
}
|
|
func (o *GetJSONWebKeySetForbidden) GetPayload() *models.JSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetJSONWebKeySetForbidden) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.JSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|
|
|
|
// NewGetJSONWebKeySetInternalServerError creates a GetJSONWebKeySetInternalServerError with default headers values
|
|
func NewGetJSONWebKeySetInternalServerError() *GetJSONWebKeySetInternalServerError {
|
|
return &GetJSONWebKeySetInternalServerError{}
|
|
}
|
|
|
|
/* GetJSONWebKeySetInternalServerError describes a response with status code 500, with default header values.
|
|
|
|
jsonError
|
|
*/
|
|
type GetJSONWebKeySetInternalServerError struct {
|
|
Payload *models.JSONError
|
|
}
|
|
|
|
func (o *GetJSONWebKeySetInternalServerError) Error() string {
|
|
return fmt.Sprintf("[GET /keys/{set}][%d] getJsonWebKeySetInternalServerError %+v", 500, o.Payload)
|
|
}
|
|
func (o *GetJSONWebKeySetInternalServerError) GetPayload() *models.JSONError {
|
|
return o.Payload
|
|
}
|
|
|
|
func (o *GetJSONWebKeySetInternalServerError) readResponse(response runtime.ClientResponse, consumer runtime.Consumer, formats strfmt.Registry) error {
|
|
|
|
o.Payload = new(models.JSONError)
|
|
|
|
// response payload
|
|
if err := consumer.Consume(response.Body(), o.Payload); err != nil && err != io.EOF {
|
|
return err
|
|
}
|
|
|
|
return nil
|
|
}
|