Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Location *time.Location
Functions ¶
Types ¶
type BaseHandler ¶ added in v1.0.4
type BaseHandler struct {
// contains filtered or unexported fields
}
func (*BaseHandler) GetBot ¶ added in v1.0.4
func (h *BaseHandler) GetBot() *telegram.Bot
func (*BaseHandler) OnShutdown ¶ added in v1.0.4
func (h *BaseHandler) OnShutdown() (err error)
type CallbackData ¶
type CallbackData struct { Command CommandCode Flags Flags Payload []byte ReturnTo *CallbackData // contains filtered or unexported fields }
func DecodeCallbackData ¶ added in v1.0.4
func DecodeCallbackData(payload string) (callbackData *CallbackData, err error)
func (*CallbackData) Confirmed ¶ added in v1.0.4
func (d *CallbackData) Confirmed() bool
func (*CallbackData) DecodePayload ¶ added in v1.0.4
func (d *CallbackData) DecodePayload(payload interface{}) (err error)
func (*CallbackData) EncodePayload ¶ added in v1.0.4
func (d *CallbackData) EncodePayload(payload interface{}) (err error)
func (*CallbackData) NewMessage ¶ added in v1.0.4
func (d *CallbackData) NewMessage() bool
func (*CallbackData) String ¶
func (d *CallbackData) String() string
type CommandCode ¶ added in v1.0.4
type CommandCode uint8
type ErrorWithStatusCode ¶
func (*ErrorWithStatusCode) Error ¶
func (e *ErrorWithStatusCode) Error() string
type Frame ¶ added in v1.0.4
type Frame struct { Handler Handler BotUser *telegram.User // contains filtered or unexported fields }
func (*Frame) OnInterrupt ¶ added in v1.0.4
func (f *Frame) OnInterrupt(cancel context.CancelFunc)
func (*Frame) Shutdown ¶ added in v1.0.4
func (f *Frame) Shutdown(cancel context.CancelFunc)
type Request ¶ added in v1.0.4
type Request struct { BotUsername string Command string Payload string ChatId telegram.ChatId Chat *telegram.Chat UserId int64 User *telegram.User MessageId int64 Message *telegram.Message CallbackQueryId string CallbackData *CallbackData }
func ParseCallbackQuery ¶
func ParseMessage ¶
func (*Request) GetCallbackDataPayload ¶ added in v1.0.4
func (req *Request) GetCallbackDataPayload() interface{}
func (*Request) HasContact ¶ added in v1.0.4
func (*Request) IsCommand ¶ added in v1.0.4
func (req *Request) IsCommand(str string, code CommandCode) bool
func (*Request) NewMessage ¶ added in v1.0.4
type YandexRequest ¶
type YandexRequest struct {
Body string `json:"body"`
}
type YandexResponse ¶
type YandexResponse struct { StatusCode int `json:"statusCode"` Body interface{} `json:"body"` }
func YandexHandler ¶
func YandexHandler(ctx context.Context, req *YandexRequest, h Handler) (res *YandexResponse, err error)
Source Files ¶
Click to show internal directories.
Click to hide internal directories.