api

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2025 License: MIT Imports: 20 Imported by: 0

Documentation

Overview

Code generated by ogen, DO NOT EDIT.

Index

Constants

View Source
const (
	// CloudServer is a server URL.
	//
	CloudServer serverConst = "https://userbot.getcompass.com/api/v3"
)

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 AuthToken

type AuthToken struct {
	APIKey string
	Roles  []string
}

func (*AuthToken) GetAPIKey

func (s *AuthToken) GetAPIKey() string

GetAPIKey returns the value of APIKey.

func (*AuthToken) GetRoles

func (s *AuthToken) GetRoles() []string

GetRoles returns the value of Roles.

func (*AuthToken) SetAPIKey

func (s *AuthToken) SetAPIKey(val string)

SetAPIKey sets the value of APIKey.

func (*AuthToken) SetRoles

func (s *AuthToken) SetRoles(val []string)

SetRoles sets the value of Roles.

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

func (c *Client) CommandGetListPost(ctx context.Context) (CommandGetListPostOK, error)

CommandGetListPost invokes POST /command/getList operation.

Получить список команд бота.

POST /command/getList

func (*Client) CommandUpdatePost

func (c *Client) CommandUpdatePost(ctx context.Context, request *CommandListRequest) (CommandUpdatePostOK, error)

CommandUpdatePost invokes POST /command/update operation.

Обновить список команд бота.

POST /command/update

func (*Client) FileGetUrlPost

func (c *Client) FileGetUrlPost(ctx context.Context) (FileGetUrlPostOK, error)

FileGetUrlPost invokes POST /file/getUrl operation.

Получить URL для загрузки файлов.

POST /file/getUrl

func (*Client) GroupGetListPost

func (c *Client) GroupGetListPost(ctx context.Context, request *GetListRequest) (GroupGetListPostOK, error)

GroupGetListPost invokes POST /group/getList operation.

Получить данные групп, в которых состоит бот.

POST /group/getList

func (*Client) GroupSendPost

func (c *Client) GroupSendPost(ctx context.Context, request *GroupSendRequest) (GroupSendPostOK, error)

GroupSendPost invokes POST /group/send operation.

Отправить сообщение от бота в группу.

POST /group/send

func (*Client) MessageAddReactionPost

func (c *Client) MessageAddReactionPost(ctx context.Context, request *MessageAddReactionRequest) (MessageAddReactionPostOK, error)

MessageAddReactionPost invokes POST /message/addReaction operation.

Добавить реакцию на сообщение от лица бота.

POST /message/addReaction

func (*Client) MessageRemoveReactionPost

func (c *Client) MessageRemoveReactionPost(ctx context.Context, request *MessageRemoveReactionRequest) (MessageRemoveReactionPostOK, error)

MessageRemoveReactionPost invokes POST /message/removeReaction operation.

Удалить реакцию бота с сообщения.

POST /message/removeReaction

func (*Client) Post

func (c *Client) Post(ctx context.Context, request *PostReq) (PostOK, error)

Post invokes POST / operation.

Загрузка файла.

POST /

func (*Client) ThreadSendPost

func (c *Client) ThreadSendPost(ctx context.Context, request *ThreadSendRequest) (ThreadSendPostOK, error)

ThreadSendPost invokes POST /thread/send operation.

Отправить сообщение от бота в комментарии к сообщению.

POST /thread/send

func (*Client) UserGetListPost

func (c *Client) UserGetListPost(ctx context.Context, request *GetListRequest) (UserGetListPostOK, error)

UserGetListPost invokes POST /user/getList operation.

Получить данные об участниках команды.

POST /user/getList

func (*Client) UserSendPost

func (c *Client) UserSendPost(ctx context.Context, request *UserSendRequest) (UserSendPostOK, error)

UserSendPost invokes POST /user/send operation.

Отправить сообщение от бота конкретному участнику.

POST /user/send

func (*Client) WebhookGetVersionPost

func (c *Client) WebhookGetVersionPost(ctx context.Context) (WebhookGetVersionPostOK, error)

WebhookGetVersionPost invokes POST /webhook/getVersion operation.

Получить текущую версию webhook бота.

POST /webhook/getVersion

func (*Client) WebhookSetVersionPost

func (c *Client) WebhookSetVersionPost(ctx context.Context, request *WebhookBotVersion) (WebhookSetVersionPostOK, error)

WebhookSetVersionPost invokes POST /webhook/setVersion operation.

Установить версию для webhook бота.

POST /webhook/setVersion

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 Command

type Command string

func (*Command) Decode

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

Decode decodes Command from json.

func (Command) Encode

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

Encode encodes Command as json.

func (Command) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Command) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (Command) Validate

func (s Command) Validate() error

type CommandGetListPostOK

type CommandGetListPostOK struct {
	Type                CommandGetListPostOKType // switch on this field
	CommandListResponse CommandListResponse
	ErrorResponse       ErrorResponse
}

CommandGetListPostOK represents sum type.

func NewCommandListResponseCommandGetListPostOK

func NewCommandListResponseCommandGetListPostOK(v CommandListResponse) CommandGetListPostOK

NewCommandListResponseCommandGetListPostOK returns new CommandGetListPostOK from CommandListResponse.

func NewErrorResponseCommandGetListPostOK

func NewErrorResponseCommandGetListPostOK(v ErrorResponse) CommandGetListPostOK

NewErrorResponseCommandGetListPostOK returns new CommandGetListPostOK from ErrorResponse.

func (*CommandGetListPostOK) Decode

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

Decode decodes CommandGetListPostOK from json.

func (CommandGetListPostOK) Encode

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

Encode encodes CommandGetListPostOK as json.

func (CommandGetListPostOK) GetCommandListResponse

func (s CommandGetListPostOK) GetCommandListResponse() (v CommandListResponse, ok bool)

GetCommandListResponse returns CommandListResponse and true boolean if CommandGetListPostOK is CommandListResponse.

func (CommandGetListPostOK) GetErrorResponse

func (s CommandGetListPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if CommandGetListPostOK is ErrorResponse.

func (CommandGetListPostOK) IsCommandListResponse

func (s CommandGetListPostOK) IsCommandListResponse() bool

IsCommandListResponse reports whether CommandGetListPostOK is CommandListResponse.

func (CommandGetListPostOK) IsErrorResponse

func (s CommandGetListPostOK) IsErrorResponse() bool

IsErrorResponse reports whether CommandGetListPostOK is ErrorResponse.

func (CommandGetListPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CommandGetListPostOK) SetCommandListResponse

func (s *CommandGetListPostOK) SetCommandListResponse(v CommandListResponse)

SetCommandListResponse sets CommandGetListPostOK to CommandListResponse.

func (*CommandGetListPostOK) SetErrorResponse

func (s *CommandGetListPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets CommandGetListPostOK to ErrorResponse.

func (*CommandGetListPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (CommandGetListPostOK) Validate

func (s CommandGetListPostOK) Validate() error

type CommandGetListPostOKType

type CommandGetListPostOKType string

CommandGetListPostOKType is oneOf type of CommandGetListPostOK.

const (
	CommandListResponseCommandGetListPostOK CommandGetListPostOKType = "ok"
	ErrorResponseCommandGetListPostOK       CommandGetListPostOKType = "error"
)

Possible values for CommandGetListPostOKType.

type CommandInvoker

type CommandInvoker interface {
	// CommandGetListPost invokes POST /command/getList operation.
	//
	// Получить список команд бота.
	//
	// POST /command/getList
	CommandGetListPost(ctx context.Context) (CommandGetListPostOK, error)
	// CommandUpdatePost invokes POST /command/update operation.
	//
	// Обновить список команд бота.
	//
	// POST /command/update
	CommandUpdatePost(ctx context.Context, request *CommandListRequest) (CommandUpdatePostOK, error)
}

CommandInvoker invokes operations described by OpenAPI v3 specification.

x-gen-operation-group: Command

type CommandList

type CommandList []Command

func (*CommandList) Decode

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

Decode decodes CommandList from json.

func (CommandList) Encode

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

Encode encodes CommandList as json.

func (CommandList) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CommandList) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (CommandList) Validate

func (s CommandList) Validate() error

type CommandListRequest

type CommandListRequest struct {
	CommandList CommandList `json:"command_list"`
}

Ref: #/components/schemas/CommandListRequest

func (*CommandListRequest) Decode

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

Decode decodes CommandListRequest from json.

func (*CommandListRequest) Encode

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

Encode implements json.Marshaler.

func (*CommandListRequest) GetCommandList

func (s *CommandListRequest) GetCommandList() CommandList

GetCommandList returns the value of CommandList.

func (*CommandListRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CommandListRequest) SetCommandList

func (s *CommandListRequest) SetCommandList(val CommandList)

SetCommandList sets the value of CommandList.

func (*CommandListRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CommandListRequest) Validate

func (s *CommandListRequest) Validate() error

type CommandListResponse

type CommandListResponse struct {
	Status   ResponseStatus              `json:"status"`
	Response CommandListResponseResponse `json:"response"`
}

Ref: #/components/schemas/CommandListResponse

func (*CommandListResponse) Decode

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

Decode decodes CommandListResponse from json.

func (*CommandListResponse) Encode

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

Encode implements json.Marshaler.

func (*CommandListResponse) GetResponse

GetResponse returns the value of Response.

func (*CommandListResponse) GetStatus

func (s *CommandListResponse) GetStatus() ResponseStatus

GetStatus returns the value of Status.

func (*CommandListResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CommandListResponse) SetResponse

SetResponse sets the value of Response.

func (*CommandListResponse) SetStatus

func (s *CommandListResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*CommandListResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CommandListResponse) Validate

func (s *CommandListResponse) Validate() error

type CommandListResponseResponse

type CommandListResponseResponse struct {
	CommandList CommandList `json:"command_list"`
}

func (*CommandListResponseResponse) Decode

Decode decodes CommandListResponseResponse from json.

func (*CommandListResponseResponse) Encode

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

Encode implements json.Marshaler.

func (*CommandListResponseResponse) GetCommandList

func (s *CommandListResponseResponse) GetCommandList() CommandList

GetCommandList returns the value of CommandList.

func (*CommandListResponseResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CommandListResponseResponse) SetCommandList

func (s *CommandListResponseResponse) SetCommandList(val CommandList)

SetCommandList sets the value of CommandList.

func (*CommandListResponseResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*CommandListResponseResponse) Validate

func (s *CommandListResponseResponse) Validate() error

type CommandPostNoContent

type CommandPostNoContent struct{}

CommandPostNoContent is response for CommandPost operation.

type CommandPostRes

type CommandPostRes interface {
	// contains filtered or unexported methods
}

type CommandUpdatePostOK

type CommandUpdatePostOK struct {
	Type          CommandUpdatePostOKType // switch on this field
	EmptyResponse EmptyResponse
	ErrorResponse ErrorResponse
}

CommandUpdatePostOK represents sum type.

func NewEmptyResponseCommandUpdatePostOK

func NewEmptyResponseCommandUpdatePostOK(v EmptyResponse) CommandUpdatePostOK

NewEmptyResponseCommandUpdatePostOK returns new CommandUpdatePostOK from EmptyResponse.

func NewErrorResponseCommandUpdatePostOK

func NewErrorResponseCommandUpdatePostOK(v ErrorResponse) CommandUpdatePostOK

NewErrorResponseCommandUpdatePostOK returns new CommandUpdatePostOK from ErrorResponse.

func (*CommandUpdatePostOK) Decode

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

Decode decodes CommandUpdatePostOK from json.

func (CommandUpdatePostOK) Encode

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

Encode encodes CommandUpdatePostOK as json.

func (CommandUpdatePostOK) GetEmptyResponse

func (s CommandUpdatePostOK) GetEmptyResponse() (v EmptyResponse, ok bool)

GetEmptyResponse returns EmptyResponse and true boolean if CommandUpdatePostOK is EmptyResponse.

func (CommandUpdatePostOK) GetErrorResponse

func (s CommandUpdatePostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if CommandUpdatePostOK is ErrorResponse.

func (CommandUpdatePostOK) IsEmptyResponse

func (s CommandUpdatePostOK) IsEmptyResponse() bool

IsEmptyResponse reports whether CommandUpdatePostOK is EmptyResponse.

func (CommandUpdatePostOK) IsErrorResponse

func (s CommandUpdatePostOK) IsErrorResponse() bool

IsErrorResponse reports whether CommandUpdatePostOK is ErrorResponse.

func (CommandUpdatePostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*CommandUpdatePostOK) SetEmptyResponse

func (s *CommandUpdatePostOK) SetEmptyResponse(v EmptyResponse)

SetEmptyResponse sets CommandUpdatePostOK to EmptyResponse.

func (*CommandUpdatePostOK) SetErrorResponse

func (s *CommandUpdatePostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets CommandUpdatePostOK to ErrorResponse.

func (*CommandUpdatePostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (CommandUpdatePostOK) Validate

func (s CommandUpdatePostOK) Validate() error

type CommandUpdatePostOKType

type CommandUpdatePostOKType string

CommandUpdatePostOKType is oneOf type of CommandUpdatePostOK.

const (
	EmptyResponseCommandUpdatePostOK CommandUpdatePostOKType = "ok"
	ErrorResponseCommandUpdatePostOK CommandUpdatePostOKType = "error"
)

Possible values for CommandUpdatePostOKType.

type EmptyResponse

type EmptyResponse struct {
	Status ResponseStatus `json:"status"`
}

Ref: #/components/schemas/EmptyResponse

func (*EmptyResponse) Decode

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

Decode decodes EmptyResponse from json.

func (*EmptyResponse) Encode

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

Encode implements json.Marshaler.

func (*EmptyResponse) GetStatus

func (s *EmptyResponse) GetStatus() ResponseStatus

GetStatus returns the value of Status.

func (*EmptyResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*EmptyResponse) SetStatus

func (s *EmptyResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*EmptyResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*EmptyResponse) Validate

func (s *EmptyResponse) Validate() error

type ErrorHandler

type ErrorHandler = ogenerrors.ErrorHandler

ErrorHandler is error handler.

type ErrorResponse

type ErrorResponse struct {
	Status   ResponseStatus        `json:"status"`
	Response ErrorResponseResponse `json:"response"`
}

Ref: #/components/schemas/ErrorResponse

func (*ErrorResponse) Decode

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

Decode decodes ErrorResponse from json.

func (*ErrorResponse) Encode

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

Encode implements json.Marshaler.

func (*ErrorResponse) GetResponse

func (s *ErrorResponse) GetResponse() ErrorResponseResponse

GetResponse returns the value of Response.

func (*ErrorResponse) GetStatus

func (s *ErrorResponse) GetStatus() ResponseStatus

GetStatus returns the value of Status.

func (*ErrorResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ErrorResponse) SetResponse

func (s *ErrorResponse) SetResponse(val ErrorResponseResponse)

SetResponse sets the value of Response.

func (*ErrorResponse) SetStatus

func (s *ErrorResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*ErrorResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ErrorResponse) Validate

func (s *ErrorResponse) Validate() error

type ErrorResponseResponse

type ErrorResponseResponse struct {
	// Ниже приведён список **системных ошибок**, которые
	// возвращаются при передаче некорректных данных, а
	// также в случае, если запрос ещё не выполнен.
	// | error_code | Описание | | --- | --- | | 1 | Отсутствуют
	// обязательные поля для запроса. | | 2 | Токен запроса не
	// найден. | | 3 | Бот выключен или удалён — выполнение
	// запроса невозможно. | | 5 | Достигнут лимит ошибок при
	// выполнении запроса. | | 6 | Неизвестная ошибка при
	// выполнении внутреннего метода для запроса. | | 8 |
	// Указаны некорректные параметры для запроса. | | 9 |
	// Указан некорректный метод запроса. |
	// ---
	// Ниже приведён **список ошибок**, которые возвращаются
	// **при неуспешной попытке выполнить запрос**, например,
	// при попытке от лица бота написать пользователю,
	// который удалил аккаунт в приложении.
	// | error_code | Значение | | --- | --- | | 1000 | Переданы некорректные
	// данные. | | 1001 | Выбранный участник не существует в
	// команде. | | 1002 | Выбранный участник покинул команду | |
	// 1003 | Бот не состоит в группе. | | 1004 | Такой группы не
	// существует. | | 1005 | У бота отсутствует доступ к
	// сообщению (сообщение удалено или чат очищен). | | 1006 |
	// Переданная реакция отсутствует в приложении. | | 1007 |
	// Переданный ID сообщения не существует. | | 1008 | Превышен
	// лимит списка команд. | | 1009 | Некорректная команда в
	// списке. | | 1010 | Не удалось загрузить файл. | | 1011 |
	// Передана некорректная версия webhook. |.
	ErrorCode ErrorResponseResponseErrorCode `json:"error_code"`
	Message   OptString                      `json:"message"`
}

func (*ErrorResponseResponse) Decode

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

Decode decodes ErrorResponseResponse from json.

func (*ErrorResponseResponse) Encode

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

Encode implements json.Marshaler.

func (*ErrorResponseResponse) GetErrorCode

GetErrorCode returns the value of ErrorCode.

func (*ErrorResponseResponse) GetMessage

func (s *ErrorResponseResponse) GetMessage() OptString

GetMessage returns the value of Message.

func (*ErrorResponseResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ErrorResponseResponse) SetErrorCode

SetErrorCode sets the value of ErrorCode.

func (*ErrorResponseResponse) SetMessage

func (s *ErrorResponseResponse) SetMessage(val OptString)

SetMessage sets the value of Message.

func (*ErrorResponseResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ErrorResponseResponse) Validate

func (s *ErrorResponseResponse) Validate() error

type ErrorResponseResponseErrorCode

type ErrorResponseResponseErrorCode int

Ниже приведён список **системных ошибок**, которые возвращаются при передаче некорректных данных, а также в случае, если запрос ещё не выполнен. | error_code | Описание | | --- | --- | | 1 | Отсутствуют обязательные поля для запроса. | | 2 | Токен запроса не найден. | | 3 | Бот выключен или удалён — выполнение запроса невозможно. | | 5 | Достигнут лимит ошибок при выполнении запроса. | | 6 | Неизвестная ошибка при выполнении внутреннего метода для запроса. | | 8 | Указаны некорректные параметры для запроса. | | 9 | Указан некорректный метод запроса. | --- Ниже приведён **список ошибок**, которые возвращаются **при неуспешной попытке выполнить запрос**, например, при попытке от лица бота написать пользователю, который удалил аккаунт в приложении. | error_code | Значение | | --- | --- | | 1000 | Переданы некорректные данные. | | 1001 | Выбранный участник не существует в команде. | | 1002 | Выбранный участник покинул команду | | 1003 | Бот не состоит в группе. | | 1004 | Такой группы не существует. | | 1005 | У бота отсутствует доступ к сообщению (сообщение удалено или чат очищен). | | 1006 | Переданная реакция отсутствует в приложении. | | 1007 | Переданный ID сообщения не существует. | | 1008 | Превышен лимит списка команд. | | 1009 | Некорректная команда в списке. | | 1010 | Не удалось загрузить файл. | | 1011 | Передана некорректная версия webhook. |.

const (
	ErrorResponseResponseErrorCode1    ErrorResponseResponseErrorCode = 1
	ErrorResponseResponseErrorCode2    ErrorResponseResponseErrorCode = 2
	ErrorResponseResponseErrorCode3    ErrorResponseResponseErrorCode = 3
	ErrorResponseResponseErrorCode5    ErrorResponseResponseErrorCode = 5
	ErrorResponseResponseErrorCode6    ErrorResponseResponseErrorCode = 6
	ErrorResponseResponseErrorCode8    ErrorResponseResponseErrorCode = 8
	ErrorResponseResponseErrorCode9    ErrorResponseResponseErrorCode = 9
	ErrorResponseResponseErrorCode1000 ErrorResponseResponseErrorCode = 1000
	ErrorResponseResponseErrorCode1001 ErrorResponseResponseErrorCode = 1001
	ErrorResponseResponseErrorCode1002 ErrorResponseResponseErrorCode = 1002
	ErrorResponseResponseErrorCode1003 ErrorResponseResponseErrorCode = 1003
	ErrorResponseResponseErrorCode1004 ErrorResponseResponseErrorCode = 1004
	ErrorResponseResponseErrorCode1005 ErrorResponseResponseErrorCode = 1005
	ErrorResponseResponseErrorCode1006 ErrorResponseResponseErrorCode = 1006
	ErrorResponseResponseErrorCode1007 ErrorResponseResponseErrorCode = 1007
	ErrorResponseResponseErrorCode1008 ErrorResponseResponseErrorCode = 1008
	ErrorResponseResponseErrorCode1009 ErrorResponseResponseErrorCode = 1009
	ErrorResponseResponseErrorCode1010 ErrorResponseResponseErrorCode = 1010
	ErrorResponseResponseErrorCode1011 ErrorResponseResponseErrorCode = 1011
)

func (ErrorResponseResponseErrorCode) AllValues

AllValues returns all ErrorResponseResponseErrorCode values.

func (*ErrorResponseResponseErrorCode) Decode

Decode decodes ErrorResponseResponseErrorCode from json.

func (ErrorResponseResponseErrorCode) Encode

Encode encodes ErrorResponseResponseErrorCode as json.

func (ErrorResponseResponseErrorCode) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ErrorResponseResponseErrorCode) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (ErrorResponseResponseErrorCode) Validate

type FileGetURLResponse

type FileGetURLResponse struct {
	Status   ResponseStatus             `json:"status"`
	Response FileGetURLResponseResponse `json:"response"`
}

Ref: #/components/schemas/FileGetURLResponse

func (*FileGetURLResponse) Decode

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

Decode decodes FileGetURLResponse from json.

func (*FileGetURLResponse) Encode

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

Encode implements json.Marshaler.

func (*FileGetURLResponse) GetResponse

GetResponse returns the value of Response.

func (*FileGetURLResponse) GetStatus

func (s *FileGetURLResponse) GetStatus() ResponseStatus

GetStatus returns the value of Status.

func (*FileGetURLResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileGetURLResponse) SetResponse

func (s *FileGetURLResponse) SetResponse(val FileGetURLResponseResponse)

SetResponse sets the value of Response.

func (*FileGetURLResponse) SetStatus

func (s *FileGetURLResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*FileGetURLResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileGetURLResponse) Validate

func (s *FileGetURLResponse) Validate() error

type FileGetURLResponseResponse

type FileGetURLResponseResponse struct {
	NodeURL   url.URL `json:"node_url"`
	FileToken string  `json:"file_token"`
}

func (*FileGetURLResponseResponse) Decode

Decode decodes FileGetURLResponseResponse from json.

func (*FileGetURLResponseResponse) Encode

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

Encode implements json.Marshaler.

func (*FileGetURLResponseResponse) GetFileToken

func (s *FileGetURLResponseResponse) GetFileToken() string

GetFileToken returns the value of FileToken.

func (*FileGetURLResponseResponse) GetNodeURL

func (s *FileGetURLResponseResponse) GetNodeURL() url.URL

GetNodeURL returns the value of NodeURL.

func (*FileGetURLResponseResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileGetURLResponseResponse) SetFileToken

func (s *FileGetURLResponseResponse) SetFileToken(val string)

SetFileToken sets the value of FileToken.

func (*FileGetURLResponseResponse) SetNodeURL

func (s *FileGetURLResponseResponse) SetNodeURL(val url.URL)

SetNodeURL sets the value of NodeURL.

func (*FileGetURLResponseResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type FileGetUrlPostOK

type FileGetUrlPostOK struct {
	Type               FileGetUrlPostOKType // switch on this field
	FileGetURLResponse FileGetURLResponse
	ErrorResponse      ErrorResponse
}

FileGetUrlPostOK represents sum type.

func NewErrorResponseFileGetUrlPostOK

func NewErrorResponseFileGetUrlPostOK(v ErrorResponse) FileGetUrlPostOK

NewErrorResponseFileGetUrlPostOK returns new FileGetUrlPostOK from ErrorResponse.

func NewFileGetURLResponseFileGetUrlPostOK

func NewFileGetURLResponseFileGetUrlPostOK(v FileGetURLResponse) FileGetUrlPostOK

NewFileGetURLResponseFileGetUrlPostOK returns new FileGetUrlPostOK from FileGetURLResponse.

func (*FileGetUrlPostOK) Decode

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

Decode decodes FileGetUrlPostOK from json.

func (FileGetUrlPostOK) Encode

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

Encode encodes FileGetUrlPostOK as json.

func (FileGetUrlPostOK) GetErrorResponse

func (s FileGetUrlPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if FileGetUrlPostOK is ErrorResponse.

func (FileGetUrlPostOK) GetFileGetURLResponse

func (s FileGetUrlPostOK) GetFileGetURLResponse() (v FileGetURLResponse, ok bool)

GetFileGetURLResponse returns FileGetURLResponse and true boolean if FileGetUrlPostOK is FileGetURLResponse.

func (FileGetUrlPostOK) IsErrorResponse

func (s FileGetUrlPostOK) IsErrorResponse() bool

IsErrorResponse reports whether FileGetUrlPostOK is ErrorResponse.

func (FileGetUrlPostOK) IsFileGetURLResponse

func (s FileGetUrlPostOK) IsFileGetURLResponse() bool

IsFileGetURLResponse reports whether FileGetUrlPostOK is FileGetURLResponse.

func (FileGetUrlPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileGetUrlPostOK) SetErrorResponse

func (s *FileGetUrlPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets FileGetUrlPostOK to ErrorResponse.

func (*FileGetUrlPostOK) SetFileGetURLResponse

func (s *FileGetUrlPostOK) SetFileGetURLResponse(v FileGetURLResponse)

SetFileGetURLResponse sets FileGetUrlPostOK to FileGetURLResponse.

func (*FileGetUrlPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (FileGetUrlPostOK) Validate

func (s FileGetUrlPostOK) Validate() error

type FileGetUrlPostOKType

type FileGetUrlPostOKType string

FileGetUrlPostOKType is oneOf type of FileGetUrlPostOK.

const (
	FileGetURLResponseFileGetUrlPostOK FileGetUrlPostOKType = "ok"
	ErrorResponseFileGetUrlPostOK      FileGetUrlPostOKType = "error"
)

Possible values for FileGetUrlPostOKType.

type FileInvoker

type FileInvoker interface {
	// FileGetUrlPost invokes POST /file/getUrl operation.
	//
	// Получить URL для загрузки файлов.
	//
	// POST /file/getUrl
	FileGetUrlPost(ctx context.Context) (FileGetUrlPostOK, error)
	// Post invokes POST / operation.
	//
	// Загрузка файла.
	//
	// POST /
	Post(ctx context.Context, request *PostReq) (PostOK, error)
}

FileInvoker invokes operations described by OpenAPI v3 specification.

x-gen-operation-group: File

type FileUploadResponse

type FileUploadResponse struct {
	Status   ResponseStatus             `json:"status"`
	Response FileUploadResponseResponse `json:"response"`
}

Ref: #/components/schemas/FileUploadResponse

func (*FileUploadResponse) Decode

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

Decode decodes FileUploadResponse from json.

func (*FileUploadResponse) Encode

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

Encode implements json.Marshaler.

func (*FileUploadResponse) GetResponse

GetResponse returns the value of Response.

func (*FileUploadResponse) GetStatus

func (s *FileUploadResponse) GetStatus() ResponseStatus

GetStatus returns the value of Status.

func (*FileUploadResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileUploadResponse) SetResponse

func (s *FileUploadResponse) SetResponse(val FileUploadResponseResponse)

SetResponse sets the value of Response.

func (*FileUploadResponse) SetStatus

func (s *FileUploadResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*FileUploadResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*FileUploadResponse) Validate

func (s *FileUploadResponse) Validate() error

type FileUploadResponseResponse

type FileUploadResponseResponse struct {
	FileID string `json:"file_id"`
}

func (*FileUploadResponseResponse) Decode

Decode decodes FileUploadResponseResponse from json.

func (*FileUploadResponseResponse) Encode

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

Encode implements json.Marshaler.

func (*FileUploadResponseResponse) GetFileID

func (s *FileUploadResponseResponse) GetFileID() string

GetFileID returns the value of FileID.

func (*FileUploadResponseResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*FileUploadResponseResponse) SetFileID

func (s *FileUploadResponseResponse) SetFileID(val string)

SetFileID sets the value of FileID.

func (*FileUploadResponseResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type GetListRequest

type GetListRequest struct {
	Count  OptInt `json:"count"`
	Offset OptInt `json:"offset"`
}

Ref: #/components/schemas/GetListRequest

func (*GetListRequest) Decode

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

Decode decodes GetListRequest from json.

func (*GetListRequest) Encode

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

Encode implements json.Marshaler.

func (*GetListRequest) GetCount

func (s *GetListRequest) GetCount() OptInt

GetCount returns the value of Count.

func (*GetListRequest) GetOffset

func (s *GetListRequest) GetOffset() OptInt

GetOffset returns the value of Offset.

func (*GetListRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*GetListRequest) SetCount

func (s *GetListRequest) SetCount(val OptInt)

SetCount sets the value of Count.

func (*GetListRequest) SetOffset

func (s *GetListRequest) SetOffset(val OptInt)

SetOffset sets the value of Offset.

func (*GetListRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GetListRequest) Validate

func (s *GetListRequest) Validate() error

type GroupGetListPostOK

type GroupGetListPostOK struct {
	Type                 GroupGetListPostOKType // switch on this field
	GroupGetListResponse GroupGetListResponse
	ErrorResponse        ErrorResponse
}

GroupGetListPostOK represents sum type.

func NewErrorResponseGroupGetListPostOK

func NewErrorResponseGroupGetListPostOK(v ErrorResponse) GroupGetListPostOK

NewErrorResponseGroupGetListPostOK returns new GroupGetListPostOK from ErrorResponse.

func NewGroupGetListResponseGroupGetListPostOK

func NewGroupGetListResponseGroupGetListPostOK(v GroupGetListResponse) GroupGetListPostOK

NewGroupGetListResponseGroupGetListPostOK returns new GroupGetListPostOK from GroupGetListResponse.

func (*GroupGetListPostOK) Decode

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

Decode decodes GroupGetListPostOK from json.

func (GroupGetListPostOK) Encode

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

Encode encodes GroupGetListPostOK as json.

func (GroupGetListPostOK) GetErrorResponse

func (s GroupGetListPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if GroupGetListPostOK is ErrorResponse.

func (GroupGetListPostOK) GetGroupGetListResponse

func (s GroupGetListPostOK) GetGroupGetListResponse() (v GroupGetListResponse, ok bool)

GetGroupGetListResponse returns GroupGetListResponse and true boolean if GroupGetListPostOK is GroupGetListResponse.

func (GroupGetListPostOK) IsErrorResponse

func (s GroupGetListPostOK) IsErrorResponse() bool

IsErrorResponse reports whether GroupGetListPostOK is ErrorResponse.

func (GroupGetListPostOK) IsGroupGetListResponse

func (s GroupGetListPostOK) IsGroupGetListResponse() bool

IsGroupGetListResponse reports whether GroupGetListPostOK is GroupGetListResponse.

func (GroupGetListPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*GroupGetListPostOK) SetErrorResponse

func (s *GroupGetListPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets GroupGetListPostOK to ErrorResponse.

func (*GroupGetListPostOK) SetGroupGetListResponse

func (s *GroupGetListPostOK) SetGroupGetListResponse(v GroupGetListResponse)

SetGroupGetListResponse sets GroupGetListPostOK to GroupGetListResponse.

func (*GroupGetListPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (GroupGetListPostOK) Validate

func (s GroupGetListPostOK) Validate() error

type GroupGetListPostOKType

type GroupGetListPostOKType string

GroupGetListPostOKType is oneOf type of GroupGetListPostOK.

const (
	GroupGetListResponseGroupGetListPostOK GroupGetListPostOKType = "ok"
	ErrorResponseGroupGetListPostOK        GroupGetListPostOKType = "error"
)

Possible values for GroupGetListPostOKType.

type GroupGetListResponse

type GroupGetListResponse struct {
	Status   ResponseStatus               `json:"status"`
	Response GroupGetListResponseResponse `json:"response"`
}

Ref: #/components/schemas/GroupGetListResponse

func (*GroupGetListResponse) Decode

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

Decode decodes GroupGetListResponse from json.

func (*GroupGetListResponse) Encode

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

Encode implements json.Marshaler.

func (*GroupGetListResponse) GetResponse

GetResponse returns the value of Response.

func (*GroupGetListResponse) GetStatus

func (s *GroupGetListResponse) GetStatus() ResponseStatus

GetStatus returns the value of Status.

func (*GroupGetListResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*GroupGetListResponse) SetResponse

SetResponse sets the value of Response.

func (*GroupGetListResponse) SetStatus

func (s *GroupGetListResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*GroupGetListResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GroupGetListResponse) Validate

func (s *GroupGetListResponse) Validate() error

type GroupGetListResponseResponse

type GroupGetListResponseResponse struct {
	GroupList []GroupGetListResponseResponseGroupListItem `json:"group_list"`
}

func (*GroupGetListResponseResponse) Decode

Decode decodes GroupGetListResponseResponse from json.

func (*GroupGetListResponseResponse) Encode

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

Encode implements json.Marshaler.

func (*GroupGetListResponseResponse) GetGroupList

GetGroupList returns the value of GroupList.

func (*GroupGetListResponseResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*GroupGetListResponseResponse) SetGroupList

SetGroupList sets the value of GroupList.

func (*GroupGetListResponseResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GroupGetListResponseResponse) Validate

func (s *GroupGetListResponseResponse) Validate() error

type GroupGetListResponseResponseGroupListItem

type GroupGetListResponseResponseGroupListItem struct {
	GroupID       string `json:"group_id"`
	Name          string `json:"name"`
	AvatarFileURL string `json:"avatar_file_url"`
}

func (*GroupGetListResponseResponseGroupListItem) Decode

Decode decodes GroupGetListResponseResponseGroupListItem from json.

func (*GroupGetListResponseResponseGroupListItem) Encode

Encode implements json.Marshaler.

func (*GroupGetListResponseResponseGroupListItem) GetAvatarFileURL

func (s *GroupGetListResponseResponseGroupListItem) GetAvatarFileURL() string

GetAvatarFileURL returns the value of AvatarFileURL.

func (*GroupGetListResponseResponseGroupListItem) GetGroupID

GetGroupID returns the value of GroupID.

func (*GroupGetListResponseResponseGroupListItem) GetName

GetName returns the value of Name.

func (*GroupGetListResponseResponseGroupListItem) MarshalJSON

MarshalJSON implements stdjson.Marshaler.

func (*GroupGetListResponseResponseGroupListItem) SetAvatarFileURL

func (s *GroupGetListResponseResponseGroupListItem) SetAvatarFileURL(val string)

SetAvatarFileURL sets the value of AvatarFileURL.

func (*GroupGetListResponseResponseGroupListItem) SetGroupID

SetGroupID sets the value of GroupID.

func (*GroupGetListResponseResponseGroupListItem) SetName

SetName sets the value of Name.

func (*GroupGetListResponseResponseGroupListItem) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type GroupInvoker

type GroupInvoker interface {
	// GroupGetListPost invokes POST /group/getList operation.
	//
	// Получить данные групп, в которых состоит бот.
	//
	// POST /group/getList
	GroupGetListPost(ctx context.Context, request *GetListRequest) (GroupGetListPostOK, error)
	// GroupSendPost invokes POST /group/send operation.
	//
	// Отправить сообщение от бота в группу.
	//
	// POST /group/send
	GroupSendPost(ctx context.Context, request *GroupSendRequest) (GroupSendPostOK, error)
}

GroupInvoker invokes operations described by OpenAPI v3 specification.

x-gen-operation-group: Group

type GroupSendPostOK

type GroupSendPostOK struct {
	Type              GroupSendPostOKType // switch on this field
	MessageIDResponse MessageIDResponse
	ErrorResponse     ErrorResponse
}

GroupSendPostOK represents sum type.

func NewErrorResponseGroupSendPostOK

func NewErrorResponseGroupSendPostOK(v ErrorResponse) GroupSendPostOK

NewErrorResponseGroupSendPostOK returns new GroupSendPostOK from ErrorResponse.

func NewMessageIDResponseGroupSendPostOK

func NewMessageIDResponseGroupSendPostOK(v MessageIDResponse) GroupSendPostOK

NewMessageIDResponseGroupSendPostOK returns new GroupSendPostOK from MessageIDResponse.

func (*GroupSendPostOK) Decode

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

Decode decodes GroupSendPostOK from json.

func (GroupSendPostOK) Encode

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

Encode encodes GroupSendPostOK as json.

func (GroupSendPostOK) GetErrorResponse

func (s GroupSendPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if GroupSendPostOK is ErrorResponse.

func (GroupSendPostOK) GetMessageIDResponse

func (s GroupSendPostOK) GetMessageIDResponse() (v MessageIDResponse, ok bool)

GetMessageIDResponse returns MessageIDResponse and true boolean if GroupSendPostOK is MessageIDResponse.

func (GroupSendPostOK) IsErrorResponse

func (s GroupSendPostOK) IsErrorResponse() bool

IsErrorResponse reports whether GroupSendPostOK is ErrorResponse.

func (GroupSendPostOK) IsMessageIDResponse

func (s GroupSendPostOK) IsMessageIDResponse() bool

IsMessageIDResponse reports whether GroupSendPostOK is MessageIDResponse.

func (GroupSendPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*GroupSendPostOK) SetErrorResponse

func (s *GroupSendPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets GroupSendPostOK to ErrorResponse.

func (*GroupSendPostOK) SetMessageIDResponse

func (s *GroupSendPostOK) SetMessageIDResponse(v MessageIDResponse)

SetMessageIDResponse sets GroupSendPostOK to MessageIDResponse.

func (*GroupSendPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (GroupSendPostOK) Validate

func (s GroupSendPostOK) Validate() error

type GroupSendPostOKType

type GroupSendPostOKType string

GroupSendPostOKType is oneOf type of GroupSendPostOK.

const (
	MessageIDResponseGroupSendPostOK GroupSendPostOKType = "ok"
	ErrorResponseGroupSendPostOK     GroupSendPostOKType = "error"
)

Possible values for GroupSendPostOKType.

type GroupSendRequest

type GroupSendRequest struct {
	GroupID string `json:"group_id"`
	OneOf   GroupSendRequestSum
}

Merged schema. Ref: #/components/schemas/GroupSendRequest

func (*GroupSendRequest) Decode

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

Decode decodes GroupSendRequest from json.

func (*GroupSendRequest) Encode

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

Encode implements json.Marshaler.

func (*GroupSendRequest) GetGroupID

func (s *GroupSendRequest) GetGroupID() string

GetGroupID returns the value of GroupID.

func (*GroupSendRequest) GetOneOf

func (s *GroupSendRequest) GetOneOf() GroupSendRequestSum

GetOneOf returns the value of OneOf.

func (*GroupSendRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*GroupSendRequest) SetGroupID

func (s *GroupSendRequest) SetGroupID(val string)

SetGroupID sets the value of GroupID.

func (*GroupSendRequest) SetOneOf

func (s *GroupSendRequest) SetOneOf(val GroupSendRequestSum)

SetOneOf sets the value of OneOf.

func (*GroupSendRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*GroupSendRequest) Validate

func (s *GroupSendRequest) Validate() error

type GroupSendRequestSum

type GroupSendRequestSum struct {
	Type        GroupSendRequestSumType // switch on this field
	MessageText MessageText
	MessageFile MessageFile
}

GroupSendRequestSum represents sum type.

func NewMessageFileGroupSendRequestSum

func NewMessageFileGroupSendRequestSum(v MessageFile) GroupSendRequestSum

NewMessageFileGroupSendRequestSum returns new GroupSendRequestSum from MessageFile.

func NewMessageTextGroupSendRequestSum

func NewMessageTextGroupSendRequestSum(v MessageText) GroupSendRequestSum

NewMessageTextGroupSendRequestSum returns new GroupSendRequestSum from MessageText.

func (*GroupSendRequestSum) Decode

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

Decode decodes GroupSendRequestSum from json.

func (GroupSendRequestSum) Encode

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

Encode encodes GroupSendRequestSum as json.

func (GroupSendRequestSum) GetMessageFile

func (s GroupSendRequestSum) GetMessageFile() (v MessageFile, ok bool)

GetMessageFile returns MessageFile and true boolean if GroupSendRequestSum is MessageFile.

func (GroupSendRequestSum) GetMessageText

func (s GroupSendRequestSum) GetMessageText() (v MessageText, ok bool)

GetMessageText returns MessageText and true boolean if GroupSendRequestSum is MessageText.

func (GroupSendRequestSum) IsMessageFile

func (s GroupSendRequestSum) IsMessageFile() bool

IsMessageFile reports whether GroupSendRequestSum is MessageFile.

func (GroupSendRequestSum) IsMessageText

func (s GroupSendRequestSum) IsMessageText() bool

IsMessageText reports whether GroupSendRequestSum is MessageText.

func (GroupSendRequestSum) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*GroupSendRequestSum) SetMessageFile

func (s *GroupSendRequestSum) SetMessageFile(v MessageFile)

SetMessageFile sets GroupSendRequestSum to MessageFile.

func (*GroupSendRequestSum) SetMessageText

func (s *GroupSendRequestSum) SetMessageText(v MessageText)

SetMessageText sets GroupSendRequestSum to MessageText.

func (*GroupSendRequestSum) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (GroupSendRequestSum) Validate

func (s GroupSendRequestSum) Validate() error

type GroupSendRequestSumType

type GroupSendRequestSumType string

GroupSendRequestSumType is oneOf type of GroupSendRequestSum.

const (
	MessageTextGroupSendRequestSum GroupSendRequestSumType = "text"
	MessageFileGroupSendRequestSum GroupSendRequestSumType = "file"
)

Possible values for GroupSendRequestSumType.

type Invoker

Invoker invokes operations described by OpenAPI v3 specification.

type Message

type Message struct {
	Type        MessageType // switch on this field
	MessageText MessageText
	MessageFile MessageFile
}

Ref: #/components/schemas/Message Message represents sum type.

func NewMessageFileMessage

func NewMessageFileMessage(v MessageFile) Message

NewMessageFileMessage returns new Message from MessageFile.

func NewMessageTextMessage

func NewMessageTextMessage(v MessageText) Message

NewMessageTextMessage returns new Message from MessageText.

func (*Message) Decode

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

Decode decodes Message from json.

func (Message) Encode

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

Encode encodes Message as json.

func (Message) GetMessageFile

func (s Message) GetMessageFile() (v MessageFile, ok bool)

GetMessageFile returns MessageFile and true boolean if Message is MessageFile.

func (Message) GetMessageText

func (s Message) GetMessageText() (v MessageText, ok bool)

GetMessageText returns MessageText and true boolean if Message is MessageText.

func (Message) IsMessageFile

func (s Message) IsMessageFile() bool

IsMessageFile reports whether Message is MessageFile.

func (Message) IsMessageText

func (s Message) IsMessageText() bool

IsMessageText reports whether Message is MessageText.

func (Message) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Message) SetMessageFile

func (s *Message) SetMessageFile(v MessageFile)

SetMessageFile sets Message to MessageFile.

func (*Message) SetMessageText

func (s *Message) SetMessageText(v MessageText)

SetMessageText sets Message to MessageText.

func (*Message) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (Message) Validate

func (s Message) Validate() error

type MessageAddReactionPostOK

type MessageAddReactionPostOK struct {
	Type          MessageAddReactionPostOKType // switch on this field
	EmptyResponse EmptyResponse
	ErrorResponse ErrorResponse
}

MessageAddReactionPostOK represents sum type.

func NewEmptyResponseMessageAddReactionPostOK

func NewEmptyResponseMessageAddReactionPostOK(v EmptyResponse) MessageAddReactionPostOK

NewEmptyResponseMessageAddReactionPostOK returns new MessageAddReactionPostOK from EmptyResponse.

func NewErrorResponseMessageAddReactionPostOK

func NewErrorResponseMessageAddReactionPostOK(v ErrorResponse) MessageAddReactionPostOK

NewErrorResponseMessageAddReactionPostOK returns new MessageAddReactionPostOK from ErrorResponse.

func (*MessageAddReactionPostOK) Decode

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

Decode decodes MessageAddReactionPostOK from json.

func (MessageAddReactionPostOK) Encode

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

Encode encodes MessageAddReactionPostOK as json.

func (MessageAddReactionPostOK) GetEmptyResponse

func (s MessageAddReactionPostOK) GetEmptyResponse() (v EmptyResponse, ok bool)

GetEmptyResponse returns EmptyResponse and true boolean if MessageAddReactionPostOK is EmptyResponse.

func (MessageAddReactionPostOK) GetErrorResponse

func (s MessageAddReactionPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if MessageAddReactionPostOK is ErrorResponse.

func (MessageAddReactionPostOK) IsEmptyResponse

func (s MessageAddReactionPostOK) IsEmptyResponse() bool

IsEmptyResponse reports whether MessageAddReactionPostOK is EmptyResponse.

func (MessageAddReactionPostOK) IsErrorResponse

func (s MessageAddReactionPostOK) IsErrorResponse() bool

IsErrorResponse reports whether MessageAddReactionPostOK is ErrorResponse.

func (MessageAddReactionPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*MessageAddReactionPostOK) SetEmptyResponse

func (s *MessageAddReactionPostOK) SetEmptyResponse(v EmptyResponse)

SetEmptyResponse sets MessageAddReactionPostOK to EmptyResponse.

func (*MessageAddReactionPostOK) SetErrorResponse

func (s *MessageAddReactionPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets MessageAddReactionPostOK to ErrorResponse.

func (*MessageAddReactionPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (MessageAddReactionPostOK) Validate

func (s MessageAddReactionPostOK) Validate() error

type MessageAddReactionPostOKType

type MessageAddReactionPostOKType string

MessageAddReactionPostOKType is oneOf type of MessageAddReactionPostOK.

const (
	EmptyResponseMessageAddReactionPostOK MessageAddReactionPostOKType = "ok"
	ErrorResponseMessageAddReactionPostOK MessageAddReactionPostOKType = "error"
)

Possible values for MessageAddReactionPostOKType.

type MessageAddReactionRequest

type MessageAddReactionRequest struct {
	MessageID string   `json:"message_id"`
	Reaction  Reaction `json:"reaction"`
}

Ref: #/components/schemas/MessageAddReactionRequest

func (*MessageAddReactionRequest) Decode

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

Decode decodes MessageAddReactionRequest from json.

func (*MessageAddReactionRequest) Encode

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

Encode implements json.Marshaler.

func (*MessageAddReactionRequest) GetMessageID

func (s *MessageAddReactionRequest) GetMessageID() string

GetMessageID returns the value of MessageID.

func (*MessageAddReactionRequest) GetReaction

func (s *MessageAddReactionRequest) GetReaction() Reaction

GetReaction returns the value of Reaction.

func (*MessageAddReactionRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*MessageAddReactionRequest) SetMessageID

func (s *MessageAddReactionRequest) SetMessageID(val string)

SetMessageID sets the value of MessageID.

func (*MessageAddReactionRequest) SetReaction

func (s *MessageAddReactionRequest) SetReaction(val Reaction)

SetReaction sets the value of Reaction.

func (*MessageAddReactionRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type MessageFile

type MessageFile struct {
	Type   MessageKind `json:"type"`
	FileID string      `json:"file_id"`
}

Ref: #/components/schemas/MessageFile

func (*MessageFile) Decode

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

Decode decodes MessageFile from json.

func (*MessageFile) Encode

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

Encode implements json.Marshaler.

func (*MessageFile) GetFileID

func (s *MessageFile) GetFileID() string

GetFileID returns the value of FileID.

func (*MessageFile) GetType

func (s *MessageFile) GetType() MessageKind

GetType returns the value of Type.

func (*MessageFile) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*MessageFile) SetFileID

func (s *MessageFile) SetFileID(val string)

SetFileID sets the value of FileID.

func (*MessageFile) SetType

func (s *MessageFile) SetType(val MessageKind)

SetType sets the value of Type.

func (*MessageFile) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MessageFile) Validate

func (s *MessageFile) Validate() error

type MessageIDResponse

type MessageIDResponse struct {
	Status   ResponseStatus            `json:"status"`
	Response MessageIDResponseResponse `json:"response"`
}

Ref: #/components/schemas/MessageIDResponse

func (*MessageIDResponse) Decode

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

Decode decodes MessageIDResponse from json.

func (*MessageIDResponse) Encode

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

Encode implements json.Marshaler.

func (*MessageIDResponse) GetResponse

GetResponse returns the value of Response.

func (*MessageIDResponse) GetStatus

func (s *MessageIDResponse) GetStatus() ResponseStatus

GetStatus returns the value of Status.

func (*MessageIDResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*MessageIDResponse) SetResponse

func (s *MessageIDResponse) SetResponse(val MessageIDResponseResponse)

SetResponse sets the value of Response.

func (*MessageIDResponse) SetStatus

func (s *MessageIDResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*MessageIDResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MessageIDResponse) Validate

func (s *MessageIDResponse) Validate() error

type MessageIDResponseResponse

type MessageIDResponseResponse struct {
	MessageID string `json:"message_id"`
}

func (*MessageIDResponseResponse) Decode

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

Decode decodes MessageIDResponseResponse from json.

func (*MessageIDResponseResponse) Encode

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

Encode implements json.Marshaler.

func (*MessageIDResponseResponse) GetMessageID

func (s *MessageIDResponseResponse) GetMessageID() string

GetMessageID returns the value of MessageID.

func (*MessageIDResponseResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*MessageIDResponseResponse) SetMessageID

func (s *MessageIDResponseResponse) SetMessageID(val string)

SetMessageID sets the value of MessageID.

func (*MessageIDResponseResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type MessageInvoker

type MessageInvoker interface {
	// MessageAddReactionPost invokes POST /message/addReaction operation.
	//
	// Добавить реакцию на сообщение от лица бота.
	//
	// POST /message/addReaction
	MessageAddReactionPost(ctx context.Context, request *MessageAddReactionRequest) (MessageAddReactionPostOK, error)
	// MessageRemoveReactionPost invokes POST /message/removeReaction operation.
	//
	// Удалить реакцию бота с сообщения.
	//
	// POST /message/removeReaction
	MessageRemoveReactionPost(ctx context.Context, request *MessageRemoveReactionRequest) (MessageRemoveReactionPostOK, error)
}

MessageInvoker invokes operations described by OpenAPI v3 specification.

x-gen-operation-group: Message

type MessageKind

type MessageKind string

Для текстовых сообщений необходимо передавать в этот параметр значение = "text". Для сообщений-файлов необходимо передавать в этот параметр значение = "file". Ref: #/components/schemas/MessageKind

const (
	MessageKindText MessageKind = "text"
	MessageKindFile MessageKind = "file"
)

func (MessageKind) AllValues

func (MessageKind) AllValues() []MessageKind

AllValues returns all MessageKind values.

func (*MessageKind) Decode

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

Decode decodes MessageKind from json.

func (MessageKind) Encode

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

Encode encodes MessageKind as json.

func (MessageKind) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (MessageKind) MarshalText

func (s MessageKind) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*MessageKind) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MessageKind) UnmarshalText

func (s *MessageKind) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (MessageKind) Validate

func (s MessageKind) Validate() error

type MessageRemoveReactionPostOK

type MessageRemoveReactionPostOK struct {
	Type          MessageRemoveReactionPostOKType // switch on this field
	EmptyResponse EmptyResponse
	ErrorResponse ErrorResponse
}

MessageRemoveReactionPostOK represents sum type.

func NewEmptyResponseMessageRemoveReactionPostOK

func NewEmptyResponseMessageRemoveReactionPostOK(v EmptyResponse) MessageRemoveReactionPostOK

NewEmptyResponseMessageRemoveReactionPostOK returns new MessageRemoveReactionPostOK from EmptyResponse.

func NewErrorResponseMessageRemoveReactionPostOK

func NewErrorResponseMessageRemoveReactionPostOK(v ErrorResponse) MessageRemoveReactionPostOK

NewErrorResponseMessageRemoveReactionPostOK returns new MessageRemoveReactionPostOK from ErrorResponse.

func (*MessageRemoveReactionPostOK) Decode

Decode decodes MessageRemoveReactionPostOK from json.

func (MessageRemoveReactionPostOK) Encode

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

Encode encodes MessageRemoveReactionPostOK as json.

func (MessageRemoveReactionPostOK) GetEmptyResponse

func (s MessageRemoveReactionPostOK) GetEmptyResponse() (v EmptyResponse, ok bool)

GetEmptyResponse returns EmptyResponse and true boolean if MessageRemoveReactionPostOK is EmptyResponse.

func (MessageRemoveReactionPostOK) GetErrorResponse

func (s MessageRemoveReactionPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if MessageRemoveReactionPostOK is ErrorResponse.

func (MessageRemoveReactionPostOK) IsEmptyResponse

func (s MessageRemoveReactionPostOK) IsEmptyResponse() bool

IsEmptyResponse reports whether MessageRemoveReactionPostOK is EmptyResponse.

func (MessageRemoveReactionPostOK) IsErrorResponse

func (s MessageRemoveReactionPostOK) IsErrorResponse() bool

IsErrorResponse reports whether MessageRemoveReactionPostOK is ErrorResponse.

func (MessageRemoveReactionPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*MessageRemoveReactionPostOK) SetEmptyResponse

func (s *MessageRemoveReactionPostOK) SetEmptyResponse(v EmptyResponse)

SetEmptyResponse sets MessageRemoveReactionPostOK to EmptyResponse.

func (*MessageRemoveReactionPostOK) SetErrorResponse

func (s *MessageRemoveReactionPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets MessageRemoveReactionPostOK to ErrorResponse.

func (*MessageRemoveReactionPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (MessageRemoveReactionPostOK) Validate

func (s MessageRemoveReactionPostOK) Validate() error

type MessageRemoveReactionPostOKType

type MessageRemoveReactionPostOKType string

MessageRemoveReactionPostOKType is oneOf type of MessageRemoveReactionPostOK.

const (
	EmptyResponseMessageRemoveReactionPostOK MessageRemoveReactionPostOKType = "ok"
	ErrorResponseMessageRemoveReactionPostOK MessageRemoveReactionPostOKType = "error"
)

Possible values for MessageRemoveReactionPostOKType.

type MessageRemoveReactionRequest

type MessageRemoveReactionRequest struct {
	MessageID string   `json:"message_id"`
	Reaction  Reaction `json:"reaction"`
}

Ref: #/components/schemas/MessageRemoveReactionRequest

func (*MessageRemoveReactionRequest) Decode

Decode decodes MessageRemoveReactionRequest from json.

func (*MessageRemoveReactionRequest) Encode

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

Encode implements json.Marshaler.

func (*MessageRemoveReactionRequest) GetMessageID

func (s *MessageRemoveReactionRequest) GetMessageID() string

GetMessageID returns the value of MessageID.

func (*MessageRemoveReactionRequest) GetReaction

func (s *MessageRemoveReactionRequest) GetReaction() Reaction

GetReaction returns the value of Reaction.

func (*MessageRemoveReactionRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*MessageRemoveReactionRequest) SetMessageID

func (s *MessageRemoveReactionRequest) SetMessageID(val string)

SetMessageID sets the value of MessageID.

func (*MessageRemoveReactionRequest) SetReaction

func (s *MessageRemoveReactionRequest) SetReaction(val Reaction)

SetReaction sets the value of Reaction.

func (*MessageRemoveReactionRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type MessageText

type MessageText struct {
	Type MessageKind `json:"type"`
	Text string      `json:"text"`
}

Ref: #/components/schemas/MessageText

func (*MessageText) Decode

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

Decode decodes MessageText from json.

func (*MessageText) Encode

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

Encode implements json.Marshaler.

func (*MessageText) GetText

func (s *MessageText) GetText() string

GetText returns the value of Text.

func (*MessageText) GetType

func (s *MessageText) GetType() MessageKind

GetType returns the value of Type.

func (*MessageText) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*MessageText) SetText

func (s *MessageText) SetText(val string)

SetText sets the value of Text.

func (*MessageText) SetType

func (s *MessageText) SetType(val MessageKind)

SetType sets the value of Type.

func (*MessageText) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*MessageText) Validate

func (s *MessageText) Validate() error

type MessageType

type MessageType string

MessageType is oneOf type of Message.

const (
	MessageTextMessage MessageType = "text"
	MessageFileMessage MessageType = "file"
)

Possible values for MessageType.

type Middleware

type Middleware = middleware.Middleware

Middleware is middleware type.

type OnPremiseServer

type OnPremiseServer struct {
	Host string `json:"host" yaml:"host"`
}

OnPremiseServer is a server URL template.

func (OnPremiseServer) Build

func (s OnPremiseServer) Build() (string, error)

Build returns the computed server URL.

If variable is empty, it uses the default value. If spec defines an enum and given value is not in the enum, it returns an error.

Notice that given values will not be escaped and may cause invalid URL.

func (OnPremiseServer) MustBuild

func (s OnPremiseServer) MustBuild() string

MustBuild returns the computed server URL. It panics if any error occurs.

func (OnPremiseServer) MustPath

func (s OnPremiseServer) MustPath() string

MustPath returns the computed path. It panics if any error occurs.

func (OnPremiseServer) Path

func (s OnPremiseServer) Path() (string, error)

Path returns the computed path.

type OperationName

type OperationName = string

OperationName is the ogen operation name

const (
	CommandGetListPostOperation        OperationName = "CommandGetListPost"
	CommandUpdatePostOperation         OperationName = "CommandUpdatePost"
	FileGetUrlPostOperation            OperationName = "FileGetUrlPost"
	GroupGetListPostOperation          OperationName = "GroupGetListPost"
	GroupSendPostOperation             OperationName = "GroupSendPost"
	MessageAddReactionPostOperation    OperationName = "MessageAddReactionPost"
	MessageRemoveReactionPostOperation OperationName = "MessageRemoveReactionPost"
	PostOperation                      OperationName = "Post"
	ThreadSendPostOperation            OperationName = "ThreadSendPost"
	UserGetListPostOperation           OperationName = "UserGetListPost"
	UserSendPostOperation              OperationName = "UserSendPost"
	WebhookGetVersionPostOperation     OperationName = "WebhookGetVersionPost"
	WebhookSetVersionPostOperation     OperationName = "WebhookSetVersionPost"
	CommandPostOperation               OperationName = "CommandPost"
)

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

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

Decode decodes int from json.

func (OptInt) Encode

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

Encode encodes int as json.

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

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

MarshalJSON implements stdjson.Marshaler.

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.

func (*OptInt) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

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.

type PostOK

type PostOK struct {
	Type               PostOKType // switch on this field
	FileUploadResponse FileUploadResponse
	ErrorResponse      ErrorResponse
}

PostOK represents sum type.

func NewErrorResponsePostOK

func NewErrorResponsePostOK(v ErrorResponse) PostOK

NewErrorResponsePostOK returns new PostOK from ErrorResponse.

func NewFileUploadResponsePostOK

func NewFileUploadResponsePostOK(v FileUploadResponse) PostOK

NewFileUploadResponsePostOK returns new PostOK from FileUploadResponse.

func (*PostOK) Decode

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

Decode decodes PostOK from json.

func (PostOK) Encode

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

Encode encodes PostOK as json.

func (PostOK) GetErrorResponse

func (s PostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if PostOK is ErrorResponse.

func (PostOK) GetFileUploadResponse

func (s PostOK) GetFileUploadResponse() (v FileUploadResponse, ok bool)

GetFileUploadResponse returns FileUploadResponse and true boolean if PostOK is FileUploadResponse.

func (PostOK) IsErrorResponse

func (s PostOK) IsErrorResponse() bool

IsErrorResponse reports whether PostOK is ErrorResponse.

func (PostOK) IsFileUploadResponse

func (s PostOK) IsFileUploadResponse() bool

IsFileUploadResponse reports whether PostOK is FileUploadResponse.

func (PostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*PostOK) SetErrorResponse

func (s *PostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets PostOK to ErrorResponse.

func (*PostOK) SetFileUploadResponse

func (s *PostOK) SetFileUploadResponse(v FileUploadResponse)

SetFileUploadResponse sets PostOK to FileUploadResponse.

func (*PostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (PostOK) Validate

func (s PostOK) Validate() error

type PostOKType

type PostOKType string

PostOKType is oneOf type of PostOK.

const (
	FileUploadResponsePostOK PostOKType = "ok"
	ErrorResponsePostOK      PostOKType = "error"
)

Possible values for PostOKType.

type PostReq

type PostReq struct {
	Token string           `json:"token"`
	File  ht.MultipartFile `json:"file"`
}

func (*PostReq) GetFile

func (s *PostReq) GetFile() ht.MultipartFile

GetFile returns the value of File.

func (*PostReq) GetToken

func (s *PostReq) GetToken() string

GetToken returns the value of Token.

func (*PostReq) SetFile

func (s *PostReq) SetFile(val ht.MultipartFile)

SetFile sets the value of File.

func (*PostReq) SetToken

func (s *PostReq) SetToken(val string)

SetToken sets the value of Token.

type Reaction

type Reaction string

func (*Reaction) Decode

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

Decode decodes Reaction from json.

func (Reaction) Encode

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

Encode encodes Reaction as json.

func (Reaction) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*Reaction) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type ResponseStatus

type ResponseStatus string

Может принимать значение "ok" (в случае, если запрос выполнился успешно) или "error" (в случае ошибки). Ref: #/components/schemas/ResponseStatus

const (
	ResponseStatusOk    ResponseStatus = "ok"
	ResponseStatusError ResponseStatus = "error"
)

func (ResponseStatus) AllValues

func (ResponseStatus) AllValues() []ResponseStatus

AllValues returns all ResponseStatus values.

func (*ResponseStatus) Decode

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

Decode decodes ResponseStatus from json.

func (ResponseStatus) Encode

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

Encode encodes ResponseStatus as json.

func (ResponseStatus) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (ResponseStatus) MarshalText

func (s ResponseStatus) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*ResponseStatus) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ResponseStatus) UnmarshalText

func (s *ResponseStatus) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (ResponseStatus) Validate

func (s ResponseStatus) Validate() error

type SecuritySource

type SecuritySource interface {
	// AuthToken provides AuthToken security value.
	// Авторизация запроса осуществляется через
	// **header**-заголовок с использованием токена вашего бота:
	// - заголовок "**Authorization: bearer={токен бота}**" - заголовок
	// содержит токен, который принадлежит вашему боту (бот
	// должен быть
	// включён для этого).
	AuthToken(ctx context.Context, operationName OperationName) (AuthToken, error)
}

SecuritySource is provider of security values (tokens, passwords, etc.).

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 ThreadInvoker

type ThreadInvoker interface {
	// ThreadSendPost invokes POST /thread/send operation.
	//
	// Отправить сообщение от бота в комментарии к сообщению.
	//
	// POST /thread/send
	ThreadSendPost(ctx context.Context, request *ThreadSendRequest) (ThreadSendPostOK, error)
}

ThreadInvoker invokes operations described by OpenAPI v3 specification.

x-gen-operation-group: Thread

type ThreadSendPostOK

type ThreadSendPostOK struct {
	Type              ThreadSendPostOKType // switch on this field
	MessageIDResponse MessageIDResponse
	ErrorResponse     ErrorResponse
}

ThreadSendPostOK represents sum type.

func NewErrorResponseThreadSendPostOK

func NewErrorResponseThreadSendPostOK(v ErrorResponse) ThreadSendPostOK

NewErrorResponseThreadSendPostOK returns new ThreadSendPostOK from ErrorResponse.

func NewMessageIDResponseThreadSendPostOK

func NewMessageIDResponseThreadSendPostOK(v MessageIDResponse) ThreadSendPostOK

NewMessageIDResponseThreadSendPostOK returns new ThreadSendPostOK from MessageIDResponse.

func (*ThreadSendPostOK) Decode

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

Decode decodes ThreadSendPostOK from json.

func (ThreadSendPostOK) Encode

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

Encode encodes ThreadSendPostOK as json.

func (ThreadSendPostOK) GetErrorResponse

func (s ThreadSendPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if ThreadSendPostOK is ErrorResponse.

func (ThreadSendPostOK) GetMessageIDResponse

func (s ThreadSendPostOK) GetMessageIDResponse() (v MessageIDResponse, ok bool)

GetMessageIDResponse returns MessageIDResponse and true boolean if ThreadSendPostOK is MessageIDResponse.

func (ThreadSendPostOK) IsErrorResponse

func (s ThreadSendPostOK) IsErrorResponse() bool

IsErrorResponse reports whether ThreadSendPostOK is ErrorResponse.

func (ThreadSendPostOK) IsMessageIDResponse

func (s ThreadSendPostOK) IsMessageIDResponse() bool

IsMessageIDResponse reports whether ThreadSendPostOK is MessageIDResponse.

func (ThreadSendPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ThreadSendPostOK) SetErrorResponse

func (s *ThreadSendPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets ThreadSendPostOK to ErrorResponse.

func (*ThreadSendPostOK) SetMessageIDResponse

func (s *ThreadSendPostOK) SetMessageIDResponse(v MessageIDResponse)

SetMessageIDResponse sets ThreadSendPostOK to MessageIDResponse.

func (*ThreadSendPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (ThreadSendPostOK) Validate

func (s ThreadSendPostOK) Validate() error

type ThreadSendPostOKType

type ThreadSendPostOKType string

ThreadSendPostOKType is oneOf type of ThreadSendPostOK.

const (
	MessageIDResponseThreadSendPostOK ThreadSendPostOKType = "ok"
	ErrorResponseThreadSendPostOK     ThreadSendPostOKType = "error"
)

Possible values for ThreadSendPostOKType.

type ThreadSendRequest

type ThreadSendRequest struct {
	MessageID string `json:"message_id"`
	OneOf     ThreadSendRequestSum
}

Merged schema. Ref: #/components/schemas/ThreadSendRequest

func (*ThreadSendRequest) Decode

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

Decode decodes ThreadSendRequest from json.

func (*ThreadSendRequest) Encode

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

Encode implements json.Marshaler.

func (*ThreadSendRequest) GetMessageID

func (s *ThreadSendRequest) GetMessageID() string

GetMessageID returns the value of MessageID.

func (*ThreadSendRequest) GetOneOf

GetOneOf returns the value of OneOf.

func (*ThreadSendRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ThreadSendRequest) SetMessageID

func (s *ThreadSendRequest) SetMessageID(val string)

SetMessageID sets the value of MessageID.

func (*ThreadSendRequest) SetOneOf

func (s *ThreadSendRequest) SetOneOf(val ThreadSendRequestSum)

SetOneOf sets the value of OneOf.

func (*ThreadSendRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*ThreadSendRequest) Validate

func (s *ThreadSendRequest) Validate() error

type ThreadSendRequestSum

type ThreadSendRequestSum struct {
	Type        ThreadSendRequestSumType // switch on this field
	MessageText MessageText
	MessageFile MessageFile
}

ThreadSendRequestSum represents sum type.

func NewMessageFileThreadSendRequestSum

func NewMessageFileThreadSendRequestSum(v MessageFile) ThreadSendRequestSum

NewMessageFileThreadSendRequestSum returns new ThreadSendRequestSum from MessageFile.

func NewMessageTextThreadSendRequestSum

func NewMessageTextThreadSendRequestSum(v MessageText) ThreadSendRequestSum

NewMessageTextThreadSendRequestSum returns new ThreadSendRequestSum from MessageText.

func (*ThreadSendRequestSum) Decode

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

Decode decodes ThreadSendRequestSum from json.

func (ThreadSendRequestSum) Encode

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

Encode encodes ThreadSendRequestSum as json.

func (ThreadSendRequestSum) GetMessageFile

func (s ThreadSendRequestSum) GetMessageFile() (v MessageFile, ok bool)

GetMessageFile returns MessageFile and true boolean if ThreadSendRequestSum is MessageFile.

func (ThreadSendRequestSum) GetMessageText

func (s ThreadSendRequestSum) GetMessageText() (v MessageText, ok bool)

GetMessageText returns MessageText and true boolean if ThreadSendRequestSum is MessageText.

func (ThreadSendRequestSum) IsMessageFile

func (s ThreadSendRequestSum) IsMessageFile() bool

IsMessageFile reports whether ThreadSendRequestSum is MessageFile.

func (ThreadSendRequestSum) IsMessageText

func (s ThreadSendRequestSum) IsMessageText() bool

IsMessageText reports whether ThreadSendRequestSum is MessageText.

func (ThreadSendRequestSum) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*ThreadSendRequestSum) SetMessageFile

func (s *ThreadSendRequestSum) SetMessageFile(v MessageFile)

SetMessageFile sets ThreadSendRequestSum to MessageFile.

func (*ThreadSendRequestSum) SetMessageText

func (s *ThreadSendRequestSum) SetMessageText(v MessageText)

SetMessageText sets ThreadSendRequestSum to MessageText.

func (*ThreadSendRequestSum) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (ThreadSendRequestSum) Validate

func (s ThreadSendRequestSum) Validate() error

type ThreadSendRequestSumType

type ThreadSendRequestSumType string

ThreadSendRequestSumType is oneOf type of ThreadSendRequestSum.

const (
	MessageTextThreadSendRequestSum ThreadSendRequestSumType = "text"
	MessageFileThreadSendRequestSum ThreadSendRequestSumType = "file"
)

Possible values for ThreadSendRequestSumType.

type UserGetListPostOK

type UserGetListPostOK struct {
	Type                UserGetListPostOKType // switch on this field
	UserGetListResponse UserGetListResponse
	ErrorResponse       ErrorResponse
}

UserGetListPostOK represents sum type.

func NewErrorResponseUserGetListPostOK

func NewErrorResponseUserGetListPostOK(v ErrorResponse) UserGetListPostOK

NewErrorResponseUserGetListPostOK returns new UserGetListPostOK from ErrorResponse.

func NewUserGetListResponseUserGetListPostOK

func NewUserGetListResponseUserGetListPostOK(v UserGetListResponse) UserGetListPostOK

NewUserGetListResponseUserGetListPostOK returns new UserGetListPostOK from UserGetListResponse.

func (*UserGetListPostOK) Decode

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

Decode decodes UserGetListPostOK from json.

func (UserGetListPostOK) Encode

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

Encode encodes UserGetListPostOK as json.

func (UserGetListPostOK) GetErrorResponse

func (s UserGetListPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if UserGetListPostOK is ErrorResponse.

func (UserGetListPostOK) GetUserGetListResponse

func (s UserGetListPostOK) GetUserGetListResponse() (v UserGetListResponse, ok bool)

GetUserGetListResponse returns UserGetListResponse and true boolean if UserGetListPostOK is UserGetListResponse.

func (UserGetListPostOK) IsErrorResponse

func (s UserGetListPostOK) IsErrorResponse() bool

IsErrorResponse reports whether UserGetListPostOK is ErrorResponse.

func (UserGetListPostOK) IsUserGetListResponse

func (s UserGetListPostOK) IsUserGetListResponse() bool

IsUserGetListResponse reports whether UserGetListPostOK is UserGetListResponse.

func (UserGetListPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserGetListPostOK) SetErrorResponse

func (s *UserGetListPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets UserGetListPostOK to ErrorResponse.

func (*UserGetListPostOK) SetUserGetListResponse

func (s *UserGetListPostOK) SetUserGetListResponse(v UserGetListResponse)

SetUserGetListResponse sets UserGetListPostOK to UserGetListResponse.

func (*UserGetListPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (UserGetListPostOK) Validate

func (s UserGetListPostOK) Validate() error

type UserGetListPostOKType

type UserGetListPostOKType string

UserGetListPostOKType is oneOf type of UserGetListPostOK.

const (
	UserGetListResponseUserGetListPostOK UserGetListPostOKType = "ok"
	ErrorResponseUserGetListPostOK       UserGetListPostOKType = "error"
)

Possible values for UserGetListPostOKType.

type UserGetListResponse

type UserGetListResponse struct {
	Status   ResponseStatus              `json:"status"`
	Response UserGetListResponseResponse `json:"response"`
}

Ref: #/components/schemas/UserGetListResponse

func (*UserGetListResponse) Decode

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

Decode decodes UserGetListResponse from json.

func (*UserGetListResponse) Encode

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

Encode implements json.Marshaler.

func (*UserGetListResponse) GetResponse

GetResponse returns the value of Response.

func (*UserGetListResponse) GetStatus

func (s *UserGetListResponse) GetStatus() ResponseStatus

GetStatus returns the value of Status.

func (*UserGetListResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserGetListResponse) SetResponse

SetResponse sets the value of Response.

func (*UserGetListResponse) SetStatus

func (s *UserGetListResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*UserGetListResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UserGetListResponse) Validate

func (s *UserGetListResponse) Validate() error

type UserGetListResponseResponse

type UserGetListResponseResponse struct {
	UserList []UserGetListResponseResponseUserListItem `json:"user_list"`
}

func (*UserGetListResponseResponse) Decode

Decode decodes UserGetListResponseResponse from json.

func (*UserGetListResponseResponse) Encode

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

Encode implements json.Marshaler.

func (*UserGetListResponseResponse) GetUserList

GetUserList returns the value of UserList.

func (*UserGetListResponseResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserGetListResponseResponse) SetUserList

SetUserList sets the value of UserList.

func (*UserGetListResponseResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UserGetListResponseResponse) Validate

func (s *UserGetListResponseResponse) Validate() error

type UserGetListResponseResponseUserListItem

type UserGetListResponseResponseUserListItem struct {
	UserID        int64  `json:"user_id"`
	UserName      string `json:"user_name"`
	AvatarFileURL string `json:"avatar_file_url"`
}

func (*UserGetListResponseResponseUserListItem) Decode

Decode decodes UserGetListResponseResponseUserListItem from json.

func (*UserGetListResponseResponseUserListItem) Encode

Encode implements json.Marshaler.

func (*UserGetListResponseResponseUserListItem) GetAvatarFileURL

func (s *UserGetListResponseResponseUserListItem) GetAvatarFileURL() string

GetAvatarFileURL returns the value of AvatarFileURL.

func (*UserGetListResponseResponseUserListItem) GetUserID

GetUserID returns the value of UserID.

func (*UserGetListResponseResponseUserListItem) GetUserName

GetUserName returns the value of UserName.

func (*UserGetListResponseResponseUserListItem) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserGetListResponseResponseUserListItem) SetAvatarFileURL

func (s *UserGetListResponseResponseUserListItem) SetAvatarFileURL(val string)

SetAvatarFileURL sets the value of AvatarFileURL.

func (*UserGetListResponseResponseUserListItem) SetUserID

SetUserID sets the value of UserID.

func (*UserGetListResponseResponseUserListItem) SetUserName

func (s *UserGetListResponseResponseUserListItem) SetUserName(val string)

SetUserName sets the value of UserName.

func (*UserGetListResponseResponseUserListItem) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type UserInvoker

type UserInvoker interface {
	// UserGetListPost invokes POST /user/getList operation.
	//
	// Получить данные об участниках команды.
	//
	// POST /user/getList
	UserGetListPost(ctx context.Context, request *GetListRequest) (UserGetListPostOK, error)
	// UserSendPost invokes POST /user/send operation.
	//
	// Отправить сообщение от бота конкретному участнику.
	//
	// POST /user/send
	UserSendPost(ctx context.Context, request *UserSendRequest) (UserSendPostOK, error)
}

UserInvoker invokes operations described by OpenAPI v3 specification.

x-gen-operation-group: User

type UserSendPostOK

type UserSendPostOK struct {
	Type              UserSendPostOKType // switch on this field
	MessageIDResponse MessageIDResponse
	ErrorResponse     ErrorResponse
}

UserSendPostOK represents sum type.

func NewErrorResponseUserSendPostOK

func NewErrorResponseUserSendPostOK(v ErrorResponse) UserSendPostOK

NewErrorResponseUserSendPostOK returns new UserSendPostOK from ErrorResponse.

func NewMessageIDResponseUserSendPostOK

func NewMessageIDResponseUserSendPostOK(v MessageIDResponse) UserSendPostOK

NewMessageIDResponseUserSendPostOK returns new UserSendPostOK from MessageIDResponse.

func (*UserSendPostOK) Decode

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

Decode decodes UserSendPostOK from json.

func (UserSendPostOK) Encode

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

Encode encodes UserSendPostOK as json.

func (UserSendPostOK) GetErrorResponse

func (s UserSendPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if UserSendPostOK is ErrorResponse.

func (UserSendPostOK) GetMessageIDResponse

func (s UserSendPostOK) GetMessageIDResponse() (v MessageIDResponse, ok bool)

GetMessageIDResponse returns MessageIDResponse and true boolean if UserSendPostOK is MessageIDResponse.

func (UserSendPostOK) IsErrorResponse

func (s UserSendPostOK) IsErrorResponse() bool

IsErrorResponse reports whether UserSendPostOK is ErrorResponse.

func (UserSendPostOK) IsMessageIDResponse

func (s UserSendPostOK) IsMessageIDResponse() bool

IsMessageIDResponse reports whether UserSendPostOK is MessageIDResponse.

func (UserSendPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserSendPostOK) SetErrorResponse

func (s *UserSendPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets UserSendPostOK to ErrorResponse.

func (*UserSendPostOK) SetMessageIDResponse

func (s *UserSendPostOK) SetMessageIDResponse(v MessageIDResponse)

SetMessageIDResponse sets UserSendPostOK to MessageIDResponse.

func (*UserSendPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (UserSendPostOK) Validate

func (s UserSendPostOK) Validate() error

type UserSendPostOKType

type UserSendPostOKType string

UserSendPostOKType is oneOf type of UserSendPostOK.

const (
	MessageIDResponseUserSendPostOK UserSendPostOKType = "ok"
	ErrorResponseUserSendPostOK     UserSendPostOKType = "error"
)

Possible values for UserSendPostOKType.

type UserSendRequest

type UserSendRequest struct {
	UserID int64 `json:"user_id"`
	OneOf  UserSendRequestSum
}

Merged schema. Ref: #/components/schemas/UserSendRequest

func (*UserSendRequest) Decode

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

Decode decodes UserSendRequest from json.

func (*UserSendRequest) Encode

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

Encode implements json.Marshaler.

func (*UserSendRequest) GetOneOf

func (s *UserSendRequest) GetOneOf() UserSendRequestSum

GetOneOf returns the value of OneOf.

func (*UserSendRequest) GetUserID

func (s *UserSendRequest) GetUserID() int64

GetUserID returns the value of UserID.

func (*UserSendRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserSendRequest) SetOneOf

func (s *UserSendRequest) SetOneOf(val UserSendRequestSum)

SetOneOf sets the value of OneOf.

func (*UserSendRequest) SetUserID

func (s *UserSendRequest) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*UserSendRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*UserSendRequest) Validate

func (s *UserSendRequest) Validate() error

type UserSendRequestSum

type UserSendRequestSum struct {
	Type        UserSendRequestSumType // switch on this field
	MessageText MessageText
	MessageFile MessageFile
}

UserSendRequestSum represents sum type.

func NewMessageFileUserSendRequestSum

func NewMessageFileUserSendRequestSum(v MessageFile) UserSendRequestSum

NewMessageFileUserSendRequestSum returns new UserSendRequestSum from MessageFile.

func NewMessageTextUserSendRequestSum

func NewMessageTextUserSendRequestSum(v MessageText) UserSendRequestSum

NewMessageTextUserSendRequestSum returns new UserSendRequestSum from MessageText.

func (*UserSendRequestSum) Decode

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

Decode decodes UserSendRequestSum from json.

func (UserSendRequestSum) Encode

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

Encode encodes UserSendRequestSum as json.

func (UserSendRequestSum) GetMessageFile

func (s UserSendRequestSum) GetMessageFile() (v MessageFile, ok bool)

GetMessageFile returns MessageFile and true boolean if UserSendRequestSum is MessageFile.

func (UserSendRequestSum) GetMessageText

func (s UserSendRequestSum) GetMessageText() (v MessageText, ok bool)

GetMessageText returns MessageText and true boolean if UserSendRequestSum is MessageText.

func (UserSendRequestSum) IsMessageFile

func (s UserSendRequestSum) IsMessageFile() bool

IsMessageFile reports whether UserSendRequestSum is MessageFile.

func (UserSendRequestSum) IsMessageText

func (s UserSendRequestSum) IsMessageText() bool

IsMessageText reports whether UserSendRequestSum is MessageText.

func (UserSendRequestSum) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*UserSendRequestSum) SetMessageFile

func (s *UserSendRequestSum) SetMessageFile(v MessageFile)

SetMessageFile sets UserSendRequestSum to MessageFile.

func (*UserSendRequestSum) SetMessageText

func (s *UserSendRequestSum) SetMessageText(v MessageText)

SetMessageText sets UserSendRequestSum to MessageText.

func (*UserSendRequestSum) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (UserSendRequestSum) Validate

func (s UserSendRequestSum) Validate() error

type UserSendRequestSumType

type UserSendRequestSumType string

UserSendRequestSumType is oneOf type of UserSendRequestSum.

const (
	MessageTextUserSendRequestSum UserSendRequestSumType = "text"
	MessageFileUserSendRequestSum UserSendRequestSumType = "file"
)

Possible values for UserSendRequestSumType.

type WebhookBotVersion

type WebhookBotVersion struct {
	Version int `json:"version"`
}

Ref: #/components/schemas/WebhookBotVersion

func (*WebhookBotVersion) Decode

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

Decode decodes WebhookBotVersion from json.

func (*WebhookBotVersion) Encode

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

Encode implements json.Marshaler.

func (*WebhookBotVersion) GetVersion

func (s *WebhookBotVersion) GetVersion() int

GetVersion returns the value of Version.

func (*WebhookBotVersion) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookBotVersion) SetVersion

func (s *WebhookBotVersion) SetVersion(val int)

SetVersion sets the value of Version.

func (*WebhookBotVersion) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type WebhookGetVersionPostOK

type WebhookGetVersionPostOK struct {
	Type                      WebhookGetVersionPostOKType // switch on this field
	WebhookGetVersionResponse WebhookGetVersionResponse
	ErrorResponse             ErrorResponse
}

WebhookGetVersionPostOK represents sum type.

func NewErrorResponseWebhookGetVersionPostOK

func NewErrorResponseWebhookGetVersionPostOK(v ErrorResponse) WebhookGetVersionPostOK

NewErrorResponseWebhookGetVersionPostOK returns new WebhookGetVersionPostOK from ErrorResponse.

func NewWebhookGetVersionResponseWebhookGetVersionPostOK

func NewWebhookGetVersionResponseWebhookGetVersionPostOK(v WebhookGetVersionResponse) WebhookGetVersionPostOK

NewWebhookGetVersionResponseWebhookGetVersionPostOK returns new WebhookGetVersionPostOK from WebhookGetVersionResponse.

func (*WebhookGetVersionPostOK) Decode

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

Decode decodes WebhookGetVersionPostOK from json.

func (WebhookGetVersionPostOK) Encode

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

Encode encodes WebhookGetVersionPostOK as json.

func (WebhookGetVersionPostOK) GetErrorResponse

func (s WebhookGetVersionPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if WebhookGetVersionPostOK is ErrorResponse.

func (WebhookGetVersionPostOK) GetWebhookGetVersionResponse

func (s WebhookGetVersionPostOK) GetWebhookGetVersionResponse() (v WebhookGetVersionResponse, ok bool)

GetWebhookGetVersionResponse returns WebhookGetVersionResponse and true boolean if WebhookGetVersionPostOK is WebhookGetVersionResponse.

func (WebhookGetVersionPostOK) IsErrorResponse

func (s WebhookGetVersionPostOK) IsErrorResponse() bool

IsErrorResponse reports whether WebhookGetVersionPostOK is ErrorResponse.

func (WebhookGetVersionPostOK) IsWebhookGetVersionResponse

func (s WebhookGetVersionPostOK) IsWebhookGetVersionResponse() bool

IsWebhookGetVersionResponse reports whether WebhookGetVersionPostOK is WebhookGetVersionResponse.

func (WebhookGetVersionPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookGetVersionPostOK) SetErrorResponse

func (s *WebhookGetVersionPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets WebhookGetVersionPostOK to ErrorResponse.

func (*WebhookGetVersionPostOK) SetWebhookGetVersionResponse

func (s *WebhookGetVersionPostOK) SetWebhookGetVersionResponse(v WebhookGetVersionResponse)

SetWebhookGetVersionResponse sets WebhookGetVersionPostOK to WebhookGetVersionResponse.

func (*WebhookGetVersionPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (WebhookGetVersionPostOK) Validate

func (s WebhookGetVersionPostOK) Validate() error

type WebhookGetVersionPostOKType

type WebhookGetVersionPostOKType string

WebhookGetVersionPostOKType is oneOf type of WebhookGetVersionPostOK.

const (
	WebhookGetVersionResponseWebhookGetVersionPostOK WebhookGetVersionPostOKType = "ok"
	ErrorResponseWebhookGetVersionPostOK             WebhookGetVersionPostOKType = "error"
)

Possible values for WebhookGetVersionPostOKType.

type WebhookGetVersionResponse

type WebhookGetVersionResponse struct {
	Status   ResponseStatus    `json:"status"`
	Response WebhookBotVersion `json:"response"`
}

Ref: #/components/schemas/WebhookGetVersionResponse

func (*WebhookGetVersionResponse) Decode

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

Decode decodes WebhookGetVersionResponse from json.

func (*WebhookGetVersionResponse) Encode

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

Encode implements json.Marshaler.

func (*WebhookGetVersionResponse) GetResponse

GetResponse returns the value of Response.

func (*WebhookGetVersionResponse) GetStatus

GetStatus returns the value of Status.

func (*WebhookGetVersionResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookGetVersionResponse) SetResponse

func (s *WebhookGetVersionResponse) SetResponse(val WebhookBotVersion)

SetResponse sets the value of Response.

func (*WebhookGetVersionResponse) SetStatus

func (s *WebhookGetVersionResponse) SetStatus(val ResponseStatus)

SetStatus sets the value of Status.

func (*WebhookGetVersionResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookGetVersionResponse) Validate

func (s *WebhookGetVersionResponse) Validate() error

type WebhookHandler

type WebhookHandler interface {
	// CommandPost implements POST command operation.
	//
	CommandPost(ctx context.Context, req *WebhookRequest) (CommandPostRes, error)
}

WebhookHandler handles webhooks described by OpenAPI v3 specification.

type WebhookInvoker

type WebhookInvoker interface {
	// WebhookGetVersionPost invokes POST /webhook/getVersion operation.
	//
	// Получить текущую версию webhook бота.
	//
	// POST /webhook/getVersion
	WebhookGetVersionPost(ctx context.Context) (WebhookGetVersionPostOK, error)
	// WebhookSetVersionPost invokes POST /webhook/setVersion operation.
	//
	// Установить версию для webhook бота.
	//
	// POST /webhook/setVersion
	WebhookSetVersionPost(ctx context.Context, request *WebhookBotVersion) (WebhookSetVersionPostOK, error)
}

WebhookInvoker invokes operations described by OpenAPI v3 specification.

x-gen-operation-group: Webhook

type WebhookRequest

type WebhookRequest struct {
	GroupID   string             `json:"group_id"`
	MessageID string             `json:"message_id"`
	Text      Command            `json:"text"`
	Type      WebhookRequestType `json:"type"`
	UserID    int64              `json:"user_id"`
}

Ref: #/components/schemas/WebhookRequest

func (*WebhookRequest) Decode

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

Decode decodes WebhookRequest from json.

func (*WebhookRequest) Encode

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

Encode implements json.Marshaler.

func (*WebhookRequest) GetGroupID

func (s *WebhookRequest) GetGroupID() string

GetGroupID returns the value of GroupID.

func (*WebhookRequest) GetMessageID

func (s *WebhookRequest) GetMessageID() string

GetMessageID returns the value of MessageID.

func (*WebhookRequest) GetText

func (s *WebhookRequest) GetText() Command

GetText returns the value of Text.

func (*WebhookRequest) GetType

func (s *WebhookRequest) GetType() WebhookRequestType

GetType returns the value of Type.

func (*WebhookRequest) GetUserID

func (s *WebhookRequest) GetUserID() int64

GetUserID returns the value of UserID.

func (*WebhookRequest) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookRequest) SetGroupID

func (s *WebhookRequest) SetGroupID(val string)

SetGroupID sets the value of GroupID.

func (*WebhookRequest) SetMessageID

func (s *WebhookRequest) SetMessageID(val string)

SetMessageID sets the value of MessageID.

func (*WebhookRequest) SetText

func (s *WebhookRequest) SetText(val Command)

SetText sets the value of Text.

func (*WebhookRequest) SetType

func (s *WebhookRequest) SetType(val WebhookRequestType)

SetType sets the value of Type.

func (*WebhookRequest) SetUserID

func (s *WebhookRequest) SetUserID(val int64)

SetUserID sets the value of UserID.

func (*WebhookRequest) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookRequest) Validate

func (s *WebhookRequest) Validate() error

type WebhookRequestType

type WebhookRequestType string

Указывает, откуда пришла команда (single — чат с ботом; group — группа).

const (
	WebhookRequestTypeSingle WebhookRequestType = "single"
	WebhookRequestTypeGroup  WebhookRequestType = "group"
)

func (WebhookRequestType) AllValues

func (WebhookRequestType) AllValues() []WebhookRequestType

AllValues returns all WebhookRequestType values.

func (*WebhookRequestType) Decode

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

Decode decodes WebhookRequestType from json.

func (WebhookRequestType) Encode

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

Encode encodes WebhookRequestType as json.

func (WebhookRequestType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (WebhookRequestType) MarshalText

func (s WebhookRequestType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*WebhookRequestType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookRequestType) UnmarshalText

func (s *WebhookRequestType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (WebhookRequestType) Validate

func (s WebhookRequestType) Validate() error

type WebhookResponse

type WebhookResponse struct {
	Answer WebhookResponseAnswer `json:"answer"`
}

Ref: #/components/schemas/WebhookResponse

func (*WebhookResponse) Decode

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

Decode decodes WebhookResponse from json.

func (*WebhookResponse) Encode

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

Encode implements json.Marshaler.

func (*WebhookResponse) GetAnswer

func (s *WebhookResponse) GetAnswer() WebhookResponseAnswer

GetAnswer returns the value of Answer.

func (*WebhookResponse) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookResponse) SetAnswer

func (s *WebhookResponse) SetAnswer(val WebhookResponseAnswer)

SetAnswer sets the value of Answer.

func (*WebhookResponse) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookResponse) Validate

func (s *WebhookResponse) Validate() error

type WebhookResponseAnswer

type WebhookResponseAnswer struct {
	Type                              WebhookResponseAnswerType // switch on this field
	WebhookResponseMessageSend        WebhookResponseMessageSend
	WebhookResponseThreadSend         WebhookResponseThreadSend
	WebhookResponseMessageAddReaction WebhookResponseMessageAddReaction
}

WebhookResponseAnswer represents sum type.

func NewWebhookResponseMessageAddReactionWebhookResponseAnswer

func NewWebhookResponseMessageAddReactionWebhookResponseAnswer(v WebhookResponseMessageAddReaction) WebhookResponseAnswer

NewWebhookResponseMessageAddReactionWebhookResponseAnswer returns new WebhookResponseAnswer from WebhookResponseMessageAddReaction.

func NewWebhookResponseMessageSendWebhookResponseAnswer

func NewWebhookResponseMessageSendWebhookResponseAnswer(v WebhookResponseMessageSend) WebhookResponseAnswer

NewWebhookResponseMessageSendWebhookResponseAnswer returns new WebhookResponseAnswer from WebhookResponseMessageSend.

func NewWebhookResponseThreadSendWebhookResponseAnswer

func NewWebhookResponseThreadSendWebhookResponseAnswer(v WebhookResponseThreadSend) WebhookResponseAnswer

NewWebhookResponseThreadSendWebhookResponseAnswer returns new WebhookResponseAnswer from WebhookResponseThreadSend.

func (*WebhookResponseAnswer) Decode

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

Decode decodes WebhookResponseAnswer from json.

func (WebhookResponseAnswer) Encode

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

Encode encodes WebhookResponseAnswer as json.

func (WebhookResponseAnswer) GetWebhookResponseMessageAddReaction

func (s WebhookResponseAnswer) GetWebhookResponseMessageAddReaction() (v WebhookResponseMessageAddReaction, ok bool)

GetWebhookResponseMessageAddReaction returns WebhookResponseMessageAddReaction and true boolean if WebhookResponseAnswer is WebhookResponseMessageAddReaction.

func (WebhookResponseAnswer) GetWebhookResponseMessageSend

func (s WebhookResponseAnswer) GetWebhookResponseMessageSend() (v WebhookResponseMessageSend, ok bool)

GetWebhookResponseMessageSend returns WebhookResponseMessageSend and true boolean if WebhookResponseAnswer is WebhookResponseMessageSend.

func (WebhookResponseAnswer) GetWebhookResponseThreadSend

func (s WebhookResponseAnswer) GetWebhookResponseThreadSend() (v WebhookResponseThreadSend, ok bool)

GetWebhookResponseThreadSend returns WebhookResponseThreadSend and true boolean if WebhookResponseAnswer is WebhookResponseThreadSend.

func (WebhookResponseAnswer) IsWebhookResponseMessageAddReaction

func (s WebhookResponseAnswer) IsWebhookResponseMessageAddReaction() bool

IsWebhookResponseMessageAddReaction reports whether WebhookResponseAnswer is WebhookResponseMessageAddReaction.

func (WebhookResponseAnswer) IsWebhookResponseMessageSend

func (s WebhookResponseAnswer) IsWebhookResponseMessageSend() bool

IsWebhookResponseMessageSend reports whether WebhookResponseAnswer is WebhookResponseMessageSend.

func (WebhookResponseAnswer) IsWebhookResponseThreadSend

func (s WebhookResponseAnswer) IsWebhookResponseThreadSend() bool

IsWebhookResponseThreadSend reports whether WebhookResponseAnswer is WebhookResponseThreadSend.

func (WebhookResponseAnswer) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookResponseAnswer) SetWebhookResponseMessageAddReaction

func (s *WebhookResponseAnswer) SetWebhookResponseMessageAddReaction(v WebhookResponseMessageAddReaction)

SetWebhookResponseMessageAddReaction sets WebhookResponseAnswer to WebhookResponseMessageAddReaction.

func (*WebhookResponseAnswer) SetWebhookResponseMessageSend

func (s *WebhookResponseAnswer) SetWebhookResponseMessageSend(v WebhookResponseMessageSend)

SetWebhookResponseMessageSend sets WebhookResponseAnswer to WebhookResponseMessageSend.

func (*WebhookResponseAnswer) SetWebhookResponseThreadSend

func (s *WebhookResponseAnswer) SetWebhookResponseThreadSend(v WebhookResponseThreadSend)

SetWebhookResponseThreadSend sets WebhookResponseAnswer to WebhookResponseThreadSend.

func (*WebhookResponseAnswer) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (WebhookResponseAnswer) Validate

func (s WebhookResponseAnswer) Validate() error

type WebhookResponseAnswerType

type WebhookResponseAnswerType string

WebhookResponseAnswerType is oneOf type of WebhookResponseAnswer.

const (
	WebhookResponseMessageSendWebhookResponseAnswer        WebhookResponseAnswerType = "message_send"
	WebhookResponseThreadSendWebhookResponseAnswer         WebhookResponseAnswerType = "thread_send"
	WebhookResponseMessageAddReactionWebhookResponseAnswer WebhookResponseAnswerType = "message_addreaction"
)

Possible values for WebhookResponseAnswerType.

type WebhookResponseMessageAddReaction

type WebhookResponseMessageAddReaction struct {
	Action WebhookResponseType                   `json:"action"`
	Post   WebhookResponseMessageAddReactionPost `json:"post"`
}

Действие для установки реакции на сообщение-команду пользователя. Ref: #/components/schemas/WebhookResponseMessageAddReaction

func (*WebhookResponseMessageAddReaction) Decode

Decode decodes WebhookResponseMessageAddReaction from json.

func (*WebhookResponseMessageAddReaction) Encode

Encode implements json.Marshaler.

func (*WebhookResponseMessageAddReaction) GetAction

GetAction returns the value of Action.

func (*WebhookResponseMessageAddReaction) GetPost

GetPost returns the value of Post.

func (*WebhookResponseMessageAddReaction) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookResponseMessageAddReaction) SetAction

SetAction sets the value of Action.

func (*WebhookResponseMessageAddReaction) SetPost

SetPost sets the value of Post.

func (*WebhookResponseMessageAddReaction) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookResponseMessageAddReaction) Validate

type WebhookResponseMessageAddReactionPost

type WebhookResponseMessageAddReactionPost struct {
	Reaction Reaction `json:"reaction"`
}

func (*WebhookResponseMessageAddReactionPost) Decode

Decode decodes WebhookResponseMessageAddReactionPost from json.

func (*WebhookResponseMessageAddReactionPost) Encode

Encode implements json.Marshaler.

func (*WebhookResponseMessageAddReactionPost) GetReaction

GetReaction returns the value of Reaction.

func (*WebhookResponseMessageAddReactionPost) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookResponseMessageAddReactionPost) SetReaction

func (s *WebhookResponseMessageAddReactionPost) SetReaction(val Reaction)

SetReaction sets the value of Reaction.

func (*WebhookResponseMessageAddReactionPost) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

type WebhookResponseMessageSend

type WebhookResponseMessageSend struct {
	Action WebhookResponseType `json:"action"`
	Post   Message             `json:"post"`
}

Действие для отправки в диалог сообщения от бота на команду пользователя. Ref: #/components/schemas/WebhookResponseMessageSend

func (*WebhookResponseMessageSend) Decode

Decode decodes WebhookResponseMessageSend from json.

func (*WebhookResponseMessageSend) Encode

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

Encode implements json.Marshaler.

func (*WebhookResponseMessageSend) GetAction

GetAction returns the value of Action.

func (*WebhookResponseMessageSend) GetPost

func (s *WebhookResponseMessageSend) GetPost() Message

GetPost returns the value of Post.

func (*WebhookResponseMessageSend) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookResponseMessageSend) SetAction

SetAction sets the value of Action.

func (*WebhookResponseMessageSend) SetPost

func (s *WebhookResponseMessageSend) SetPost(val Message)

SetPost sets the value of Post.

func (*WebhookResponseMessageSend) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookResponseMessageSend) Validate

func (s *WebhookResponseMessageSend) Validate() error

type WebhookResponseThreadSend

type WebhookResponseThreadSend struct {
	Action WebhookResponseType `json:"action"`
	Post   Message             `json:"post"`
}

Действие для отправки в тред сообщения от бота на команду пользователя. Ref: #/components/schemas/WebhookResponseThreadSend

func (*WebhookResponseThreadSend) Decode

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

Decode decodes WebhookResponseThreadSend from json.

func (*WebhookResponseThreadSend) Encode

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

Encode implements json.Marshaler.

func (*WebhookResponseThreadSend) GetAction

GetAction returns the value of Action.

func (*WebhookResponseThreadSend) GetPost

func (s *WebhookResponseThreadSend) GetPost() Message

GetPost returns the value of Post.

func (*WebhookResponseThreadSend) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookResponseThreadSend) SetAction

SetAction sets the value of Action.

func (*WebhookResponseThreadSend) SetPost

func (s *WebhookResponseThreadSend) SetPost(val Message)

SetPost sets the value of Post.

func (*WebhookResponseThreadSend) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookResponseThreadSend) Validate

func (s *WebhookResponseThreadSend) Validate() error

type WebhookResponseType

type WebhookResponseType string

Выполняемое действие в ответ на команду. Ref: #/components/schemas/WebhookResponseType

const (
	WebhookResponseTypeMessageSend        WebhookResponseType = "message_send"
	WebhookResponseTypeThreadSend         WebhookResponseType = "thread_send"
	WebhookResponseTypeMessageAddreaction WebhookResponseType = "message_addreaction"
)

func (WebhookResponseType) AllValues

AllValues returns all WebhookResponseType values.

func (*WebhookResponseType) Decode

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

Decode decodes WebhookResponseType from json.

func (WebhookResponseType) Encode

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

Encode encodes WebhookResponseType as json.

func (WebhookResponseType) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (WebhookResponseType) MarshalText

func (s WebhookResponseType) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (*WebhookResponseType) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (*WebhookResponseType) UnmarshalText

func (s *WebhookResponseType) UnmarshalText(data []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

func (WebhookResponseType) Validate

func (s WebhookResponseType) Validate() error

type WebhookServer

type WebhookServer struct {
	// contains filtered or unexported fields
}

WebhookServer implements http server based on OpenAPI v3 specification and calls WebhookHandler to handle requests.

func NewWebhookServer

func NewWebhookServer(h WebhookHandler, sec SecuritySource, opts ...ServerOption) (*WebhookServer, error)

NewWebhookServer creates new WebhookServer.

func (*WebhookServer) Handle

func (s *WebhookServer) Handle(webhookName string, w http.ResponseWriter, r *http.Request) bool

Handle handles webhook request.

Returns true if there is a webhook handler for given name and requested method.

func (*WebhookServer) Handler

func (s *WebhookServer) Handler(webhookName string) http.Handler

Handler returns http.Handler for webhook.

Returns NotFound handler if spec doesn't contain webhook with given name.

Returned handler calls MethodNotAllowed handler if webhook doesn't define requested method.

type WebhookSetVersionPostOK

type WebhookSetVersionPostOK struct {
	Type          WebhookSetVersionPostOKType // switch on this field
	EmptyResponse EmptyResponse
	ErrorResponse ErrorResponse
}

WebhookSetVersionPostOK represents sum type.

func NewEmptyResponseWebhookSetVersionPostOK

func NewEmptyResponseWebhookSetVersionPostOK(v EmptyResponse) WebhookSetVersionPostOK

NewEmptyResponseWebhookSetVersionPostOK returns new WebhookSetVersionPostOK from EmptyResponse.

func NewErrorResponseWebhookSetVersionPostOK

func NewErrorResponseWebhookSetVersionPostOK(v ErrorResponse) WebhookSetVersionPostOK

NewErrorResponseWebhookSetVersionPostOK returns new WebhookSetVersionPostOK from ErrorResponse.

func (*WebhookSetVersionPostOK) Decode

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

Decode decodes WebhookSetVersionPostOK from json.

func (WebhookSetVersionPostOK) Encode

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

Encode encodes WebhookSetVersionPostOK as json.

func (WebhookSetVersionPostOK) GetEmptyResponse

func (s WebhookSetVersionPostOK) GetEmptyResponse() (v EmptyResponse, ok bool)

GetEmptyResponse returns EmptyResponse and true boolean if WebhookSetVersionPostOK is EmptyResponse.

func (WebhookSetVersionPostOK) GetErrorResponse

func (s WebhookSetVersionPostOK) GetErrorResponse() (v ErrorResponse, ok bool)

GetErrorResponse returns ErrorResponse and true boolean if WebhookSetVersionPostOK is ErrorResponse.

func (WebhookSetVersionPostOK) IsEmptyResponse

func (s WebhookSetVersionPostOK) IsEmptyResponse() bool

IsEmptyResponse reports whether WebhookSetVersionPostOK is EmptyResponse.

func (WebhookSetVersionPostOK) IsErrorResponse

func (s WebhookSetVersionPostOK) IsErrorResponse() bool

IsErrorResponse reports whether WebhookSetVersionPostOK is ErrorResponse.

func (WebhookSetVersionPostOK) MarshalJSON

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

MarshalJSON implements stdjson.Marshaler.

func (*WebhookSetVersionPostOK) SetEmptyResponse

func (s *WebhookSetVersionPostOK) SetEmptyResponse(v EmptyResponse)

SetEmptyResponse sets WebhookSetVersionPostOK to EmptyResponse.

func (*WebhookSetVersionPostOK) SetErrorResponse

func (s *WebhookSetVersionPostOK) SetErrorResponse(v ErrorResponse)

SetErrorResponse sets WebhookSetVersionPostOK to ErrorResponse.

func (*WebhookSetVersionPostOK) UnmarshalJSON

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

UnmarshalJSON implements stdjson.Unmarshaler.

func (WebhookSetVersionPostOK) Validate

func (s WebhookSetVersionPostOK) Validate() error

type WebhookSetVersionPostOKType

type WebhookSetVersionPostOKType string

WebhookSetVersionPostOKType is oneOf type of WebhookSetVersionPostOK.

const (
	EmptyResponseWebhookSetVersionPostOK WebhookSetVersionPostOKType = "ok"
	ErrorResponseWebhookSetVersionPostOK WebhookSetVersionPostOKType = "error"
)

Possible values for WebhookSetVersionPostOKType.

Jump to

Keyboard shortcuts

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