Documentation
¶
Overview ¶
Code generated by ogen, DO NOT EDIT.
Index ¶
- Constants
- func WithServerURL(ctx context.Context, u *url.URL) context.Context
- type AuthToken
- type Client
- func (c *Client) CommandGetListPost(ctx context.Context) (CommandGetListPostOK, error)
- func (c *Client) CommandUpdatePost(ctx context.Context, request *CommandListRequest) (CommandUpdatePostOK, error)
- func (c *Client) FileGetUrlPost(ctx context.Context) (FileGetUrlPostOK, error)
- func (c *Client) GroupGetListPost(ctx context.Context, request *GetListRequest) (GroupGetListPostOK, error)
- func (c *Client) GroupSendPost(ctx context.Context, request *GroupSendRequest) (GroupSendPostOK, error)
- func (c *Client) MessageAddReactionPost(ctx context.Context, request *MessageAddReactionRequest) (MessageAddReactionPostOK, error)
- func (c *Client) MessageRemoveReactionPost(ctx context.Context, request *MessageRemoveReactionRequest) (MessageRemoveReactionPostOK, error)
- func (c *Client) Post(ctx context.Context, request *PostReq) (PostOK, error)
- func (c *Client) ThreadSendPost(ctx context.Context, request *ThreadSendRequest) (ThreadSendPostOK, error)
- func (c *Client) UserGetListPost(ctx context.Context, request *GetListRequest) (UserGetListPostOK, error)
- func (c *Client) UserSendPost(ctx context.Context, request *UserSendRequest) (UserSendPostOK, error)
- func (c *Client) WebhookGetVersionPost(ctx context.Context) (WebhookGetVersionPostOK, error)
- func (c *Client) WebhookSetVersionPost(ctx context.Context, request *WebhookBotVersion) (WebhookSetVersionPostOK, error)
- type ClientOption
- type Command
- type CommandGetListPostOK
- func (s *CommandGetListPostOK) Decode(d *jx.Decoder) error
- func (s CommandGetListPostOK) Encode(e *jx.Encoder)
- func (s CommandGetListPostOK) GetCommandListResponse() (v CommandListResponse, ok bool)
- func (s CommandGetListPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s CommandGetListPostOK) IsCommandListResponse() bool
- func (s CommandGetListPostOK) IsErrorResponse() bool
- func (s CommandGetListPostOK) MarshalJSON() ([]byte, error)
- func (s *CommandGetListPostOK) SetCommandListResponse(v CommandListResponse)
- func (s *CommandGetListPostOK) SetErrorResponse(v ErrorResponse)
- func (s *CommandGetListPostOK) UnmarshalJSON(data []byte) error
- func (s CommandGetListPostOK) Validate() error
- type CommandGetListPostOKType
- type CommandInvoker
- type CommandList
- type CommandListRequest
- func (s *CommandListRequest) Decode(d *jx.Decoder) error
- func (s *CommandListRequest) Encode(e *jx.Encoder)
- func (s *CommandListRequest) GetCommandList() CommandList
- func (s *CommandListRequest) MarshalJSON() ([]byte, error)
- func (s *CommandListRequest) SetCommandList(val CommandList)
- func (s *CommandListRequest) UnmarshalJSON(data []byte) error
- func (s *CommandListRequest) Validate() error
- type CommandListResponse
- func (s *CommandListResponse) Decode(d *jx.Decoder) error
- func (s *CommandListResponse) Encode(e *jx.Encoder)
- func (s *CommandListResponse) GetResponse() CommandListResponseResponse
- func (s *CommandListResponse) GetStatus() ResponseStatus
- func (s *CommandListResponse) MarshalJSON() ([]byte, error)
- func (s *CommandListResponse) SetResponse(val CommandListResponseResponse)
- func (s *CommandListResponse) SetStatus(val ResponseStatus)
- func (s *CommandListResponse) UnmarshalJSON(data []byte) error
- func (s *CommandListResponse) Validate() error
- type CommandListResponseResponse
- func (s *CommandListResponseResponse) Decode(d *jx.Decoder) error
- func (s *CommandListResponseResponse) Encode(e *jx.Encoder)
- func (s *CommandListResponseResponse) GetCommandList() CommandList
- func (s *CommandListResponseResponse) MarshalJSON() ([]byte, error)
- func (s *CommandListResponseResponse) SetCommandList(val CommandList)
- func (s *CommandListResponseResponse) UnmarshalJSON(data []byte) error
- func (s *CommandListResponseResponse) Validate() error
- type CommandPostNoContent
- type CommandPostRes
- type CommandUpdatePostOK
- func (s *CommandUpdatePostOK) Decode(d *jx.Decoder) error
- func (s CommandUpdatePostOK) Encode(e *jx.Encoder)
- func (s CommandUpdatePostOK) GetEmptyResponse() (v EmptyResponse, ok bool)
- func (s CommandUpdatePostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s CommandUpdatePostOK) IsEmptyResponse() bool
- func (s CommandUpdatePostOK) IsErrorResponse() bool
- func (s CommandUpdatePostOK) MarshalJSON() ([]byte, error)
- func (s *CommandUpdatePostOK) SetEmptyResponse(v EmptyResponse)
- func (s *CommandUpdatePostOK) SetErrorResponse(v ErrorResponse)
- func (s *CommandUpdatePostOK) UnmarshalJSON(data []byte) error
- func (s CommandUpdatePostOK) Validate() error
- type CommandUpdatePostOKType
- type EmptyResponse
- func (s *EmptyResponse) Decode(d *jx.Decoder) error
- func (s *EmptyResponse) Encode(e *jx.Encoder)
- func (s *EmptyResponse) GetStatus() ResponseStatus
- func (s *EmptyResponse) MarshalJSON() ([]byte, error)
- func (s *EmptyResponse) SetStatus(val ResponseStatus)
- func (s *EmptyResponse) UnmarshalJSON(data []byte) error
- func (s *EmptyResponse) Validate() error
- type ErrorHandler
- type ErrorResponse
- func (s *ErrorResponse) Decode(d *jx.Decoder) error
- func (s *ErrorResponse) Encode(e *jx.Encoder)
- func (s *ErrorResponse) GetResponse() ErrorResponseResponse
- func (s *ErrorResponse) GetStatus() ResponseStatus
- func (s *ErrorResponse) MarshalJSON() ([]byte, error)
- func (s *ErrorResponse) SetResponse(val ErrorResponseResponse)
- func (s *ErrorResponse) SetStatus(val ResponseStatus)
- func (s *ErrorResponse) UnmarshalJSON(data []byte) error
- func (s *ErrorResponse) Validate() error
- type ErrorResponseResponse
- func (s *ErrorResponseResponse) Decode(d *jx.Decoder) error
- func (s *ErrorResponseResponse) Encode(e *jx.Encoder)
- func (s *ErrorResponseResponse) GetErrorCode() ErrorResponseResponseErrorCode
- func (s *ErrorResponseResponse) GetMessage() OptString
- func (s *ErrorResponseResponse) MarshalJSON() ([]byte, error)
- func (s *ErrorResponseResponse) SetErrorCode(val ErrorResponseResponseErrorCode)
- func (s *ErrorResponseResponse) SetMessage(val OptString)
- func (s *ErrorResponseResponse) UnmarshalJSON(data []byte) error
- func (s *ErrorResponseResponse) Validate() error
- type ErrorResponseResponseErrorCode
- func (ErrorResponseResponseErrorCode) AllValues() []ErrorResponseResponseErrorCode
- func (s *ErrorResponseResponseErrorCode) Decode(d *jx.Decoder) error
- func (s ErrorResponseResponseErrorCode) Encode(e *jx.Encoder)
- func (s ErrorResponseResponseErrorCode) MarshalJSON() ([]byte, error)
- func (s *ErrorResponseResponseErrorCode) UnmarshalJSON(data []byte) error
- func (s ErrorResponseResponseErrorCode) Validate() error
- type FileGetURLResponse
- func (s *FileGetURLResponse) Decode(d *jx.Decoder) error
- func (s *FileGetURLResponse) Encode(e *jx.Encoder)
- func (s *FileGetURLResponse) GetResponse() FileGetURLResponseResponse
- func (s *FileGetURLResponse) GetStatus() ResponseStatus
- func (s *FileGetURLResponse) MarshalJSON() ([]byte, error)
- func (s *FileGetURLResponse) SetResponse(val FileGetURLResponseResponse)
- func (s *FileGetURLResponse) SetStatus(val ResponseStatus)
- func (s *FileGetURLResponse) UnmarshalJSON(data []byte) error
- func (s *FileGetURLResponse) Validate() error
- type FileGetURLResponseResponse
- func (s *FileGetURLResponseResponse) Decode(d *jx.Decoder) error
- func (s *FileGetURLResponseResponse) Encode(e *jx.Encoder)
- func (s *FileGetURLResponseResponse) GetFileToken() string
- func (s *FileGetURLResponseResponse) GetNodeURL() url.URL
- func (s *FileGetURLResponseResponse) MarshalJSON() ([]byte, error)
- func (s *FileGetURLResponseResponse) SetFileToken(val string)
- func (s *FileGetURLResponseResponse) SetNodeURL(val url.URL)
- func (s *FileGetURLResponseResponse) UnmarshalJSON(data []byte) error
- type FileGetUrlPostOK
- func (s *FileGetUrlPostOK) Decode(d *jx.Decoder) error
- func (s FileGetUrlPostOK) Encode(e *jx.Encoder)
- func (s FileGetUrlPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s FileGetUrlPostOK) GetFileGetURLResponse() (v FileGetURLResponse, ok bool)
- func (s FileGetUrlPostOK) IsErrorResponse() bool
- func (s FileGetUrlPostOK) IsFileGetURLResponse() bool
- func (s FileGetUrlPostOK) MarshalJSON() ([]byte, error)
- func (s *FileGetUrlPostOK) SetErrorResponse(v ErrorResponse)
- func (s *FileGetUrlPostOK) SetFileGetURLResponse(v FileGetURLResponse)
- func (s *FileGetUrlPostOK) UnmarshalJSON(data []byte) error
- func (s FileGetUrlPostOK) Validate() error
- type FileGetUrlPostOKType
- type FileInvoker
- type FileUploadResponse
- func (s *FileUploadResponse) Decode(d *jx.Decoder) error
- func (s *FileUploadResponse) Encode(e *jx.Encoder)
- func (s *FileUploadResponse) GetResponse() FileUploadResponseResponse
- func (s *FileUploadResponse) GetStatus() ResponseStatus
- func (s *FileUploadResponse) MarshalJSON() ([]byte, error)
- func (s *FileUploadResponse) SetResponse(val FileUploadResponseResponse)
- func (s *FileUploadResponse) SetStatus(val ResponseStatus)
- func (s *FileUploadResponse) UnmarshalJSON(data []byte) error
- func (s *FileUploadResponse) Validate() error
- type FileUploadResponseResponse
- func (s *FileUploadResponseResponse) Decode(d *jx.Decoder) error
- func (s *FileUploadResponseResponse) Encode(e *jx.Encoder)
- func (s *FileUploadResponseResponse) GetFileID() string
- func (s *FileUploadResponseResponse) MarshalJSON() ([]byte, error)
- func (s *FileUploadResponseResponse) SetFileID(val string)
- func (s *FileUploadResponseResponse) UnmarshalJSON(data []byte) error
- type GetListRequest
- func (s *GetListRequest) Decode(d *jx.Decoder) error
- func (s *GetListRequest) Encode(e *jx.Encoder)
- func (s *GetListRequest) GetCount() OptInt
- func (s *GetListRequest) GetOffset() OptInt
- func (s *GetListRequest) MarshalJSON() ([]byte, error)
- func (s *GetListRequest) SetCount(val OptInt)
- func (s *GetListRequest) SetOffset(val OptInt)
- func (s *GetListRequest) UnmarshalJSON(data []byte) error
- func (s *GetListRequest) Validate() error
- type GroupGetListPostOK
- func (s *GroupGetListPostOK) Decode(d *jx.Decoder) error
- func (s GroupGetListPostOK) Encode(e *jx.Encoder)
- func (s GroupGetListPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s GroupGetListPostOK) GetGroupGetListResponse() (v GroupGetListResponse, ok bool)
- func (s GroupGetListPostOK) IsErrorResponse() bool
- func (s GroupGetListPostOK) IsGroupGetListResponse() bool
- func (s GroupGetListPostOK) MarshalJSON() ([]byte, error)
- func (s *GroupGetListPostOK) SetErrorResponse(v ErrorResponse)
- func (s *GroupGetListPostOK) SetGroupGetListResponse(v GroupGetListResponse)
- func (s *GroupGetListPostOK) UnmarshalJSON(data []byte) error
- func (s GroupGetListPostOK) Validate() error
- type GroupGetListPostOKType
- type GroupGetListResponse
- func (s *GroupGetListResponse) Decode(d *jx.Decoder) error
- func (s *GroupGetListResponse) Encode(e *jx.Encoder)
- func (s *GroupGetListResponse) GetResponse() GroupGetListResponseResponse
- func (s *GroupGetListResponse) GetStatus() ResponseStatus
- func (s *GroupGetListResponse) MarshalJSON() ([]byte, error)
- func (s *GroupGetListResponse) SetResponse(val GroupGetListResponseResponse)
- func (s *GroupGetListResponse) SetStatus(val ResponseStatus)
- func (s *GroupGetListResponse) UnmarshalJSON(data []byte) error
- func (s *GroupGetListResponse) Validate() error
- type GroupGetListResponseResponse
- func (s *GroupGetListResponseResponse) Decode(d *jx.Decoder) error
- func (s *GroupGetListResponseResponse) Encode(e *jx.Encoder)
- func (s *GroupGetListResponseResponse) GetGroupList() []GroupGetListResponseResponseGroupListItem
- func (s *GroupGetListResponseResponse) MarshalJSON() ([]byte, error)
- func (s *GroupGetListResponseResponse) SetGroupList(val []GroupGetListResponseResponseGroupListItem)
- func (s *GroupGetListResponseResponse) UnmarshalJSON(data []byte) error
- func (s *GroupGetListResponseResponse) Validate() error
- type GroupGetListResponseResponseGroupListItem
- func (s *GroupGetListResponseResponseGroupListItem) Decode(d *jx.Decoder) error
- func (s *GroupGetListResponseResponseGroupListItem) Encode(e *jx.Encoder)
- func (s *GroupGetListResponseResponseGroupListItem) GetAvatarFileURL() string
- func (s *GroupGetListResponseResponseGroupListItem) GetGroupID() string
- func (s *GroupGetListResponseResponseGroupListItem) GetName() string
- func (s *GroupGetListResponseResponseGroupListItem) MarshalJSON() ([]byte, error)
- func (s *GroupGetListResponseResponseGroupListItem) SetAvatarFileURL(val string)
- func (s *GroupGetListResponseResponseGroupListItem) SetGroupID(val string)
- func (s *GroupGetListResponseResponseGroupListItem) SetName(val string)
- func (s *GroupGetListResponseResponseGroupListItem) UnmarshalJSON(data []byte) error
- type GroupInvoker
- type GroupSendPostOK
- func (s *GroupSendPostOK) Decode(d *jx.Decoder) error
- func (s GroupSendPostOK) Encode(e *jx.Encoder)
- func (s GroupSendPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s GroupSendPostOK) GetMessageIDResponse() (v MessageIDResponse, ok bool)
- func (s GroupSendPostOK) IsErrorResponse() bool
- func (s GroupSendPostOK) IsMessageIDResponse() bool
- func (s GroupSendPostOK) MarshalJSON() ([]byte, error)
- func (s *GroupSendPostOK) SetErrorResponse(v ErrorResponse)
- func (s *GroupSendPostOK) SetMessageIDResponse(v MessageIDResponse)
- func (s *GroupSendPostOK) UnmarshalJSON(data []byte) error
- func (s GroupSendPostOK) Validate() error
- type GroupSendPostOKType
- type GroupSendRequest
- func (s *GroupSendRequest) Decode(d *jx.Decoder) error
- func (s *GroupSendRequest) Encode(e *jx.Encoder)
- func (s *GroupSendRequest) GetGroupID() string
- func (s *GroupSendRequest) GetOneOf() GroupSendRequestSum
- func (s *GroupSendRequest) MarshalJSON() ([]byte, error)
- func (s *GroupSendRequest) SetGroupID(val string)
- func (s *GroupSendRequest) SetOneOf(val GroupSendRequestSum)
- func (s *GroupSendRequest) UnmarshalJSON(data []byte) error
- func (s *GroupSendRequest) Validate() error
- type GroupSendRequestSum
- func (s *GroupSendRequestSum) Decode(d *jx.Decoder) error
- func (s GroupSendRequestSum) Encode(e *jx.Encoder)
- func (s GroupSendRequestSum) GetMessageFile() (v MessageFile, ok bool)
- func (s GroupSendRequestSum) GetMessageText() (v MessageText, ok bool)
- func (s GroupSendRequestSum) IsMessageFile() bool
- func (s GroupSendRequestSum) IsMessageText() bool
- func (s GroupSendRequestSum) MarshalJSON() ([]byte, error)
- func (s *GroupSendRequestSum) SetMessageFile(v MessageFile)
- func (s *GroupSendRequestSum) SetMessageText(v MessageText)
- func (s *GroupSendRequestSum) UnmarshalJSON(data []byte) error
- func (s GroupSendRequestSum) Validate() error
- type GroupSendRequestSumType
- type Invoker
- type Message
- func (s *Message) Decode(d *jx.Decoder) error
- func (s Message) Encode(e *jx.Encoder)
- func (s Message) GetMessageFile() (v MessageFile, ok bool)
- func (s Message) GetMessageText() (v MessageText, ok bool)
- func (s Message) IsMessageFile() bool
- func (s Message) IsMessageText() bool
- func (s Message) MarshalJSON() ([]byte, error)
- func (s *Message) SetMessageFile(v MessageFile)
- func (s *Message) SetMessageText(v MessageText)
- func (s *Message) UnmarshalJSON(data []byte) error
- func (s Message) Validate() error
- type MessageAddReactionPostOK
- func (s *MessageAddReactionPostOK) Decode(d *jx.Decoder) error
- func (s MessageAddReactionPostOK) Encode(e *jx.Encoder)
- func (s MessageAddReactionPostOK) GetEmptyResponse() (v EmptyResponse, ok bool)
- func (s MessageAddReactionPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s MessageAddReactionPostOK) IsEmptyResponse() bool
- func (s MessageAddReactionPostOK) IsErrorResponse() bool
- func (s MessageAddReactionPostOK) MarshalJSON() ([]byte, error)
- func (s *MessageAddReactionPostOK) SetEmptyResponse(v EmptyResponse)
- func (s *MessageAddReactionPostOK) SetErrorResponse(v ErrorResponse)
- func (s *MessageAddReactionPostOK) UnmarshalJSON(data []byte) error
- func (s MessageAddReactionPostOK) Validate() error
- type MessageAddReactionPostOKType
- type MessageAddReactionRequest
- func (s *MessageAddReactionRequest) Decode(d *jx.Decoder) error
- func (s *MessageAddReactionRequest) Encode(e *jx.Encoder)
- func (s *MessageAddReactionRequest) GetMessageID() string
- func (s *MessageAddReactionRequest) GetReaction() Reaction
- func (s *MessageAddReactionRequest) MarshalJSON() ([]byte, error)
- func (s *MessageAddReactionRequest) SetMessageID(val string)
- func (s *MessageAddReactionRequest) SetReaction(val Reaction)
- func (s *MessageAddReactionRequest) UnmarshalJSON(data []byte) error
- type MessageFile
- func (s *MessageFile) Decode(d *jx.Decoder) error
- func (s *MessageFile) Encode(e *jx.Encoder)
- func (s *MessageFile) GetFileID() string
- func (s *MessageFile) GetType() MessageKind
- func (s *MessageFile) MarshalJSON() ([]byte, error)
- func (s *MessageFile) SetFileID(val string)
- func (s *MessageFile) SetType(val MessageKind)
- func (s *MessageFile) UnmarshalJSON(data []byte) error
- func (s *MessageFile) Validate() error
- type MessageIDResponse
- func (s *MessageIDResponse) Decode(d *jx.Decoder) error
- func (s *MessageIDResponse) Encode(e *jx.Encoder)
- func (s *MessageIDResponse) GetResponse() MessageIDResponseResponse
- func (s *MessageIDResponse) GetStatus() ResponseStatus
- func (s *MessageIDResponse) MarshalJSON() ([]byte, error)
- func (s *MessageIDResponse) SetResponse(val MessageIDResponseResponse)
- func (s *MessageIDResponse) SetStatus(val ResponseStatus)
- func (s *MessageIDResponse) UnmarshalJSON(data []byte) error
- func (s *MessageIDResponse) Validate() error
- type MessageIDResponseResponse
- func (s *MessageIDResponseResponse) Decode(d *jx.Decoder) error
- func (s *MessageIDResponseResponse) Encode(e *jx.Encoder)
- func (s *MessageIDResponseResponse) GetMessageID() string
- func (s *MessageIDResponseResponse) MarshalJSON() ([]byte, error)
- func (s *MessageIDResponseResponse) SetMessageID(val string)
- func (s *MessageIDResponseResponse) UnmarshalJSON(data []byte) error
- type MessageInvoker
- type MessageKind
- func (MessageKind) AllValues() []MessageKind
- func (s *MessageKind) Decode(d *jx.Decoder) error
- func (s MessageKind) Encode(e *jx.Encoder)
- func (s MessageKind) MarshalJSON() ([]byte, error)
- func (s MessageKind) MarshalText() ([]byte, error)
- func (s *MessageKind) UnmarshalJSON(data []byte) error
- func (s *MessageKind) UnmarshalText(data []byte) error
- func (s MessageKind) Validate() error
- type MessageRemoveReactionPostOK
- func (s *MessageRemoveReactionPostOK) Decode(d *jx.Decoder) error
- func (s MessageRemoveReactionPostOK) Encode(e *jx.Encoder)
- func (s MessageRemoveReactionPostOK) GetEmptyResponse() (v EmptyResponse, ok bool)
- func (s MessageRemoveReactionPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s MessageRemoveReactionPostOK) IsEmptyResponse() bool
- func (s MessageRemoveReactionPostOK) IsErrorResponse() bool
- func (s MessageRemoveReactionPostOK) MarshalJSON() ([]byte, error)
- func (s *MessageRemoveReactionPostOK) SetEmptyResponse(v EmptyResponse)
- func (s *MessageRemoveReactionPostOK) SetErrorResponse(v ErrorResponse)
- func (s *MessageRemoveReactionPostOK) UnmarshalJSON(data []byte) error
- func (s MessageRemoveReactionPostOK) Validate() error
- type MessageRemoveReactionPostOKType
- type MessageRemoveReactionRequest
- func (s *MessageRemoveReactionRequest) Decode(d *jx.Decoder) error
- func (s *MessageRemoveReactionRequest) Encode(e *jx.Encoder)
- func (s *MessageRemoveReactionRequest) GetMessageID() string
- func (s *MessageRemoveReactionRequest) GetReaction() Reaction
- func (s *MessageRemoveReactionRequest) MarshalJSON() ([]byte, error)
- func (s *MessageRemoveReactionRequest) SetMessageID(val string)
- func (s *MessageRemoveReactionRequest) SetReaction(val Reaction)
- func (s *MessageRemoveReactionRequest) UnmarshalJSON(data []byte) error
- type MessageText
- func (s *MessageText) Decode(d *jx.Decoder) error
- func (s *MessageText) Encode(e *jx.Encoder)
- func (s *MessageText) GetText() string
- func (s *MessageText) GetType() MessageKind
- func (s *MessageText) MarshalJSON() ([]byte, error)
- func (s *MessageText) SetText(val string)
- func (s *MessageText) SetType(val MessageKind)
- func (s *MessageText) UnmarshalJSON(data []byte) error
- func (s *MessageText) Validate() error
- type MessageType
- type Middleware
- type OnPremiseServer
- type OperationName
- type OptInt
- func (o *OptInt) Decode(d *jx.Decoder) error
- func (o OptInt) Encode(e *jx.Encoder)
- func (o OptInt) Get() (v int, ok bool)
- func (o OptInt) IsSet() bool
- func (s OptInt) MarshalJSON() ([]byte, error)
- func (o OptInt) Or(d int) int
- func (o *OptInt) Reset()
- func (o *OptInt) SetTo(v int)
- func (s *OptInt) UnmarshalJSON(data []byte) error
- type OptString
- func (o *OptString) Decode(d *jx.Decoder) error
- func (o OptString) Encode(e *jx.Encoder)
- func (o OptString) Get() (v string, ok bool)
- func (o OptString) IsSet() bool
- func (s OptString) MarshalJSON() ([]byte, error)
- func (o OptString) Or(d string) string
- func (o *OptString) Reset()
- func (o *OptString) SetTo(v string)
- func (s *OptString) UnmarshalJSON(data []byte) error
- type Option
- type PostOK
- func (s *PostOK) Decode(d *jx.Decoder) error
- func (s PostOK) Encode(e *jx.Encoder)
- func (s PostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s PostOK) GetFileUploadResponse() (v FileUploadResponse, ok bool)
- func (s PostOK) IsErrorResponse() bool
- func (s PostOK) IsFileUploadResponse() bool
- func (s PostOK) MarshalJSON() ([]byte, error)
- func (s *PostOK) SetErrorResponse(v ErrorResponse)
- func (s *PostOK) SetFileUploadResponse(v FileUploadResponse)
- func (s *PostOK) UnmarshalJSON(data []byte) error
- func (s PostOK) Validate() error
- type PostOKType
- type PostReq
- type Reaction
- type ResponseStatus
- func (ResponseStatus) AllValues() []ResponseStatus
- func (s *ResponseStatus) Decode(d *jx.Decoder) error
- func (s ResponseStatus) Encode(e *jx.Encoder)
- func (s ResponseStatus) MarshalJSON() ([]byte, error)
- func (s ResponseStatus) MarshalText() ([]byte, error)
- func (s *ResponseStatus) UnmarshalJSON(data []byte) error
- func (s *ResponseStatus) UnmarshalText(data []byte) error
- func (s ResponseStatus) Validate() error
- type SecuritySource
- type ServerOption
- func WithErrorHandler(h ErrorHandler) ServerOption
- func WithMaxMultipartMemory(max int64) ServerOption
- func WithMethodNotAllowed(methodNotAllowed func(w http.ResponseWriter, r *http.Request, allowed string)) ServerOption
- func WithMiddleware(m ...Middleware) ServerOption
- func WithNotFound(notFound http.HandlerFunc) ServerOption
- func WithPathPrefix(prefix string) ServerOption
- type ThreadInvoker
- type ThreadSendPostOK
- func (s *ThreadSendPostOK) Decode(d *jx.Decoder) error
- func (s ThreadSendPostOK) Encode(e *jx.Encoder)
- func (s ThreadSendPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s ThreadSendPostOK) GetMessageIDResponse() (v MessageIDResponse, ok bool)
- func (s ThreadSendPostOK) IsErrorResponse() bool
- func (s ThreadSendPostOK) IsMessageIDResponse() bool
- func (s ThreadSendPostOK) MarshalJSON() ([]byte, error)
- func (s *ThreadSendPostOK) SetErrorResponse(v ErrorResponse)
- func (s *ThreadSendPostOK) SetMessageIDResponse(v MessageIDResponse)
- func (s *ThreadSendPostOK) UnmarshalJSON(data []byte) error
- func (s ThreadSendPostOK) Validate() error
- type ThreadSendPostOKType
- type ThreadSendRequest
- func (s *ThreadSendRequest) Decode(d *jx.Decoder) error
- func (s *ThreadSendRequest) Encode(e *jx.Encoder)
- func (s *ThreadSendRequest) GetMessageID() string
- func (s *ThreadSendRequest) GetOneOf() ThreadSendRequestSum
- func (s *ThreadSendRequest) MarshalJSON() ([]byte, error)
- func (s *ThreadSendRequest) SetMessageID(val string)
- func (s *ThreadSendRequest) SetOneOf(val ThreadSendRequestSum)
- func (s *ThreadSendRequest) UnmarshalJSON(data []byte) error
- func (s *ThreadSendRequest) Validate() error
- type ThreadSendRequestSum
- func (s *ThreadSendRequestSum) Decode(d *jx.Decoder) error
- func (s ThreadSendRequestSum) Encode(e *jx.Encoder)
- func (s ThreadSendRequestSum) GetMessageFile() (v MessageFile, ok bool)
- func (s ThreadSendRequestSum) GetMessageText() (v MessageText, ok bool)
- func (s ThreadSendRequestSum) IsMessageFile() bool
- func (s ThreadSendRequestSum) IsMessageText() bool
- func (s ThreadSendRequestSum) MarshalJSON() ([]byte, error)
- func (s *ThreadSendRequestSum) SetMessageFile(v MessageFile)
- func (s *ThreadSendRequestSum) SetMessageText(v MessageText)
- func (s *ThreadSendRequestSum) UnmarshalJSON(data []byte) error
- func (s ThreadSendRequestSum) Validate() error
- type ThreadSendRequestSumType
- type UserGetListPostOK
- func (s *UserGetListPostOK) Decode(d *jx.Decoder) error
- func (s UserGetListPostOK) Encode(e *jx.Encoder)
- func (s UserGetListPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s UserGetListPostOK) GetUserGetListResponse() (v UserGetListResponse, ok bool)
- func (s UserGetListPostOK) IsErrorResponse() bool
- func (s UserGetListPostOK) IsUserGetListResponse() bool
- func (s UserGetListPostOK) MarshalJSON() ([]byte, error)
- func (s *UserGetListPostOK) SetErrorResponse(v ErrorResponse)
- func (s *UserGetListPostOK) SetUserGetListResponse(v UserGetListResponse)
- func (s *UserGetListPostOK) UnmarshalJSON(data []byte) error
- func (s UserGetListPostOK) Validate() error
- type UserGetListPostOKType
- type UserGetListResponse
- func (s *UserGetListResponse) Decode(d *jx.Decoder) error
- func (s *UserGetListResponse) Encode(e *jx.Encoder)
- func (s *UserGetListResponse) GetResponse() UserGetListResponseResponse
- func (s *UserGetListResponse) GetStatus() ResponseStatus
- func (s *UserGetListResponse) MarshalJSON() ([]byte, error)
- func (s *UserGetListResponse) SetResponse(val UserGetListResponseResponse)
- func (s *UserGetListResponse) SetStatus(val ResponseStatus)
- func (s *UserGetListResponse) UnmarshalJSON(data []byte) error
- func (s *UserGetListResponse) Validate() error
- type UserGetListResponseResponse
- func (s *UserGetListResponseResponse) Decode(d *jx.Decoder) error
- func (s *UserGetListResponseResponse) Encode(e *jx.Encoder)
- func (s *UserGetListResponseResponse) GetUserList() []UserGetListResponseResponseUserListItem
- func (s *UserGetListResponseResponse) MarshalJSON() ([]byte, error)
- func (s *UserGetListResponseResponse) SetUserList(val []UserGetListResponseResponseUserListItem)
- func (s *UserGetListResponseResponse) UnmarshalJSON(data []byte) error
- func (s *UserGetListResponseResponse) Validate() error
- type UserGetListResponseResponseUserListItem
- func (s *UserGetListResponseResponseUserListItem) Decode(d *jx.Decoder) error
- func (s *UserGetListResponseResponseUserListItem) Encode(e *jx.Encoder)
- func (s *UserGetListResponseResponseUserListItem) GetAvatarFileURL() string
- func (s *UserGetListResponseResponseUserListItem) GetUserID() int64
- func (s *UserGetListResponseResponseUserListItem) GetUserName() string
- func (s *UserGetListResponseResponseUserListItem) MarshalJSON() ([]byte, error)
- func (s *UserGetListResponseResponseUserListItem) SetAvatarFileURL(val string)
- func (s *UserGetListResponseResponseUserListItem) SetUserID(val int64)
- func (s *UserGetListResponseResponseUserListItem) SetUserName(val string)
- func (s *UserGetListResponseResponseUserListItem) UnmarshalJSON(data []byte) error
- type UserInvoker
- type UserSendPostOK
- func (s *UserSendPostOK) Decode(d *jx.Decoder) error
- func (s UserSendPostOK) Encode(e *jx.Encoder)
- func (s UserSendPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s UserSendPostOK) GetMessageIDResponse() (v MessageIDResponse, ok bool)
- func (s UserSendPostOK) IsErrorResponse() bool
- func (s UserSendPostOK) IsMessageIDResponse() bool
- func (s UserSendPostOK) MarshalJSON() ([]byte, error)
- func (s *UserSendPostOK) SetErrorResponse(v ErrorResponse)
- func (s *UserSendPostOK) SetMessageIDResponse(v MessageIDResponse)
- func (s *UserSendPostOK) UnmarshalJSON(data []byte) error
- func (s UserSendPostOK) Validate() error
- type UserSendPostOKType
- type UserSendRequest
- func (s *UserSendRequest) Decode(d *jx.Decoder) error
- func (s *UserSendRequest) Encode(e *jx.Encoder)
- func (s *UserSendRequest) GetOneOf() UserSendRequestSum
- func (s *UserSendRequest) GetUserID() int64
- func (s *UserSendRequest) MarshalJSON() ([]byte, error)
- func (s *UserSendRequest) SetOneOf(val UserSendRequestSum)
- func (s *UserSendRequest) SetUserID(val int64)
- func (s *UserSendRequest) UnmarshalJSON(data []byte) error
- func (s *UserSendRequest) Validate() error
- type UserSendRequestSum
- func (s *UserSendRequestSum) Decode(d *jx.Decoder) error
- func (s UserSendRequestSum) Encode(e *jx.Encoder)
- func (s UserSendRequestSum) GetMessageFile() (v MessageFile, ok bool)
- func (s UserSendRequestSum) GetMessageText() (v MessageText, ok bool)
- func (s UserSendRequestSum) IsMessageFile() bool
- func (s UserSendRequestSum) IsMessageText() bool
- func (s UserSendRequestSum) MarshalJSON() ([]byte, error)
- func (s *UserSendRequestSum) SetMessageFile(v MessageFile)
- func (s *UserSendRequestSum) SetMessageText(v MessageText)
- func (s *UserSendRequestSum) UnmarshalJSON(data []byte) error
- func (s UserSendRequestSum) Validate() error
- type UserSendRequestSumType
- type WebhookBotVersion
- func (s *WebhookBotVersion) Decode(d *jx.Decoder) error
- func (s *WebhookBotVersion) Encode(e *jx.Encoder)
- func (s *WebhookBotVersion) GetVersion() int
- func (s *WebhookBotVersion) MarshalJSON() ([]byte, error)
- func (s *WebhookBotVersion) SetVersion(val int)
- func (s *WebhookBotVersion) UnmarshalJSON(data []byte) error
- type WebhookGetVersionPostOK
- func (s *WebhookGetVersionPostOK) Decode(d *jx.Decoder) error
- func (s WebhookGetVersionPostOK) Encode(e *jx.Encoder)
- func (s WebhookGetVersionPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s WebhookGetVersionPostOK) GetWebhookGetVersionResponse() (v WebhookGetVersionResponse, ok bool)
- func (s WebhookGetVersionPostOK) IsErrorResponse() bool
- func (s WebhookGetVersionPostOK) IsWebhookGetVersionResponse() bool
- func (s WebhookGetVersionPostOK) MarshalJSON() ([]byte, error)
- func (s *WebhookGetVersionPostOK) SetErrorResponse(v ErrorResponse)
- func (s *WebhookGetVersionPostOK) SetWebhookGetVersionResponse(v WebhookGetVersionResponse)
- func (s *WebhookGetVersionPostOK) UnmarshalJSON(data []byte) error
- func (s WebhookGetVersionPostOK) Validate() error
- type WebhookGetVersionPostOKType
- type WebhookGetVersionResponse
- func (s *WebhookGetVersionResponse) Decode(d *jx.Decoder) error
- func (s *WebhookGetVersionResponse) Encode(e *jx.Encoder)
- func (s *WebhookGetVersionResponse) GetResponse() WebhookBotVersion
- func (s *WebhookGetVersionResponse) GetStatus() ResponseStatus
- func (s *WebhookGetVersionResponse) MarshalJSON() ([]byte, error)
- func (s *WebhookGetVersionResponse) SetResponse(val WebhookBotVersion)
- func (s *WebhookGetVersionResponse) SetStatus(val ResponseStatus)
- func (s *WebhookGetVersionResponse) UnmarshalJSON(data []byte) error
- func (s *WebhookGetVersionResponse) Validate() error
- type WebhookHandler
- type WebhookInvoker
- type WebhookRequest
- func (s *WebhookRequest) Decode(d *jx.Decoder) error
- func (s *WebhookRequest) Encode(e *jx.Encoder)
- func (s *WebhookRequest) GetGroupID() string
- func (s *WebhookRequest) GetMessageID() string
- func (s *WebhookRequest) GetText() Command
- func (s *WebhookRequest) GetType() WebhookRequestType
- func (s *WebhookRequest) GetUserID() int64
- func (s *WebhookRequest) MarshalJSON() ([]byte, error)
- func (s *WebhookRequest) SetGroupID(val string)
- func (s *WebhookRequest) SetMessageID(val string)
- func (s *WebhookRequest) SetText(val Command)
- func (s *WebhookRequest) SetType(val WebhookRequestType)
- func (s *WebhookRequest) SetUserID(val int64)
- func (s *WebhookRequest) UnmarshalJSON(data []byte) error
- func (s *WebhookRequest) Validate() error
- type WebhookRequestType
- func (WebhookRequestType) AllValues() []WebhookRequestType
- func (s *WebhookRequestType) Decode(d *jx.Decoder) error
- func (s WebhookRequestType) Encode(e *jx.Encoder)
- func (s WebhookRequestType) MarshalJSON() ([]byte, error)
- func (s WebhookRequestType) MarshalText() ([]byte, error)
- func (s *WebhookRequestType) UnmarshalJSON(data []byte) error
- func (s *WebhookRequestType) UnmarshalText(data []byte) error
- func (s WebhookRequestType) Validate() error
- type WebhookResponse
- func (s *WebhookResponse) Decode(d *jx.Decoder) error
- func (s *WebhookResponse) Encode(e *jx.Encoder)
- func (s *WebhookResponse) GetAnswer() WebhookResponseAnswer
- func (s *WebhookResponse) MarshalJSON() ([]byte, error)
- func (s *WebhookResponse) SetAnswer(val WebhookResponseAnswer)
- func (s *WebhookResponse) UnmarshalJSON(data []byte) error
- func (s *WebhookResponse) Validate() error
- type WebhookResponseAnswer
- func NewWebhookResponseMessageAddReactionWebhookResponseAnswer(v WebhookResponseMessageAddReaction) WebhookResponseAnswer
- func NewWebhookResponseMessageSendWebhookResponseAnswer(v WebhookResponseMessageSend) WebhookResponseAnswer
- func NewWebhookResponseThreadSendWebhookResponseAnswer(v WebhookResponseThreadSend) WebhookResponseAnswer
- func (s *WebhookResponseAnswer) Decode(d *jx.Decoder) error
- func (s WebhookResponseAnswer) Encode(e *jx.Encoder)
- func (s WebhookResponseAnswer) GetWebhookResponseMessageAddReaction() (v WebhookResponseMessageAddReaction, ok bool)
- func (s WebhookResponseAnswer) GetWebhookResponseMessageSend() (v WebhookResponseMessageSend, ok bool)
- func (s WebhookResponseAnswer) GetWebhookResponseThreadSend() (v WebhookResponseThreadSend, ok bool)
- func (s WebhookResponseAnswer) IsWebhookResponseMessageAddReaction() bool
- func (s WebhookResponseAnswer) IsWebhookResponseMessageSend() bool
- func (s WebhookResponseAnswer) IsWebhookResponseThreadSend() bool
- func (s WebhookResponseAnswer) MarshalJSON() ([]byte, error)
- func (s *WebhookResponseAnswer) SetWebhookResponseMessageAddReaction(v WebhookResponseMessageAddReaction)
- func (s *WebhookResponseAnswer) SetWebhookResponseMessageSend(v WebhookResponseMessageSend)
- func (s *WebhookResponseAnswer) SetWebhookResponseThreadSend(v WebhookResponseThreadSend)
- func (s *WebhookResponseAnswer) UnmarshalJSON(data []byte) error
- func (s WebhookResponseAnswer) Validate() error
- type WebhookResponseAnswerType
- type WebhookResponseMessageAddReaction
- func (s *WebhookResponseMessageAddReaction) Decode(d *jx.Decoder) error
- func (s *WebhookResponseMessageAddReaction) Encode(e *jx.Encoder)
- func (s *WebhookResponseMessageAddReaction) GetAction() WebhookResponseType
- func (s *WebhookResponseMessageAddReaction) GetPost() WebhookResponseMessageAddReactionPost
- func (s *WebhookResponseMessageAddReaction) MarshalJSON() ([]byte, error)
- func (s *WebhookResponseMessageAddReaction) SetAction(val WebhookResponseType)
- func (s *WebhookResponseMessageAddReaction) SetPost(val WebhookResponseMessageAddReactionPost)
- func (s *WebhookResponseMessageAddReaction) UnmarshalJSON(data []byte) error
- func (s *WebhookResponseMessageAddReaction) Validate() error
- type WebhookResponseMessageAddReactionPost
- func (s *WebhookResponseMessageAddReactionPost) Decode(d *jx.Decoder) error
- func (s *WebhookResponseMessageAddReactionPost) Encode(e *jx.Encoder)
- func (s *WebhookResponseMessageAddReactionPost) GetReaction() Reaction
- func (s *WebhookResponseMessageAddReactionPost) MarshalJSON() ([]byte, error)
- func (s *WebhookResponseMessageAddReactionPost) SetReaction(val Reaction)
- func (s *WebhookResponseMessageAddReactionPost) UnmarshalJSON(data []byte) error
- type WebhookResponseMessageSend
- func (s *WebhookResponseMessageSend) Decode(d *jx.Decoder) error
- func (s *WebhookResponseMessageSend) Encode(e *jx.Encoder)
- func (s *WebhookResponseMessageSend) GetAction() WebhookResponseType
- func (s *WebhookResponseMessageSend) GetPost() Message
- func (s *WebhookResponseMessageSend) MarshalJSON() ([]byte, error)
- func (s *WebhookResponseMessageSend) SetAction(val WebhookResponseType)
- func (s *WebhookResponseMessageSend) SetPost(val Message)
- func (s *WebhookResponseMessageSend) UnmarshalJSON(data []byte) error
- func (s *WebhookResponseMessageSend) Validate() error
- type WebhookResponseThreadSend
- func (s *WebhookResponseThreadSend) Decode(d *jx.Decoder) error
- func (s *WebhookResponseThreadSend) Encode(e *jx.Encoder)
- func (s *WebhookResponseThreadSend) GetAction() WebhookResponseType
- func (s *WebhookResponseThreadSend) GetPost() Message
- func (s *WebhookResponseThreadSend) MarshalJSON() ([]byte, error)
- func (s *WebhookResponseThreadSend) SetAction(val WebhookResponseType)
- func (s *WebhookResponseThreadSend) SetPost(val Message)
- func (s *WebhookResponseThreadSend) UnmarshalJSON(data []byte) error
- func (s *WebhookResponseThreadSend) Validate() error
- type WebhookResponseType
- func (WebhookResponseType) AllValues() []WebhookResponseType
- func (s *WebhookResponseType) Decode(d *jx.Decoder) error
- func (s WebhookResponseType) Encode(e *jx.Encoder)
- func (s WebhookResponseType) MarshalJSON() ([]byte, error)
- func (s WebhookResponseType) MarshalText() ([]byte, error)
- func (s *WebhookResponseType) UnmarshalJSON(data []byte) error
- func (s *WebhookResponseType) UnmarshalText(data []byte) error
- func (s WebhookResponseType) Validate() error
- type WebhookServer
- type WebhookSetVersionPostOK
- func (s *WebhookSetVersionPostOK) Decode(d *jx.Decoder) error
- func (s WebhookSetVersionPostOK) Encode(e *jx.Encoder)
- func (s WebhookSetVersionPostOK) GetEmptyResponse() (v EmptyResponse, ok bool)
- func (s WebhookSetVersionPostOK) GetErrorResponse() (v ErrorResponse, ok bool)
- func (s WebhookSetVersionPostOK) IsEmptyResponse() bool
- func (s WebhookSetVersionPostOK) IsErrorResponse() bool
- func (s WebhookSetVersionPostOK) MarshalJSON() ([]byte, error)
- func (s *WebhookSetVersionPostOK) SetEmptyResponse(v EmptyResponse)
- func (s *WebhookSetVersionPostOK) SetErrorResponse(v ErrorResponse)
- func (s *WebhookSetVersionPostOK) UnmarshalJSON(data []byte) error
- func (s WebhookSetVersionPostOK) Validate() error
- type WebhookSetVersionPostOKType
Constants ¶
const ( // CloudServer is a server URL. // CloudServer serverConst = "https://userbot.getcompass.com/api/v3" )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthToken ¶
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) 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) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Command) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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 ¶
func (s *CommandListResponse) GetResponse() CommandListResponseResponse
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 ¶
func (s *CommandListResponse) SetResponse(val CommandListResponseResponse)
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 ¶
func (s *CommandListResponseResponse) Decode(d *jx.Decoder) error
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 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 ¶
func (s *ErrorResponseResponse) GetErrorCode() ErrorResponseResponseErrorCode
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 ¶
func (s *ErrorResponseResponse) SetErrorCode(val ErrorResponseResponseErrorCode)
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 ¶
func (ErrorResponseResponseErrorCode) AllValues() []ErrorResponseResponseErrorCode
AllValues returns all ErrorResponseResponseErrorCode values.
func (*ErrorResponseResponseErrorCode) Decode ¶
func (s *ErrorResponseResponseErrorCode) Decode(d *jx.Decoder) error
Decode decodes ErrorResponseResponseErrorCode from json.
func (ErrorResponseResponseErrorCode) Encode ¶
func (s ErrorResponseResponseErrorCode) Encode(e *jx.Encoder)
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 ¶
func (s ErrorResponseResponseErrorCode) Validate() error
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 ¶
func (s *FileGetURLResponse) GetResponse() FileGetURLResponseResponse
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 ¶
func (s *FileGetURLResponseResponse) Decode(d *jx.Decoder) error
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 ¶
func (s *FileUploadResponse) GetResponse() FileUploadResponseResponse
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 ¶
func (s *FileUploadResponseResponse) Decode(d *jx.Decoder) error
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 ¶
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 ¶
func (s *GroupGetListResponse) GetResponse() GroupGetListResponseResponse
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 ¶
func (s *GroupGetListResponse) SetResponse(val GroupGetListResponseResponse)
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 ¶
func (s *GroupGetListResponseResponse) Decode(d *jx.Decoder) error
Decode decodes GroupGetListResponseResponse from json.
func (*GroupGetListResponseResponse) Encode ¶
func (s *GroupGetListResponseResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*GroupGetListResponseResponse) GetGroupList ¶
func (s *GroupGetListResponseResponse) GetGroupList() []GroupGetListResponseResponseGroupListItem
GetGroupList returns the value of GroupList.
func (*GroupGetListResponseResponse) MarshalJSON ¶
func (s *GroupGetListResponseResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GroupGetListResponseResponse) SetGroupList ¶
func (s *GroupGetListResponseResponse) SetGroupList(val []GroupGetListResponseResponseGroupListItem)
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 ¶
func (s *GroupGetListResponseResponseGroupListItem) Decode(d *jx.Decoder) error
Decode decodes GroupGetListResponseResponseGroupListItem from json.
func (*GroupGetListResponseResponseGroupListItem) Encode ¶
func (s *GroupGetListResponseResponseGroupListItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*GroupGetListResponseResponseGroupListItem) GetAvatarFileURL ¶
func (s *GroupGetListResponseResponseGroupListItem) GetAvatarFileURL() string
GetAvatarFileURL returns the value of AvatarFileURL.
func (*GroupGetListResponseResponseGroupListItem) GetGroupID ¶
func (s *GroupGetListResponseResponseGroupListItem) GetGroupID() string
GetGroupID returns the value of GroupID.
func (*GroupGetListResponseResponseGroupListItem) GetName ¶
func (s *GroupGetListResponseResponseGroupListItem) GetName() string
GetName returns the value of Name.
func (*GroupGetListResponseResponseGroupListItem) MarshalJSON ¶
func (s *GroupGetListResponseResponseGroupListItem) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*GroupGetListResponseResponseGroupListItem) SetAvatarFileURL ¶
func (s *GroupGetListResponseResponseGroupListItem) SetAvatarFileURL(val string)
SetAvatarFileURL sets the value of AvatarFileURL.
func (*GroupGetListResponseResponseGroupListItem) SetGroupID ¶
func (s *GroupGetListResponseResponseGroupListItem) SetGroupID(val string)
SetGroupID sets the value of GroupID.
func (*GroupGetListResponseResponseGroupListItem) SetName ¶
func (s *GroupGetListResponseResponseGroupListItem) SetName(val string)
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 ¶
type Invoker interface {
CommandInvoker
FileInvoker
GroupInvoker
MessageInvoker
ThreadInvoker
UserInvoker
WebhookInvoker
}
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) 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 ¶
IsMessageFile reports whether Message is MessageFile.
func (Message) IsMessageText ¶
IsMessageText reports whether Message is MessageText.
func (Message) MarshalJSON ¶
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 ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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 ¶
func (s *MessageIDResponse) GetResponse() MessageIDResponseResponse
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 ¶
func (s *MessageRemoveReactionPostOK) Decode(d *jx.Decoder) error
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 ¶
func (s *MessageRemoveReactionRequest) Decode(d *jx.Decoder) error
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 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 ¶
OptInt is optional int.
func (OptInt) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptInt) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type OptString ¶
OptString is optional string.
func NewOptString ¶
NewOptString returns new OptString with value set to v.
func (OptString) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*OptString) UnmarshalJSON ¶
UnmarshalJSON implements stdjson.Unmarshaler.
type 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) 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 ¶
IsErrorResponse reports whether PostOK is ErrorResponse.
func (PostOK) IsFileUploadResponse ¶
IsFileUploadResponse reports whether PostOK is FileUploadResponse.
func (PostOK) MarshalJSON ¶
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 ¶
UnmarshalJSON implements stdjson.Unmarshaler.
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) SetFile ¶
func (s *PostReq) SetFile(val ht.MultipartFile)
SetFile sets the value of File.
type Reaction ¶
type Reaction string
func (Reaction) MarshalJSON ¶
MarshalJSON implements stdjson.Marshaler.
func (*Reaction) UnmarshalJSON ¶
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 ¶
func (s *ThreadSendRequest) GetOneOf() ThreadSendRequestSum
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 ¶
func (s *UserGetListResponse) GetResponse() UserGetListResponseResponse
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 ¶
func (s *UserGetListResponse) SetResponse(val UserGetListResponseResponse)
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 ¶
func (s *UserGetListResponseResponse) Decode(d *jx.Decoder) error
Decode decodes UserGetListResponseResponse from json.
func (*UserGetListResponseResponse) Encode ¶
func (s *UserGetListResponseResponse) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserGetListResponseResponse) GetUserList ¶
func (s *UserGetListResponseResponse) GetUserList() []UserGetListResponseResponseUserListItem
GetUserList returns the value of UserList.
func (*UserGetListResponseResponse) MarshalJSON ¶
func (s *UserGetListResponseResponse) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*UserGetListResponseResponse) SetUserList ¶
func (s *UserGetListResponseResponse) SetUserList(val []UserGetListResponseResponseUserListItem)
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 ¶
func (s *UserGetListResponseResponseUserListItem) Decode(d *jx.Decoder) error
Decode decodes UserGetListResponseResponseUserListItem from json.
func (*UserGetListResponseResponseUserListItem) Encode ¶
func (s *UserGetListResponseResponseUserListItem) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*UserGetListResponseResponseUserListItem) GetAvatarFileURL ¶
func (s *UserGetListResponseResponseUserListItem) GetAvatarFileURL() string
GetAvatarFileURL returns the value of AvatarFileURL.
func (*UserGetListResponseResponseUserListItem) GetUserID ¶
func (s *UserGetListResponseResponseUserListItem) GetUserID() int64
GetUserID returns the value of UserID.
func (*UserGetListResponseResponseUserListItem) GetUserName ¶
func (s *UserGetListResponseResponseUserListItem) GetUserName() string
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 ¶
func (s *UserGetListResponseResponseUserListItem) SetUserID(val int64)
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 ¶
func (s *WebhookGetVersionResponse) GetResponse() WebhookBotVersion
GetResponse returns the value of Response.
func (*WebhookGetVersionResponse) GetStatus ¶
func (s *WebhookGetVersionResponse) GetStatus() ResponseStatus
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 ¶
func (s *WebhookResponseMessageAddReaction) Decode(d *jx.Decoder) error
Decode decodes WebhookResponseMessageAddReaction from json.
func (*WebhookResponseMessageAddReaction) Encode ¶
func (s *WebhookResponseMessageAddReaction) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*WebhookResponseMessageAddReaction) GetAction ¶
func (s *WebhookResponseMessageAddReaction) GetAction() WebhookResponseType
GetAction returns the value of Action.
func (*WebhookResponseMessageAddReaction) GetPost ¶
func (s *WebhookResponseMessageAddReaction) GetPost() WebhookResponseMessageAddReactionPost
GetPost returns the value of Post.
func (*WebhookResponseMessageAddReaction) MarshalJSON ¶
func (s *WebhookResponseMessageAddReaction) MarshalJSON() ([]byte, error)
MarshalJSON implements stdjson.Marshaler.
func (*WebhookResponseMessageAddReaction) SetAction ¶
func (s *WebhookResponseMessageAddReaction) SetAction(val WebhookResponseType)
SetAction sets the value of Action.
func (*WebhookResponseMessageAddReaction) SetPost ¶
func (s *WebhookResponseMessageAddReaction) SetPost(val WebhookResponseMessageAddReactionPost)
SetPost sets the value of Post.
func (*WebhookResponseMessageAddReaction) UnmarshalJSON ¶
func (s *WebhookResponseMessageAddReaction) UnmarshalJSON(data []byte) error
UnmarshalJSON implements stdjson.Unmarshaler.
func (*WebhookResponseMessageAddReaction) Validate ¶
func (s *WebhookResponseMessageAddReaction) Validate() error
type WebhookResponseMessageAddReactionPost ¶
type WebhookResponseMessageAddReactionPost struct {
Reaction Reaction `json:"reaction"`
}
func (*WebhookResponseMessageAddReactionPost) Decode ¶
func (s *WebhookResponseMessageAddReactionPost) Decode(d *jx.Decoder) error
Decode decodes WebhookResponseMessageAddReactionPost from json.
func (*WebhookResponseMessageAddReactionPost) Encode ¶
func (s *WebhookResponseMessageAddReactionPost) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*WebhookResponseMessageAddReactionPost) GetReaction ¶
func (s *WebhookResponseMessageAddReactionPost) GetReaction() Reaction
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 ¶
func (s *WebhookResponseMessageSend) Decode(d *jx.Decoder) error
Decode decodes WebhookResponseMessageSend from json.
func (*WebhookResponseMessageSend) Encode ¶
func (s *WebhookResponseMessageSend) Encode(e *jx.Encoder)
Encode implements json.Marshaler.
func (*WebhookResponseMessageSend) GetAction ¶
func (s *WebhookResponseMessageSend) GetAction() WebhookResponseType
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 ¶
func (s *WebhookResponseMessageSend) SetAction(val WebhookResponseType)
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 ¶
func (s *WebhookResponseThreadSend) GetAction() WebhookResponseType
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 ¶
func (s *WebhookResponseThreadSend) SetAction(val WebhookResponseType)
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 ¶
func (WebhookResponseType) AllValues() []WebhookResponseType
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.
Source Files
¶
- oas_cfg_gen.go
- oas_client_gen.go
- oas_defaults_gen.go
- oas_handlers_gen.go
- oas_interfaces_gen.go
- oas_json_gen.go
- oas_middleware_gen.go
- oas_operations_gen.go
- oas_request_decoders_gen.go
- oas_request_encoders_gen.go
- oas_response_decoders_gen.go
- oas_response_encoders_gen.go
- oas_router_gen.go
- oas_schemas_gen.go
- oas_security_gen.go
- oas_server_gen.go
- oas_servers_gen.go
- oas_validators_gen.go