Documentation ¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type BearerAuth
- type CategoriesResp
- func (s *CategoriesResp) Decode(d *jx.Decoder) error
- func (s *CategoriesResp) Encode(e *jx.Encoder)
- func (s *CategoriesResp) GetData() []Category
- func (s *CategoriesResp) GetPage() int
- func (s *CategoriesResp) GetPages() int
- func (s *CategoriesResp) GetPerPage() int
- func (s *CategoriesResp) MarshalJSON() ([]byte, error)
- func (s *CategoriesResp) SetData(val []Category)
- func (s *CategoriesResp) SetPage(val int)
- func (s *CategoriesResp) SetPages(val int)
- func (s *CategoriesResp) SetPerPage(val int)
- func (s *CategoriesResp) UnmarshalJSON(data []byte) error
- func (s *CategoriesResp) Validate() error
- type Category
- func (s *Category) Decode(d *jx.Decoder) error
- func (s *Category) Encode(e *jx.Encoder)
- func (s *Category) GetID() int
- func (s *Category) GetPublic() bool
- func (s *Category) GetTitle() string
- func (s *Category) MarshalJSON() ([]byte, error)
- func (s *Category) SetID(val int)
- func (s *Category) SetPublic(val bool)
- func (s *Category) SetTitle(val string)
- func (s *Category) UnmarshalJSON(data []byte) error
- type CategoryPost
- func (s *CategoryPost) Decode(d *jx.Decoder) error
- func (s *CategoryPost) Encode(e *jx.Encoder)
- func (s *CategoryPost) GetPublic() bool
- func (s *CategoryPost) GetTitle() string
- func (s *CategoryPost) MarshalJSON() ([]byte, error)
- func (s *CategoryPost) SetPublic(val bool)
- func (s *CategoryPost) SetTitle(val string)
- func (s *CategoryPost) UnmarshalJSON(data []byte) error
- func (s *CategoryPost) Validate() error
- type CategoryPut
- func (s *CategoryPut) Decode(d *jx.Decoder) error
- func (s *CategoryPut) Encode(e *jx.Encoder)
- func (s *CategoryPut) GetPublic() OptBool
- func (s *CategoryPut) GetTitle() OptString
- func (s *CategoryPut) MarshalJSON() ([]byte, error)
- func (s *CategoryPut) SetPublic(val OptBool)
- func (s *CategoryPut) SetTitle(val OptString)
- func (s *CategoryPut) UnmarshalJSON(data []byte) error
- func (s *CategoryPut) Validate() error
- type Client
- func (c *Client) V1AdminCategoriesGet(ctx context.Context, params V1AdminCategoriesGetParams) (V1AdminCategoriesGetRes, error)
- func (c *Client) V1AdminCategoriesIDDelete(ctx context.Context, params V1AdminCategoriesIDDeleteParams) (V1AdminCategoriesIDDeleteRes, error)
- func (c *Client) V1AdminCategoriesIDPut(ctx context.Context, request *CategoryPut, params V1AdminCategoriesIDPutParams) (V1AdminCategoriesIDPutRes, error)
- func (c *Client) V1AdminCategoriesPost(ctx context.Context, request *CategoryPost) (V1AdminCategoriesPostRes, error)
- type ClientOption
- type Error
- func (s *Error) Decode(d *jx.Decoder) error
- func (s *Error) Encode(e *jx.Encoder)
- func (s *Error) GetDetails() ErrorDetails
- func (s *Error) GetMessage() string
- func (s *Error) MarshalJSON() ([]byte, error)
- func (s *Error) SetDetails(val ErrorDetails)
- func (s *Error) SetMessage(val string)
- func (s *Error) UnmarshalJSON(data []byte) error
- type ErrorDetails
- type ErrorHandler
- type ErrorStatusCode
- type Handler
- type Invoker
- type Labeler
- type Middleware
- type OptBool
- func (o *OptBool) Decode(d *jx.Decoder) error
- func (o OptBool) Encode(e *jx.Encoder)
- func (o OptBool) Get() (v bool, ok bool)
- func (o OptBool) IsSet() bool
- func (s OptBool) MarshalJSON() ([]byte, error)
- func (o OptBool) Or(d bool) bool
- func (o *OptBool) Reset()
- func (o *OptBool) SetTo(v bool)
- func (s *OptBool) UnmarshalJSON(data []byte) error
- 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 Option
- type Route
- type SecurityHandler
- type SecuritySource
- 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) NewError(ctx context.Context, err error) (r *ErrorStatusCode)
- func (UnimplementedHandler) V1AdminCategoriesGet(ctx context.Context, params V1AdminCategoriesGetParams) (r V1AdminCategoriesGetRes, _ error)
- func (UnimplementedHandler) V1AdminCategoriesIDDelete(ctx context.Context, params V1AdminCategoriesIDDeleteParams) (r V1AdminCategoriesIDDeleteRes, _ error)
- func (UnimplementedHandler) V1AdminCategoriesIDPut(ctx context.Context, req *CategoryPut, params V1AdminCategoriesIDPutParams) (r V1AdminCategoriesIDPutRes, _ error)
- func (UnimplementedHandler) V1AdminCategoriesPost(ctx context.Context, req *CategoryPost) (r V1AdminCategoriesPostRes, _ error)
- type V1AdminCategoriesGetBadRequest
- type V1AdminCategoriesGetNotFound
- type V1AdminCategoriesGetParams
- type V1AdminCategoriesGetRes
- type V1AdminCategoriesGetUnauthorized
- type V1AdminCategoriesIDDeleteConflict
- type V1AdminCategoriesIDDeleteNoContent
- type V1AdminCategoriesIDDeleteNotFound
- type V1AdminCategoriesIDDeleteParams
- type V1AdminCategoriesIDDeleteRes
- type V1AdminCategoriesIDDeleteUnauthorized
- func (s *V1AdminCategoriesIDDeleteUnauthorized) Decode(d *jx.Decoder) error
- func (s *V1AdminCategoriesIDDeleteUnauthorized) Encode(e *jx.Encoder)
- func (s *V1AdminCategoriesIDDeleteUnauthorized) MarshalJSON() ([]byte, error)
- func (s *V1AdminCategoriesIDDeleteUnauthorized) UnmarshalJSON(data []byte) error
- type V1AdminCategoriesIDPutBadRequest
- type V1AdminCategoriesIDPutConflict
- type V1AdminCategoriesIDPutNotFound
- type V1AdminCategoriesIDPutParams
- type V1AdminCategoriesIDPutRes
- type V1AdminCategoriesIDPutUnauthorized
- type V1AdminCategoriesPostBadRequest
- type V1AdminCategoriesPostConflict
- type V1AdminCategoriesPostRes
- type V1AdminCategoriesPostUnauthorized
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type BearerAuth ¶
type BearerAuth struct {
Token string
}
func (*BearerAuth) GetToken ¶
func (s *BearerAuth) GetToken() string
GetToken returns the value of Token.
func (*BearerAuth) SetToken ¶
func (s *BearerAuth) SetToken(val string)
SetToken sets the value of Token.
type CategoriesResp ¶
type CategoriesResp struct { Data []Category `json:"data"` Page int `json:"page"` Pages int `json:"pages"` PerPage int `json:"per_page"` }
Ref: #
func (*CategoriesResp) Decode ¶
func (s *CategoriesResp) Decode(d *jx.Decoder) error
Decode decodes CategoriesResp from json.
func (*CategoriesResp) Encode ¶
func (s *CategoriesResp) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoriesResp) GetData ¶
func (s *CategoriesResp) GetData() []Category
GetData returns the value of Data.
func (*CategoriesResp) GetPage ¶
func (s *CategoriesResp) GetPage() int
GetPage returns the value of Page.
func (*CategoriesResp) GetPages ¶
func (s *CategoriesResp) GetPages() int
GetPages returns the value of Pages.
func (*CategoriesResp) GetPerPage ¶
func (s *CategoriesResp) GetPerPage() int
GetPerPage returns the value of PerPage.
func (*CategoriesResp) MarshalJSON ¶
func (s *CategoriesResp) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoriesResp) SetData ¶
func (s *CategoriesResp) SetData(val []Category)
SetData sets the value of Data.
func (*CategoriesResp) SetPage ¶
func (s *CategoriesResp) SetPage(val int)
SetPage sets the value of Page.
func (*CategoriesResp) SetPages ¶
func (s *CategoriesResp) SetPages(val int)
SetPages sets the value of Pages.
func (*CategoriesResp) SetPerPage ¶
func (s *CategoriesResp) SetPerPage(val int)
SetPerPage sets the value of PerPage.
func (*CategoriesResp) UnmarshalJSON ¶
func (s *CategoriesResp) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoriesResp) Validate ¶
func (s *CategoriesResp) Validate() error
type Category ¶
Ref: #
func (*Category) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Category) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type CategoryPost ¶
Ref: #
func (*CategoryPost) Decode ¶
func (s *CategoryPost) Decode(d *jx.Decoder) error
Decode decodes CategoryPost from json.
func (*CategoryPost) Encode ¶
func (s *CategoryPost) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryPost) GetPublic ¶
func (s *CategoryPost) GetPublic() bool
GetPublic returns the value of Public.
func (*CategoryPost) GetTitle ¶
func (s *CategoryPost) GetTitle() string
GetTitle returns the value of Title.
func (*CategoryPost) MarshalJSON ¶
func (s *CategoryPost) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryPost) SetPublic ¶
func (s *CategoryPost) SetPublic(val bool)
SetPublic sets the value of Public.
func (*CategoryPost) SetTitle ¶
func (s *CategoryPost) SetTitle(val string)
SetTitle sets the value of Title.
func (*CategoryPost) UnmarshalJSON ¶
func (s *CategoryPost) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoryPost) Validate ¶
func (s *CategoryPost) Validate() error
type CategoryPut ¶
Ref: #
func (*CategoryPut) Decode ¶
func (s *CategoryPut) Decode(d *jx.Decoder) error
Decode decodes CategoryPut from json.
func (*CategoryPut) Encode ¶
func (s *CategoryPut) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*CategoryPut) GetPublic ¶
func (s *CategoryPut) GetPublic() OptBool
GetPublic returns the value of Public.
func (*CategoryPut) GetTitle ¶
func (s *CategoryPut) GetTitle() OptString
GetTitle returns the value of Title.
func (*CategoryPut) MarshalJSON ¶
func (s *CategoryPut) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*CategoryPut) SetPublic ¶
func (s *CategoryPut) SetPublic(val OptBool)
SetPublic sets the value of Public.
func (*CategoryPut) SetTitle ¶
func (s *CategoryPut) SetTitle(val OptString)
SetTitle sets the value of Title.
func (*CategoryPut) UnmarshalJSON ¶
func (s *CategoryPut) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*CategoryPut) Validate ¶
func (s *CategoryPut) Validate() error
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client implements OAS client.
func NewClient ¶
func NewClient(serverURL string, sec SecuritySource, opts ...ClientOption) (*Client, error)
NewClient initializes new Client defined by OAS.
func (*Client) V1AdminCategoriesGet ¶
func (c *Client) V1AdminCategoriesGet(ctx context.Context, params V1AdminCategoriesGetParams) (V1AdminCategoriesGetRes, error)
V1AdminCategoriesGet invokes GET /v1/admin/categories operation.
Возвращает список всех категорий с возможностью пагинации.
GET /v1/admin/categories
func (*Client) V1AdminCategoriesIDDelete ¶
func (c *Client) V1AdminCategoriesIDDelete(ctx context.Context, params V1AdminCategoriesIDDeleteParams) (V1AdminCategoriesIDDeleteRes, error)
V1AdminCategoriesIDDelete invokes DELETE /v1/admin/categories/{id} operation.
Удаляет категорию по ее уникальному идентификатору.
DELETE /v1/admin/categories/{id}
func (*Client) V1AdminCategoriesIDPut ¶
func (c *Client) V1AdminCategoriesIDPut(ctx context.Context, request *CategoryPut, params V1AdminCategoriesIDPutParams) (V1AdminCategoriesIDPutRes, error)
V1AdminCategoriesIDPut invokes PUT /v1/admin/categories/{id} operation.
Обновляет категорию.
PUT /v1/admin/categories/{id}
func (*Client) V1AdminCategoriesPost ¶
func (c *Client) V1AdminCategoriesPost(ctx context.Context, request *CategoryPost) (V1AdminCategoriesPostRes, error)
V1AdminCategoriesPost invokes POST /v1/admin/categories operation.
Создает новую категорию.
POST /v1/admin/categories
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 Error ¶
type Error struct { // Error message. Message string `json:"message"` Details ErrorDetails `json:"details"` }
Ref: #
func (*Error) GetDetails ¶
func (s *Error) GetDetails() ErrorDetails
GetDetails returns the value of Details.
func (*Error) GetMessage ¶
GetMessage returns the value of Message.
func (*Error) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Error) SetDetails ¶
func (s *Error) SetDetails(val ErrorDetails)
SetDetails sets the value of Details.
func (*Error) SetMessage ¶
SetMessage sets the value of Message.
func (*Error) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorDetails ¶
func (*ErrorDetails) Decode ¶
func (s *ErrorDetails) Decode(d *jx.Decoder) error
Decode decodes ErrorDetails from json.
func (ErrorDetails) Encode ¶
func (s ErrorDetails) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (ErrorDetails) MarshalJSON ¶
func (s ErrorDetails) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*ErrorDetails) UnmarshalJSON ¶
func (s *ErrorDetails) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type ErrorStatusCode ¶
ErrorStatusCode wraps Error with StatusCode.
func (*ErrorStatusCode) Error ¶
func (s *ErrorStatusCode) Error() string
func (*ErrorStatusCode) GetResponse ¶
func (s *ErrorStatusCode) GetResponse() Error
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 Error)
SetResponse sets the value of Response.
func (*ErrorStatusCode) SetStatusCode ¶
func (s *ErrorStatusCode) SetStatusCode(val int)
SetStatusCode sets the value of StatusCode.
type Handler ¶
type Handler interface { // V1AdminCategoriesGet implements GET /v1/admin/categories operation. // // Возвращает список всех категорий с возможностью // пагинации. // // GET /v1/admin/categories V1AdminCategoriesGet(ctx context.Context, params V1AdminCategoriesGetParams) (V1AdminCategoriesGetRes, error) // V1AdminCategoriesIDDelete implements DELETE /v1/admin/categories/{id} operation. // // Удаляет категорию по ее уникальному идентификатору. // // DELETE /v1/admin/categories/{id} V1AdminCategoriesIDDelete(ctx context.Context, params V1AdminCategoriesIDDeleteParams) (V1AdminCategoriesIDDeleteRes, error) // V1AdminCategoriesIDPut implements PUT /v1/admin/categories/{id} operation. // // Обновляет категорию. // // PUT /v1/admin/categories/{id} V1AdminCategoriesIDPut(ctx context.Context, req *CategoryPut, params V1AdminCategoriesIDPutParams) (V1AdminCategoriesIDPutRes, error) // V1AdminCategoriesPost implements POST /v1/admin/categories operation. // // Создает новую категорию. // // POST /v1/admin/categories V1AdminCategoriesPost(ctx context.Context, req *CategoryPost) (V1AdminCategoriesPostRes, 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 Invoker ¶
type Invoker interface { // V1AdminCategoriesGet invokes GET /v1/admin/categories operation. // // Возвращает список всех категорий с возможностью // пагинации. // // GET /v1/admin/categories V1AdminCategoriesGet(ctx context.Context, params V1AdminCategoriesGetParams) (V1AdminCategoriesGetRes, error) // V1AdminCategoriesIDDelete invokes DELETE /v1/admin/categories/{id} operation. // // Удаляет категорию по ее уникальному идентификатору. // // DELETE /v1/admin/categories/{id} V1AdminCategoriesIDDelete(ctx context.Context, params V1AdminCategoriesIDDeleteParams) (V1AdminCategoriesIDDeleteRes, error) // V1AdminCategoriesIDPut invokes PUT /v1/admin/categories/{id} operation. // // Обновляет категорию. // // PUT /v1/admin/categories/{id} V1AdminCategoriesIDPut(ctx context.Context, request *CategoryPut, params V1AdminCategoriesIDPutParams) (V1AdminCategoriesIDPutRes, error) // V1AdminCategoriesPost invokes POST /v1/admin/categories operation. // // Создает новую категорию. // // POST /v1/admin/categories V1AdminCategoriesPost(ctx context.Context, request *CategoryPost) (V1AdminCategoriesPostRes, error) }
Invoker invokes operations described by OpenAPI v3 specification.
type Labeler ¶
type Labeler struct {
// contains filtered or unexported fields
}
Labeler is used to allow adding custom attributes to the server request metrics.
func LabelerFromContext ¶
LabelerFromContext retrieves the Labeler from the provided context, if present.
If no Labeler was found in the provided context a new, empty Labeler is returned and the second return value is false. In this case it is safe to use the Labeler but any attributes added to it will not be used.
func (*Labeler) AttributeSet ¶
AttributeSet returns the attributes added to the Labeler as an attribute.Set.
type OptBool ¶
OptBool is optional bool.
func NewOptBool ¶
NewOptBool returns new OptBool with value set to v.
func (OptBool) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptBool) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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 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 Route ¶
type Route struct {
// contains filtered or unexported fields
}
Route is route object.
func (Route) OperationID ¶
OperationID returns OpenAPI operationId.
type SecurityHandler ¶
type SecurityHandler interface { // HandleBearerAuth handles bearerAuth security. HandleBearerAuth(ctx context.Context, operationName string, t BearerAuth) (context.Context, error) }
SecurityHandler is handler for security parameters.
type SecuritySource ¶
type SecuritySource interface { // BearerAuth provides bearerAuth security value. BearerAuth(ctx context.Context, operationName string) (BearerAuth, error) }
SecuritySource is provider of security values (tokens, passwords, etc.).
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, sec SecurityHandler, 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) 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) V1AdminCategoriesGet ¶
func (UnimplementedHandler) V1AdminCategoriesGet(ctx context.Context, params V1AdminCategoriesGetParams) (r V1AdminCategoriesGetRes, _ error)
V1AdminCategoriesGet implements GET /v1/admin/categories operation.
Возвращает список всех категорий с возможностью пагинации.
GET /v1/admin/categories
func (UnimplementedHandler) V1AdminCategoriesIDDelete ¶
func (UnimplementedHandler) V1AdminCategoriesIDDelete(ctx context.Context, params V1AdminCategoriesIDDeleteParams) (r V1AdminCategoriesIDDeleteRes, _ error)
V1AdminCategoriesIDDelete implements DELETE /v1/admin/categories/{id} operation.
Удаляет категорию по ее уникальному идентификатору.
DELETE /v1/admin/categories/{id}
func (UnimplementedHandler) V1AdminCategoriesIDPut ¶
func (UnimplementedHandler) V1AdminCategoriesIDPut(ctx context.Context, req *CategoryPut, params V1AdminCategoriesIDPutParams) (r V1AdminCategoriesIDPutRes, _ error)
V1AdminCategoriesIDPut implements PUT /v1/admin/categories/{id} operation.
Обновляет категорию.
PUT /v1/admin/categories/{id}
func (UnimplementedHandler) V1AdminCategoriesPost ¶
func (UnimplementedHandler) V1AdminCategoriesPost(ctx context.Context, req *CategoryPost) (r V1AdminCategoriesPostRes, _ error)
V1AdminCategoriesPost implements POST /v1/admin/categories operation.
Создает новую категорию.
POST /v1/admin/categories
type V1AdminCategoriesGetBadRequest ¶
type V1AdminCategoriesGetBadRequest Error
func (*V1AdminCategoriesGetBadRequest) Decode ¶
func (s *V1AdminCategoriesGetBadRequest) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesGetBadRequest from json.
func (*V1AdminCategoriesGetBadRequest) Encode ¶
func (s *V1AdminCategoriesGetBadRequest) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesGetBadRequest as json.
func (*V1AdminCategoriesGetBadRequest) MarshalJSON ¶
func (s *V1AdminCategoriesGetBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesGetBadRequest) UnmarshalJSON ¶
func (s *V1AdminCategoriesGetBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesGetNotFound ¶
type V1AdminCategoriesGetNotFound Error
func (*V1AdminCategoriesGetNotFound) Decode ¶
func (s *V1AdminCategoriesGetNotFound) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesGetNotFound from json.
func (*V1AdminCategoriesGetNotFound) Encode ¶
func (s *V1AdminCategoriesGetNotFound) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesGetNotFound as json.
func (*V1AdminCategoriesGetNotFound) MarshalJSON ¶
func (s *V1AdminCategoriesGetNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesGetNotFound) UnmarshalJSON ¶
func (s *V1AdminCategoriesGetNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesGetParams ¶
type V1AdminCategoriesGetParams struct { // Номер страницы для пагинации. Page OptInt // Количество категорий на странице. PerPage OptInt }
V1AdminCategoriesGetParams is parameters of GET /v1/admin/categories operation.
type V1AdminCategoriesGetRes ¶
type V1AdminCategoriesGetRes interface {
// contains filtered or unexported methods
}
type V1AdminCategoriesGetUnauthorized ¶
type V1AdminCategoriesGetUnauthorized Error
func (*V1AdminCategoriesGetUnauthorized) Decode ¶
func (s *V1AdminCategoriesGetUnauthorized) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesGetUnauthorized from json.
func (*V1AdminCategoriesGetUnauthorized) Encode ¶
func (s *V1AdminCategoriesGetUnauthorized) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesGetUnauthorized as json.
func (*V1AdminCategoriesGetUnauthorized) MarshalJSON ¶
func (s *V1AdminCategoriesGetUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesGetUnauthorized) UnmarshalJSON ¶
func (s *V1AdminCategoriesGetUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesIDDeleteConflict ¶
type V1AdminCategoriesIDDeleteConflict Error
func (*V1AdminCategoriesIDDeleteConflict) Decode ¶
func (s *V1AdminCategoriesIDDeleteConflict) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesIDDeleteConflict from json.
func (*V1AdminCategoriesIDDeleteConflict) Encode ¶
func (s *V1AdminCategoriesIDDeleteConflict) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesIDDeleteConflict as json.
func (*V1AdminCategoriesIDDeleteConflict) MarshalJSON ¶
func (s *V1AdminCategoriesIDDeleteConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesIDDeleteConflict) UnmarshalJSON ¶
func (s *V1AdminCategoriesIDDeleteConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesIDDeleteNoContent ¶
type V1AdminCategoriesIDDeleteNoContent struct{}
V1AdminCategoriesIDDeleteNoContent is response for V1AdminCategoriesIDDelete operation.
type V1AdminCategoriesIDDeleteNotFound ¶
type V1AdminCategoriesIDDeleteNotFound Error
func (*V1AdminCategoriesIDDeleteNotFound) Decode ¶
func (s *V1AdminCategoriesIDDeleteNotFound) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesIDDeleteNotFound from json.
func (*V1AdminCategoriesIDDeleteNotFound) Encode ¶
func (s *V1AdminCategoriesIDDeleteNotFound) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesIDDeleteNotFound as json.
func (*V1AdminCategoriesIDDeleteNotFound) MarshalJSON ¶
func (s *V1AdminCategoriesIDDeleteNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesIDDeleteNotFound) UnmarshalJSON ¶
func (s *V1AdminCategoriesIDDeleteNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesIDDeleteParams ¶
type V1AdminCategoriesIDDeleteParams struct { // Уникальный идентификатор категории. ID int }
V1AdminCategoriesIDDeleteParams is parameters of DELETE /v1/admin/categories/{id} operation.
type V1AdminCategoriesIDDeleteRes ¶
type V1AdminCategoriesIDDeleteRes interface {
// contains filtered or unexported methods
}
type V1AdminCategoriesIDDeleteUnauthorized ¶
type V1AdminCategoriesIDDeleteUnauthorized Error
func (*V1AdminCategoriesIDDeleteUnauthorized) Decode ¶
func (s *V1AdminCategoriesIDDeleteUnauthorized) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesIDDeleteUnauthorized from json.
func (*V1AdminCategoriesIDDeleteUnauthorized) Encode ¶
func (s *V1AdminCategoriesIDDeleteUnauthorized) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesIDDeleteUnauthorized as json.
func (*V1AdminCategoriesIDDeleteUnauthorized) MarshalJSON ¶
func (s *V1AdminCategoriesIDDeleteUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesIDDeleteUnauthorized) UnmarshalJSON ¶
func (s *V1AdminCategoriesIDDeleteUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesIDPutBadRequest ¶
type V1AdminCategoriesIDPutBadRequest Error
func (*V1AdminCategoriesIDPutBadRequest) Decode ¶
func (s *V1AdminCategoriesIDPutBadRequest) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesIDPutBadRequest from json.
func (*V1AdminCategoriesIDPutBadRequest) Encode ¶
func (s *V1AdminCategoriesIDPutBadRequest) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesIDPutBadRequest as json.
func (*V1AdminCategoriesIDPutBadRequest) MarshalJSON ¶
func (s *V1AdminCategoriesIDPutBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesIDPutBadRequest) UnmarshalJSON ¶
func (s *V1AdminCategoriesIDPutBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesIDPutConflict ¶
type V1AdminCategoriesIDPutConflict Error
func (*V1AdminCategoriesIDPutConflict) Decode ¶
func (s *V1AdminCategoriesIDPutConflict) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesIDPutConflict from json.
func (*V1AdminCategoriesIDPutConflict) Encode ¶
func (s *V1AdminCategoriesIDPutConflict) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesIDPutConflict as json.
func (*V1AdminCategoriesIDPutConflict) MarshalJSON ¶
func (s *V1AdminCategoriesIDPutConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesIDPutConflict) UnmarshalJSON ¶
func (s *V1AdminCategoriesIDPutConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesIDPutNotFound ¶
type V1AdminCategoriesIDPutNotFound Error
func (*V1AdminCategoriesIDPutNotFound) Decode ¶
func (s *V1AdminCategoriesIDPutNotFound) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesIDPutNotFound from json.
func (*V1AdminCategoriesIDPutNotFound) Encode ¶
func (s *V1AdminCategoriesIDPutNotFound) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesIDPutNotFound as json.
func (*V1AdminCategoriesIDPutNotFound) MarshalJSON ¶
func (s *V1AdminCategoriesIDPutNotFound) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesIDPutNotFound) UnmarshalJSON ¶
func (s *V1AdminCategoriesIDPutNotFound) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesIDPutParams ¶
type V1AdminCategoriesIDPutParams struct { // Уникальный идентификатор категории. ID int }
V1AdminCategoriesIDPutParams is parameters of PUT /v1/admin/categories/{id} operation.
type V1AdminCategoriesIDPutRes ¶
type V1AdminCategoriesIDPutRes interface {
// contains filtered or unexported methods
}
type V1AdminCategoriesIDPutUnauthorized ¶
type V1AdminCategoriesIDPutUnauthorized Error
func (*V1AdminCategoriesIDPutUnauthorized) Decode ¶
func (s *V1AdminCategoriesIDPutUnauthorized) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesIDPutUnauthorized from json.
func (*V1AdminCategoriesIDPutUnauthorized) Encode ¶
func (s *V1AdminCategoriesIDPutUnauthorized) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesIDPutUnauthorized as json.
func (*V1AdminCategoriesIDPutUnauthorized) MarshalJSON ¶
func (s *V1AdminCategoriesIDPutUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesIDPutUnauthorized) UnmarshalJSON ¶
func (s *V1AdminCategoriesIDPutUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesPostBadRequest ¶
type V1AdminCategoriesPostBadRequest Error
func (*V1AdminCategoriesPostBadRequest) Decode ¶
func (s *V1AdminCategoriesPostBadRequest) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesPostBadRequest from json.
func (*V1AdminCategoriesPostBadRequest) Encode ¶
func (s *V1AdminCategoriesPostBadRequest) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesPostBadRequest as json.
func (*V1AdminCategoriesPostBadRequest) MarshalJSON ¶
func (s *V1AdminCategoriesPostBadRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesPostBadRequest) UnmarshalJSON ¶
func (s *V1AdminCategoriesPostBadRequest) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesPostConflict ¶
type V1AdminCategoriesPostConflict Error
func (*V1AdminCategoriesPostConflict) Decode ¶
func (s *V1AdminCategoriesPostConflict) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesPostConflict from json.
func (*V1AdminCategoriesPostConflict) Encode ¶
func (s *V1AdminCategoriesPostConflict) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesPostConflict as json.
func (*V1AdminCategoriesPostConflict) MarshalJSON ¶
func (s *V1AdminCategoriesPostConflict) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesPostConflict) UnmarshalJSON ¶
func (s *V1AdminCategoriesPostConflict) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
type V1AdminCategoriesPostRes ¶
type V1AdminCategoriesPostRes interface {
// contains filtered or unexported methods
}
type V1AdminCategoriesPostUnauthorized ¶
type V1AdminCategoriesPostUnauthorized Error
func (*V1AdminCategoriesPostUnauthorized) Decode ¶
func (s *V1AdminCategoriesPostUnauthorized) Decode(d *jx.Decoder) error
Decode decodes V1AdminCategoriesPostUnauthorized from json.
func (*V1AdminCategoriesPostUnauthorized) Encode ¶
func (s *V1AdminCategoriesPostUnauthorized) Encode(e *jx.Encoder)
Encode encodes V1AdminCategoriesPostUnauthorized as json.
func (*V1AdminCategoriesPostUnauthorized) MarshalJSON ¶
func (s *V1AdminCategoriesPostUnauthorized) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*V1AdminCategoriesPostUnauthorized) UnmarshalJSON ¶
func (s *V1AdminCategoriesPostUnauthorized) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
Source Files ¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_labeler_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_security_gen.go
- oas_server_gen.go
- oas_unimplemented_gen.go
- oas_validators_gen.go