api

package
v0.0.0-...-1f5b4f5 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 11, 2024 License: MIT Imports: 27 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WithServerURL

func WithServerURL(ctx context.Context, u *url.URL) context.Context

WithServerURL sets context key to override server URL.

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

type Category struct {
	ID     int    `json:"id"`
	Title  string `json:"title"`
	Public bool   `json:"public"`
}

Ref: #

func (*Category) Decode

func (s *Category) Decode(d *jx.Decoder) error

Decode decodes Category from json.

func (*Category) Encode

func (s *Category) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Category) GetID

func (s *Category) GetID() int

GetID returns the value of ID.

func (*Category) GetPublic

func (s *Category) GetPublic() bool

GetPublic returns the value of Public.

func (*Category) GetTitle

func (s *Category) GetTitle() string

GetTitle returns the value of Title.

func (*Category) MarshalJSON

func (s *Category) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Category) SetID

func (s *Category) SetID(val int)

SetID sets the value of ID.

func (*Category) SetPublic

func (s *Category) SetPublic(val bool)

SetPublic sets the value of Public.

func (*Category) SetTitle

func (s *Category) SetTitle(val string)

SetTitle sets the value of Title.

func (*Category) UnmarshalJSON

func (s *Category) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type CategoryPost

type CategoryPost struct {
	Title  string `json:"title"`
	Public bool   `json:"public"`
}

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

type CategoryPut struct {
	Title  OptString `json:"title"`
	Public OptBool   `json:"public"`
}

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) Decode

func (s *Error) Decode(d *jx.Decoder) error

Decode decodes Error from json.

func (*Error) Encode

func (s *Error) Encode(e *jx.Encoder)

Encode implements json.Marshaler.

func (*Error) GetDetails

func (s *Error) GetDetails() ErrorDetails

GetDetails returns the value of Details.

func (*Error) GetMessage

func (s *Error) GetMessage() string

GetMessage returns the value of Message.

func (*Error) MarshalJSON

func (s *Error) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (*Error) SetDetails

func (s *Error) SetDetails(val ErrorDetails)

SetDetails sets the value of Details.

func (*Error) SetMessage

func (s *Error) SetMessage(val string)

SetMessage sets the value of Message.

func (*Error) UnmarshalJSON

func (s *Error) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type ErrorDetails

type ErrorDetails map[string]jx.Raw

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 ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorStatusCode

type ErrorStatusCode struct {
	StatusCode int
	Response   Error
}

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

func LabelerFromContext(ctx context.Context) (*Labeler, bool)

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) Add

func (l *Labeler) Add(attrs ...attribute.KeyValue)

Add attributes to the Labeler.

func (*Labeler) AttributeSet

func (l *Labeler) AttributeSet() attribute.Set

AttributeSet returns the attributes added to the Labeler as an attribute.Set.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OptBool

type OptBool struct {
	Value bool
	Set   bool
}

OptBool is optional bool.

func NewOptBool

func NewOptBool(v bool) OptBool

NewOptBool returns new OptBool with value set to v.

func (*OptBool) Decode

func (o *OptBool) Decode(d *jx.Decoder) error

Decode decodes bool from json.

func (OptBool) Encode

func (o OptBool) Encode(e *jx.Encoder)

Encode encodes bool as json.

func (OptBool) Get

func (o OptBool) Get() (v bool, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptBool) IsSet

func (o OptBool) IsSet() bool

IsSet returns true if OptBool was set.

func (OptBool) MarshalJSON

func (s OptBool) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptBool) Or

func (o OptBool) Or(d bool) bool

Or returns value if set, or given parameter if does not.

func (*OptBool) Reset

func (o *OptBool) Reset()

Reset unsets value.

func (*OptBool) SetTo

func (o *OptBool) SetTo(v bool)

SetTo sets value to v.

func (*OptBool) UnmarshalJSON

func (s *OptBool) UnmarshalJSON(data []byte) error

UnmarshalJSON implements stdjson.Unmarshaler.

type OptInt

type OptInt struct {
	Value int
	Set   bool
}

OptInt is optional int.

func NewOptInt

func NewOptInt(v int) OptInt

NewOptInt returns new OptInt with value set to v.

func (OptInt) Get

func (o OptInt) Get() (v int, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptInt) IsSet

func (o OptInt) IsSet() bool

IsSet returns true if OptInt was set.

func (OptInt) Or

func (o OptInt) Or(d int) int

Or returns value if set, or given parameter if does not.

func (*OptInt) Reset

func (o *OptInt) Reset()

Reset unsets value.

func (*OptInt) SetTo

func (o *OptInt) SetTo(v int)

SetTo sets value to v.

type OptString

type OptString struct {
	Value string
	Set   bool
}

OptString is optional string.

func NewOptString

func NewOptString(v string) OptString

NewOptString returns new OptString with value set to v.

func (*OptString) Decode

func (o *OptString) Decode(d *jx.Decoder) error

Decode decodes string from json.

func (OptString) Encode

func (o OptString) Encode(e *jx.Encoder)

Encode encodes string as json.

func (OptString) Get

func (o OptString) Get() (v string, ok bool)

Get returns value and boolean that denotes whether value was set.

func (OptString) IsSet

func (o OptString) IsSet() bool

IsSet returns true if OptString was set.

func (OptString) MarshalJSON

func (s OptString) MarshalJSON() ([]byte, error)

MarshalJSON implements stdjson.Marshaler.

func (OptString) Or

func (o OptString) Or(d string) string

Or returns value if set, or given parameter if does not.

func (*OptString) Reset

func (o *OptString) Reset()

Reset unsets value.

func (*OptString) SetTo

func (o *OptString) SetTo(v string)

SetTo sets value to v.

func (*OptString) UnmarshalJSON

func (s *OptString) UnmarshalJSON(data []byte) error

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) Args

func (r Route) Args() []string

Args returns parsed arguments.

func (Route) Name

func (r Route) Name() string

Name returns ogen operation name.

It is guaranteed to be unique and not empty.

func (Route) OperationID

func (r Route) OperationID() string

OperationID returns OpenAPI operationId.

func (Route) PathPattern

func (r Route) PathPattern() string

PathPattern returns OpenAPI path.

func (Route) Summary

func (r Route) Summary() string

Summary returns OpenAPI summary.

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.

func (*Server) FindPath

func (s *Server) FindPath(method string, u *url.URL) (r Route, _ bool)

FindPath finds Route for given method and URL.

func (*Server) FindRoute

func (s *Server) FindRoute(method, path string) (Route, bool)

FindRoute finds Route for given method and path.

Note: this method does not unescape path or handle reserved characters in path properly. Use FindPath instead.

func (*Server) ServeHTTP

func (s *Server) ServeHTTP(w http.ResponseWriter, r *http.Request)

ServeHTTP serves http request as defined by OpenAPI v3 specification, calling handler that matches the path or returning not found error.

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

V1AdminCategoriesGet implements GET /v1/admin/categories operation.

Возвращает список всех категорий с возможностью пагинации.

GET /v1/admin/categories

func (UnimplementedHandler) V1AdminCategoriesIDDelete

V1AdminCategoriesIDDelete implements DELETE /v1/admin/categories/{id} operation.

Удаляет категорию по ее уникальному идентификатору.

DELETE /v1/admin/categories/{id}

func (UnimplementedHandler) V1AdminCategoriesIDPut

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

Decode decodes V1AdminCategoriesGetBadRequest from json.

func (*V1AdminCategoriesGetBadRequest) Encode

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

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

Decode decodes V1AdminCategoriesGetUnauthorized from json.

func (*V1AdminCategoriesGetUnauthorized) Encode

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

Decode decodes V1AdminCategoriesIDDeleteConflict from json.

func (*V1AdminCategoriesIDDeleteConflict) Encode

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

Decode decodes V1AdminCategoriesIDDeleteNotFound from json.

func (*V1AdminCategoriesIDDeleteNotFound) Encode

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

Decode decodes V1AdminCategoriesIDDeleteUnauthorized from json.

func (*V1AdminCategoriesIDDeleteUnauthorized) Encode

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

Decode decodes V1AdminCategoriesIDPutBadRequest from json.

func (*V1AdminCategoriesIDPutBadRequest) Encode

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

Decode decodes V1AdminCategoriesIDPutConflict from json.

func (*V1AdminCategoriesIDPutConflict) Encode

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

Decode decodes V1AdminCategoriesIDPutNotFound from json.

func (*V1AdminCategoriesIDPutNotFound) Encode

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

Decode decodes V1AdminCategoriesIDPutUnauthorized from json.

func (*V1AdminCategoriesIDPutUnauthorized) Encode

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

Decode decodes V1AdminCategoriesPostBadRequest from json.

func (*V1AdminCategoriesPostBadRequest) Encode

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

Decode decodes V1AdminCategoriesPostConflict from json.

func (*V1AdminCategoriesPostConflict) Encode

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

Decode decodes V1AdminCategoriesPostUnauthorized from json.

func (*V1AdminCategoriesPostUnauthorized) Encode

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL