Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type Client
- func (c *Client) CreateHuman(ctx context.Context, request *CreateHuman) (CreateHumanRes, error)
- func (c *Client) DeleteHuman(ctx context.Context, params DeleteHumanParams) (DeleteHumanRes, error)
- func (c *Client) ListHuman(ctx context.Context, params ListHumanParams) (ListHumanRes, error)
- func (c *Client) ReadHuman(ctx context.Context, params ReadHumanParams) (ReadHumanRes, error)
- func (c *Client) UpdateHuman(ctx context.Context, request *UpdateHuman, params UpdateHumanParams) (UpdateHumanRes, error)
- type ClientOption
- type CreateHuman
- func (s *CreateHuman) Decode(d *jx.Decoder) error
- func (s *CreateHuman) Encode(e *jx.Encoder)
- func (s *CreateHuman) GetID() uuid.UUID
- func (s *CreateHuman) GetName() string
- func (s *CreateHuman) MarshalJSON() ([]byte, error)
- func (s *CreateHuman) SetID(val uuid.UUID)
- func (s *CreateHuman) SetName(val string)
- func (s *CreateHuman) UnmarshalJSON(data []byte) error
- type CreateHumanRes
- type DeleteHumanOK
- func (s *DeleteHumanOK) Decode(d *jx.Decoder) error
- func (s *DeleteHumanOK) Encode(e *jx.Encoder)
- func (s *DeleteHumanOK) GetStatus() OptString
- func (s *DeleteHumanOK) MarshalJSON() ([]byte, error)
- func (s *DeleteHumanOK) SetStatus(val OptString)
- func (s *DeleteHumanOK) UnmarshalJSON(data []byte) error
- type DeleteHumanParams
- type DeleteHumanRes
- type ErrorHandler
- type ErrorItem
- func (s *ErrorItem) Decode(d *jx.Decoder) error
- func (s *ErrorItem) Encode(e *jx.Encoder)
- func (s *ErrorItem) GetCode() int
- func (s *ErrorItem) GetMessage() string
- func (s *ErrorItem) MarshalJSON() ([]byte, error)
- func (s *ErrorItem) SetCode(val int)
- func (s *ErrorItem) SetMessage(val string)
- func (s *ErrorItem) UnmarshalJSON(data []byte) error
- type ErrorStatusCode
- type Handler
- type HandlerImpl
- func (h *HandlerImpl) CreateHuman(ctx context.Context, req *CreateHuman) (CreateHumanRes, error)
- func (h *HandlerImpl) DeleteHuman(ctx context.Context, params DeleteHumanParams) (DeleteHumanRes, error)
- func (h *HandlerImpl) ListHuman(ctx context.Context, params ListHumanParams) (ListHumanRes, error)
- func (h *HandlerImpl) NewError(ctx context.Context, err error) *ErrorStatusCode
- func (h *HandlerImpl) ReadHuman(ctx context.Context, params ReadHumanParams) (ReadHumanRes, error)
- func (h *HandlerImpl) UpdateHuman(ctx context.Context, req *UpdateHuman, params UpdateHumanParams) (UpdateHumanRes, error)
- type Human
- func (s *Human) Decode(d *jx.Decoder) error
- func (s *Human) Encode(e *jx.Encoder)
- func (s *Human) GetID() uuid.UUID
- func (s *Human) GetName() string
- func (s *Human) MarshalJSON() ([]byte, error)
- func (s *Human) SetID(val uuid.UUID)
- func (s *Human) SetName(val string)
- func (s *Human) UnmarshalJSON(data []byte) error
- type HumanList
- type HumanListHeaders
- type Invoker
- type ListHumanBadRequestApplicationJSON
- func (s *ListHumanBadRequestApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListHumanBadRequestApplicationJSON) Encode(e *jx.Encoder)
- func (s ListHumanBadRequestApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListHumanBadRequestApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListHumanBadRequestApplicationJSON) Validate() error
- type ListHumanConflictApplicationJSON
- func (s *ListHumanConflictApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListHumanConflictApplicationJSON) Encode(e *jx.Encoder)
- func (s ListHumanConflictApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListHumanConflictApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListHumanConflictApplicationJSON) Validate() error
- type ListHumanInternalServerErrorApplicationJSON
- func (s *ListHumanInternalServerErrorApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListHumanInternalServerErrorApplicationJSON) Encode(e *jx.Encoder)
- func (s ListHumanInternalServerErrorApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListHumanInternalServerErrorApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListHumanInternalServerErrorApplicationJSON) Validate() error
- type ListHumanNotFoundApplicationJSON
- func (s *ListHumanNotFoundApplicationJSON) Decode(d *jx.Decoder) error
- func (s ListHumanNotFoundApplicationJSON) Encode(e *jx.Encoder)
- func (s ListHumanNotFoundApplicationJSON) MarshalJSON() ([]byte, error)
- func (s *ListHumanNotFoundApplicationJSON) UnmarshalJSON(data []byte) error
- func (s ListHumanNotFoundApplicationJSON) Validate() error
- type ListHumanParams
- type ListHumanRes
- type Middleware
- type OptInt
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type OptUUID
- func (o *OptUUID) Decode(d *jx.Decoder) error
- func (o OptUUID) Encode(e *jx.Encoder)
- func (o OptUUID) Get() (v uuid.UUID, ok bool)
- func (o OptUUID) IsSet() bool
- func (s OptUUID) MarshalJSON() ([]byte, error)
- func (o OptUUID) Or(d uuid.UUID) uuid.UUID
- func (o *OptUUID) Reset()
- func (o *OptUUID) SetTo(v uuid.UUID)
- func (s *OptUUID) UnmarshalJSON(data []byte) error
- type Option
- type R400Item
- func (s *R400Item) Decode(d *jx.Decoder) error
- func (s *R400Item) Encode(e *jx.Encoder)
- func (s *R400Item) GetCode() int
- func (s *R400Item) GetMessage() string
- func (s *R400Item) MarshalJSON() ([]byte, error)
- func (s *R400Item) SetCode(val int)
- func (s *R400Item) SetMessage(val string)
- func (s *R400Item) UnmarshalJSON(data []byte) error
- type R404Item
- func (s *R404Item) Decode(d *jx.Decoder) error
- func (s *R404Item) Encode(e *jx.Encoder)
- func (s *R404Item) GetCode() int
- func (s *R404Item) GetMessage() string
- func (s *R404Item) MarshalJSON() ([]byte, error)
- func (s *R404Item) SetCode(val int)
- func (s *R404Item) SetMessage(val string)
- func (s *R404Item) UnmarshalJSON(data []byte) error
- type R409Item
- func (s *R409Item) Decode(d *jx.Decoder) error
- func (s *R409Item) Encode(e *jx.Encoder)
- func (s *R409Item) GetCode() int
- func (s *R409Item) GetMessage() string
- func (s *R409Item) MarshalJSON() ([]byte, error)
- func (s *R409Item) SetCode(val int)
- func (s *R409Item) SetMessage(val string)
- func (s *R409Item) UnmarshalJSON(data []byte) error
- type R500Item
- func (s *R500Item) Decode(d *jx.Decoder) error
- func (s *R500Item) Encode(e *jx.Encoder)
- func (s *R500Item) GetCode() int
- func (s *R500Item) GetMessage() string
- func (s *R500Item) MarshalJSON() ([]byte, error)
- func (s *R500Item) SetCode(val int)
- func (s *R500Item) SetMessage(val string)
- func (s *R500Item) UnmarshalJSON(data []byte) error
- type ReadHumanParams
- type ReadHumanRes
- type Route
- type Server
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type UnimplementedHandler
- func (UnimplementedHandler) CreateHuman(ctx context.Context, req *CreateHuman) (r CreateHumanRes, _ error)
- func (UnimplementedHandler) DeleteHuman(ctx context.Context, params DeleteHumanParams) (r DeleteHumanRes, _ error)
- func (UnimplementedHandler) ListHuman(ctx context.Context, params ListHumanParams) (r ListHumanRes, _ error)
- func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
- func (UnimplementedHandler) ReadHuman(ctx context.Context, params ReadHumanParams) (r ReadHumanRes, _ error)
- func (UnimplementedHandler) UpdateHuman(ctx context.Context, req *UpdateHuman, params UpdateHumanParams) (r UpdateHumanRes, _ error)
- type UpdateHuman
- func (s *UpdateHuman) Decode(d *jx.Decoder) error
- func (s *UpdateHuman) Encode(e *jx.Encoder)
- func (s *UpdateHuman) GetID() OptUUID
- func (s *UpdateHuman) GetName() OptString
- func (s *UpdateHuman) MarshalJSON() ([]byte, error)
- func (s *UpdateHuman) SetID(val OptUUID)
- func (s *UpdateHuman) SetName(val OptString)
- func (s *UpdateHuman) UnmarshalJSON(data []byte) error
- type UpdateHumanParams
- type UpdateHumanRes
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) CreateHuman ¶
func (c *Client) CreateHuman(ctx context.Context, request *CreateHuman) (CreateHumanRes, error)
CreateHuman invokes createHuman operation.
Create a new Human and persists it to storage.
POST /human
func (*Client) DeleteHuman ¶
func (c *Client) DeleteHuman(ctx context.Context, params DeleteHumanParams) (DeleteHumanRes, error)
DeleteHuman invokes deleteHuman operation.
Delete Human.
DELETE /human/{id}
func (*Client) ListHuman ¶
func (c *Client) ListHuman(ctx context.Context, params ListHumanParams) (ListHumanRes, error)
ListHuman invokes listHuman operation.
List for Humans.
GET /human
func (*Client) ReadHuman ¶
func (c *Client) ReadHuman(ctx context.Context, params ReadHumanParams) (ReadHumanRes, error)
ReadHuman invokes readHuman operation.
Finds the Human with the requested ID and returns it.
GET /human/{id}
func (*Client) UpdateHuman ¶
func (c *Client) UpdateHuman(ctx context.Context, request *UpdateHuman, params UpdateHumanParams) (UpdateHumanRes, error)
UpdateHuman invokes updateHuman operation.
Update Human and persists it to storage.
PUT /human/{id}
type ClientOption ¶
type ClientOption interface {
// contains filtered or unexported methods
}
ClientOption is client config option.
func WithClient ¶
func WithClient(client ht.Client) ClientOption
WithClient specifies http client to use.
type CreateHuman ¶
Ref: #/components/schemas/CreateHuman
func (*CreateHuman) Decode ¶
func (s *CreateHuman) Decode(d *jx.Decoder) error
Decode decodes CreateHuman from json.
func (*CreateHuman) Encode ¶
func (s *CreateHuman) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CreateHuman) GetName ¶
func (s *CreateHuman) GetName() string
GetName returns the value of Name.
func (*CreateHuman) MarshalJSON ¶
func (s *CreateHuman) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CreateHuman) SetName ¶
func (s *CreateHuman) SetName(val string)
SetName sets the value of Name.
func (*CreateHuman) UnmarshalJSON ¶
func (s *CreateHuman) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type CreateHumanRes ¶
type CreateHumanRes interface {
// contains filtered or unexported methods
}
type DeleteHumanOK ¶
type DeleteHumanOK struct {
Status OptString `json:"status"`
}
func (*DeleteHumanOK) Decode ¶
func (s *DeleteHumanOK) Decode(d *jx.Decoder) error
Decode decodes DeleteHumanOK from json.
func (*DeleteHumanOK) Encode ¶
func (s *DeleteHumanOK) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*DeleteHumanOK) GetStatus ¶
func (s *DeleteHumanOK) GetStatus() OptString
GetStatus returns the value of Status.
func (*DeleteHumanOK) MarshalJSON ¶
func (s *DeleteHumanOK) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*DeleteHumanOK) SetStatus ¶
func (s *DeleteHumanOK) SetStatus(val OptString)
SetStatus sets the value of Status.
func (*DeleteHumanOK) UnmarshalJSON ¶
func (s *DeleteHumanOK) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type DeleteHumanParams ¶
DeleteHumanParams is parameters of deleteHuman operation.
type DeleteHumanRes ¶
type DeleteHumanRes interface {
// contains filtered or unexported methods
}
type ErrorItem ¶
func (*ErrorItem) GetMessage ¶
GetMessage returns the value of Message.
func (*ErrorItem) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*ErrorItem) SetMessage ¶
SetMessage sets the value of Message.
func (*ErrorItem) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorStatusCode ¶
ErrorStatusCode wraps []ErrorItem with StatusCode.
func (*ErrorStatusCode) Error ¶
func (s *ErrorStatusCode) Error() string
func (*ErrorStatusCode) GetResponse ¶
func (s *ErrorStatusCode) GetResponse() []ErrorItem
GetResponse returns the value of Response.
func (*ErrorStatusCode) GetStatusCode ¶
func (s *ErrorStatusCode) GetStatusCode() int
GetStatusCode returns the value of StatusCode.
func (*ErrorStatusCode) SetResponse ¶
func (s *ErrorStatusCode) SetResponse(val []ErrorItem)
SetResponse sets the value of Response.
func (*ErrorStatusCode) SetStatusCode ¶
func (s *ErrorStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
func (*ErrorStatusCode) Validate ¶
func (s *ErrorStatusCode) Validate() error
type Handler ¶
type Handler interface { // CreateHuman implements createHuman operation. // // Create a new Human and persists it to storage. // // POST /human CreateHuman(ctx context.Context, req *CreateHuman) (CreateHumanRes, error) // DeleteHuman implements deleteHuman operation. // // Delete Human. // // DELETE /human/{id} DeleteHuman(ctx context.Context, params DeleteHumanParams) (DeleteHumanRes, error) // ListHuman implements listHuman operation. // // List for Humans. // // GET /human ListHuman(ctx context.Context, params ListHumanParams) (ListHumanRes, error) // ReadHuman implements readHuman operation. // // Finds the Human with the requested ID and returns it. // // GET /human/{id} ReadHuman(ctx context.Context, params ReadHumanParams) (ReadHumanRes, error) // UpdateHuman implements updateHuman operation. // // Update Human and persists it to storage. // // PUT /human/{id} UpdateHuman(ctx context.Context, req *UpdateHuman, params UpdateHumanParams) (UpdateHumanRes, error) // NewError creates *ErrorStatusCode from error returned by handler. // // Used for common default response. NewError(ctx context.Context, err error) *ErrorStatusCode }
Handler handles operations described by OpenAPI v3 specification.
type HandlerImpl ¶
type HandlerImpl struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*HandlerImpl) CreateHuman ¶
func (h *HandlerImpl) CreateHuman(ctx context.Context, req *CreateHuman) (CreateHumanRes, error)
func (*HandlerImpl) DeleteHuman ¶
func (h *HandlerImpl) DeleteHuman(ctx context.Context, params DeleteHumanParams) (DeleteHumanRes, error)
DeleteHuman handles DELETE /human/{id} requests.
func (*HandlerImpl) ListHuman ¶
func (h *HandlerImpl) ListHuman(ctx context.Context, params ListHumanParams) (ListHumanRes, error)
func (*HandlerImpl) NewError ¶
func (h *HandlerImpl) NewError(ctx context.Context, err error) *ErrorStatusCode
func (*HandlerImpl) ReadHuman ¶
func (h *HandlerImpl) ReadHuman(ctx context.Context, params ReadHumanParams) (ReadHumanRes, error)
func (*HandlerImpl) UpdateHuman ¶
func (h *HandlerImpl) UpdateHuman(ctx context.Context, req *UpdateHuman, params UpdateHumanParams) (UpdateHumanRes, error)
type Human ¶
Ref: #/components/schemas/Human
func NewHumanList ¶
func (*Human) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Human) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type HumanList ¶
type HumanList []Human
func (HumanList) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*HumanList) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type HumanListHeaders ¶
HumanListHeaders wraps HumanList with response headers.
func (*HumanListHeaders) GetContentRange ¶
func (s *HumanListHeaders) GetContentRange() int
GetContentRange returns the value of ContentRange.
func (*HumanListHeaders) GetResponse ¶
func (s *HumanListHeaders) GetResponse() HumanList
GetResponse returns the value of Response.
func (*HumanListHeaders) SetContentRange ¶
func (s *HumanListHeaders) SetContentRange(val int)
SetContentRange sets the value of ContentRange.
func (*HumanListHeaders) SetResponse ¶
func (s *HumanListHeaders) SetResponse(val HumanList)
SetResponse sets the value of Response.
func (*HumanListHeaders) Validate ¶
func (s *HumanListHeaders) Validate() error
type Invoker ¶
type Invoker interface { // CreateHuman invokes createHuman operation. // // Create a new Human and persists it to storage. // // POST /human CreateHuman(ctx context.Context, request *CreateHuman) (CreateHumanRes, error) // DeleteHuman invokes deleteHuman operation. // // Delete Human. // // DELETE /human/{id} DeleteHuman(ctx context.Context, params DeleteHumanParams) (DeleteHumanRes, error) // ListHuman invokes listHuman operation. // // List for Humans. // // GET /human ListHuman(ctx context.Context, params ListHumanParams) (ListHumanRes, error) // ReadHuman invokes readHuman operation. // // Finds the Human with the requested ID and returns it. // // GET /human/{id} ReadHuman(ctx context.Context, params ReadHumanParams) (ReadHumanRes, error) // UpdateHuman invokes updateHuman operation. // // Update Human and persists it to storage. // // PUT /human/{id} UpdateHuman(ctx context.Context, request *UpdateHuman, params UpdateHumanParams) (UpdateHumanRes, error) }
Invoker invokes operations described by OpenAPI v3 specification.
type ListHumanBadRequestApplicationJSON ¶
type ListHumanBadRequestApplicationJSON []R400Item
func (*ListHumanBadRequestApplicationJSON) Decode ¶
func (s *ListHumanBadRequestApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListHumanBadRequestApplicationJSON from json.
func (ListHumanBadRequestApplicationJSON) Encode ¶
func (s ListHumanBadRequestApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListHumanBadRequestApplicationJSON as json.
func (ListHumanBadRequestApplicationJSON) MarshalJSON ¶
func (s ListHumanBadRequestApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListHumanBadRequestApplicationJSON) UnmarshalJSON ¶
func (s *ListHumanBadRequestApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListHumanBadRequestApplicationJSON) Validate ¶
func (s ListHumanBadRequestApplicationJSON) Validate() error
type ListHumanConflictApplicationJSON ¶
type ListHumanConflictApplicationJSON []R409Item
func (*ListHumanConflictApplicationJSON) Decode ¶
func (s *ListHumanConflictApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListHumanConflictApplicationJSON from json.
func (ListHumanConflictApplicationJSON) Encode ¶
func (s ListHumanConflictApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListHumanConflictApplicationJSON as json.
func (ListHumanConflictApplicationJSON) MarshalJSON ¶
func (s ListHumanConflictApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListHumanConflictApplicationJSON) UnmarshalJSON ¶
func (s *ListHumanConflictApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListHumanConflictApplicationJSON) Validate ¶
func (s ListHumanConflictApplicationJSON) Validate() error
type ListHumanInternalServerErrorApplicationJSON ¶
type ListHumanInternalServerErrorApplicationJSON []R500Item
func (*ListHumanInternalServerErrorApplicationJSON) Decode ¶
func (s *ListHumanInternalServerErrorApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListHumanInternalServerErrorApplicationJSON from json.
func (ListHumanInternalServerErrorApplicationJSON) Encode ¶
func (s ListHumanInternalServerErrorApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListHumanInternalServerErrorApplicationJSON as json.
func (ListHumanInternalServerErrorApplicationJSON) MarshalJSON ¶
func (s ListHumanInternalServerErrorApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListHumanInternalServerErrorApplicationJSON) UnmarshalJSON ¶
func (s *ListHumanInternalServerErrorApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListHumanInternalServerErrorApplicationJSON) Validate ¶
func (s ListHumanInternalServerErrorApplicationJSON) Validate() error
type ListHumanNotFoundApplicationJSON ¶
type ListHumanNotFoundApplicationJSON []R404Item
func (*ListHumanNotFoundApplicationJSON) Decode ¶
func (s *ListHumanNotFoundApplicationJSON) Decode(d *jx.Decoder) error
Decode decodes ListHumanNotFoundApplicationJSON from json.
func (ListHumanNotFoundApplicationJSON) Encode ¶
func (s ListHumanNotFoundApplicationJSON) Encode(e *jx.Encoder)
Encode encodes ListHumanNotFoundApplicationJSON as json.
func (ListHumanNotFoundApplicationJSON) MarshalJSON ¶
func (s ListHumanNotFoundApplicationJSON) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ListHumanNotFoundApplicationJSON) UnmarshalJSON ¶
func (s *ListHumanNotFoundApplicationJSON) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (ListHumanNotFoundApplicationJSON) Validate ¶
func (s ListHumanNotFoundApplicationJSON) Validate() error
type ListHumanParams ¶
type ListHumanParams struct { // What page to render. Page OptInt // Item count to render per page. ItemsPerPage OptInt }
ListHumanParams is parameters of listHuman operation.
type ListHumanRes ¶
type ListHumanRes interface {
// contains filtered or unexported methods
}
type OptInt ¶
OptInt is optional int.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptUUID ¶
OptUUID is optional uuid.UUID.
func NewOptUUID ¶
NewOptUUID returns new OptUUID with value set to v.
func (OptUUID) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptUUID) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type Option ¶
type Option interface { ServerOption ClientOption }
Option is config option.
func WithMeterProvider ¶
func WithMeterProvider(provider metric.MeterProvider) Option
WithMeterProvider specifies a meter provider to use for creating a meter.
If none is specified, the otel.GetMeterProvider() is used.
func WithTracerProvider ¶
func WithTracerProvider(provider trace.TracerProvider) Option
WithTracerProvider specifies a tracer provider to use for creating a tracer.
If none is specified, the global provider is used.
type R400Item ¶
func (*R400Item) GetMessage ¶
GetMessage returns the value of Message.
func (*R400Item) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R400Item) SetMessage ¶
SetMessage sets the value of Message.
func (*R400Item) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R404Item ¶
func (*R404Item) GetMessage ¶
GetMessage returns the value of Message.
func (*R404Item) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R404Item) SetMessage ¶
SetMessage sets the value of Message.
func (*R404Item) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R409Item ¶
func (*R409Item) GetMessage ¶
GetMessage returns the value of Message.
func (*R409Item) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R409Item) SetMessage ¶
SetMessage sets the value of Message.
func (*R409Item) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type R500Item ¶
func (*R500Item) GetMessage ¶
GetMessage returns the value of Message.
func (*R500Item) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*R500Item) SetMessage ¶
SetMessage sets the value of Message.
func (*R500Item) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ReadHumanParams ¶
ReadHumanParams is parameters of readHuman operation.
type ReadHumanRes ¶
type ReadHumanRes interface {
// contains filtered or unexported methods
}
type Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server implements http server based on OpenAPI v3 specification and calls Handler to handle requests.
func NewServer ¶
func NewServer(h Handler, opts ...ServerOption) (*Server, error)
NewServer creates new Server.
type ServerOption ¶
type ServerOption interface {
// contains filtered or unexported methods
}
ServerOption is server config option.
func WithErrorHandler ¶
func WithErrorHandler(h ErrorHandler) ServerOption
WithErrorHandler specifies error handler to use.
func WithMaxMultipartMemory ¶
func WithMaxMultipartMemory(max int64) ServerOption
WithMaxMultipartMemory specifies limit of memory for storing file parts. File parts which can't be stored in memory will be stored on disk in temporary files.
func WithMethodNotAllowed ¶
func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
WithMethodNotAllowed specifies Method Not Allowed handler to use.
func WithMiddleware ¶
func WithMiddleware(m ...Middleware) ServerOption
WithMiddleware specifies middlewares to use.
func WithNotFound ¶
func WithNotFound(notFound http.HandlerFunc) ServerOption
WithNotFound specifies Not Found handler to use.
func WithPathPrefix ¶
func WithPathPrefix(prefix string) ServerOption
WithPathPrefix specifies server path prefix.
type UnimplementedHandler ¶
type UnimplementedHandler struct{}
UnimplementedHandler is no-op Handler which returns http.ErrNotImplemented.
func (UnimplementedHandler) CreateHuman ¶
func (UnimplementedHandler) CreateHuman(ctx context.Context, req *CreateHuman) (r CreateHumanRes, _ error)
CreateHuman implements createHuman operation.
Create a new Human and persists it to storage.
POST /human
func (UnimplementedHandler) DeleteHuman ¶
func (UnimplementedHandler) DeleteHuman(ctx context.Context, params DeleteHumanParams) (r DeleteHumanRes, _ error)
DeleteHuman implements deleteHuman operation.
Delete Human.
DELETE /human/{id}
func (UnimplementedHandler) ListHuman ¶
func (UnimplementedHandler) ListHuman(ctx context.Context, params ListHumanParams) (r ListHumanRes, _ error)
ListHuman implements listHuman operation.
List for Humans.
GET /human
func (UnimplementedHandler) NewError ¶
func (UnimplementedHandler) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
NewError creates *ErrorStatusCode from error returned by handler.
Used for common default response.
func (UnimplementedHandler) ReadHuman ¶
func (UnimplementedHandler) ReadHuman(ctx context.Context, params ReadHumanParams) (r ReadHumanRes, _ error)
ReadHuman implements readHuman operation.
Finds the Human with the requested ID and returns it.
GET /human/{id}
func (UnimplementedHandler) UpdateHuman ¶
func (UnimplementedHandler) UpdateHuman(ctx context.Context, req *UpdateHuman, params UpdateHumanParams) (r UpdateHumanRes, _ error)
UpdateHuman implements updateHuman operation.
Update Human and persists it to storage.
PUT /human/{id}
type UpdateHuman ¶
Ref: #/components/schemas/UpdateHuman
func (*UpdateHuman) Decode ¶
func (s *UpdateHuman) Decode(d *jx.Decoder) error
Decode decodes UpdateHuman from json.
func (*UpdateHuman) Encode ¶
func (s *UpdateHuman) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UpdateHuman) GetName ¶
func (s *UpdateHuman) GetName() OptString
GetName returns the value of Name.
func (*UpdateHuman) MarshalJSON ¶
func (s *UpdateHuman) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UpdateHuman) SetName ¶
func (s *UpdateHuman) SetName(val OptString)
SetName sets the value of Name.
func (*UpdateHuman) UnmarshalJSON ¶
func (s *UpdateHuman) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type UpdateHumanParams ¶
UpdateHumanParams is parameters of updateHuman operation.
type UpdateHumanRes ¶
type UpdateHumanRes interface {
// contains filtered or unexported methods
}
Source Files ¶
- handler.go
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_parameters_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go
- responses.go