telegram

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close()

func Init

func Init()

func NewCallbackData

func NewCallbackData(t CallbackDataType, param ...string) *string

func Webhook

func Webhook() func(c *gin.Context)

Types

type Auth

type Auth struct{}

func (Auth) Adapter

func (Auth) Adapter() dandelion.Adapters

func (Auth) Handle

func (Auth) Handle(c *dandelion.Context) bool

func (Auth) IsMatch

func (Auth) IsMatch(c *dandelion.Context) bool

type Callback

type Callback struct{}

func (Callback) Adapter

func (Callback) Adapter() dandelion.Adapters

func (Callback) Handle

func (Callback) Handle(*dandelion.Context) bool

func (Callback) IsMatch

func (Callback) IsMatch(c *dandelion.Context) bool

type CallbackData

type CallbackData struct {
	Type  CallbackDataType `json:"t"`           // 数据类型
	Param []string         `json:"p,omitempty"` // 参数
}

func ParseCallbackData

func ParseCallbackData(s string) CallbackData

func (CallbackData) Is

type CallbackDataType

type CallbackDataType uint8
const (
	CallbackNone CallbackDataType = iota
	CallbackTypeSearch
	CallbackTypeList
	CallbackTypeUpdateKey
	CallbackTypeSetCommand
)

type CallbackList

type CallbackList struct{}

func (CallbackList) Adapter

func (CallbackList) Adapter() dandelion.Adapters

func (CallbackList) Handle

func (CallbackList) Handle(c *dandelion.Context) bool

func (CallbackList) IsMatch

func (CallbackList) IsMatch(c *dandelion.Context) bool

type CallbackSearch

type CallbackSearch struct{}

func (CallbackSearch) Adapter

func (CallbackSearch) Adapter() dandelion.Adapters

func (CallbackSearch) Handle

func (CallbackSearch) Handle(c *dandelion.Context) bool

func (CallbackSearch) IsMatch

func (CallbackSearch) IsMatch(c *dandelion.Context) bool

type CallbackSetCommand

type CallbackSetCommand struct{}

func (CallbackSetCommand) Adapter

func (CallbackSetCommand) Handle

func (CallbackSetCommand) IsMatch

type CallbackUpdateKey

type CallbackUpdateKey struct{}

func (CallbackUpdateKey) Adapter

func (CallbackUpdateKey) Handle

func (CallbackUpdateKey) IsMatch

type Command

type Command struct{}

func (Command) Adapter

func (Command) Adapter() dandelion.Adapters

func (Command) Handle

func (Command) Handle(*dandelion.Context) bool

func (Command) IsMatch

func (Command) IsMatch(c *dandelion.Context) bool

type CommandClear

type CommandClear struct{}

func (CommandClear) Adapter

func (CommandClear) Adapter() dandelion.Adapters

func (CommandClear) Handle

func (CommandClear) Handle(c *dandelion.Context) bool

func (CommandClear) IsMatch

func (CommandClear) IsMatch(c *dandelion.Context) bool

type CommandDelete

type CommandDelete struct{}

func (CommandDelete) Adapter

func (CommandDelete) Adapter() dandelion.Adapters

func (CommandDelete) Handle

func (CommandDelete) Handle(c *dandelion.Context) bool

func (CommandDelete) IsMatch

func (CommandDelete) IsMatch(c *dandelion.Context) bool

type CommandList

type CommandList struct{}

func (CommandList) Adapter

func (CommandList) Adapter() dandelion.Adapters

func (CommandList) Handle

func (CommandList) Handle(c *dandelion.Context) bool

func (CommandList) IsMatch

func (CommandList) IsMatch(c *dandelion.Context) bool

type CommandMode

type CommandMode struct{}

func (CommandMode) Adapter

func (CommandMode) Adapter() dandelion.Adapters

func (CommandMode) Handle

func (CommandMode) Handle(c *dandelion.Context) bool

func (CommandMode) IsMatch

func (CommandMode) IsMatch(c *dandelion.Context) bool

type CommandPreview

type CommandPreview struct{}

func (CommandPreview) Adapter

func (CommandPreview) Adapter() dandelion.Adapters

func (CommandPreview) Handle

func (CommandPreview) Handle(c *dandelion.Context) bool

func (CommandPreview) IsMatch

func (CommandPreview) IsMatch(c *dandelion.Context) bool

type CommandStart

type CommandStart struct{}

func (CommandStart) Adapter

func (CommandStart) Adapter() dandelion.Adapters

func (CommandStart) Handle

func (CommandStart) Handle(c *dandelion.Context) bool

func (CommandStart) IsMatch

func (CommandStart) IsMatch(c *dandelion.Context) bool

type CommandSubmit

type CommandSubmit struct{}

func (CommandSubmit) Adapter

func (CommandSubmit) Adapter() dandelion.Adapters

func (CommandSubmit) Handle

func (CommandSubmit) Handle(c *dandelion.Context) bool

func (CommandSubmit) IsMatch

func (CommandSubmit) IsMatch(c *dandelion.Context) bool

type EditedMessage

type EditedMessage struct{}

func (EditedMessage) Adapter

func (EditedMessage) Adapter() dandelion.Adapters

func (EditedMessage) Handle

func (EditedMessage) Handle(c *dandelion.Context) bool

func (EditedMessage) IsMatch

func (EditedMessage) IsMatch(c *dandelion.Context) bool

type Inline

type Inline struct{}

func (Inline) Adapter

func (Inline) Adapter() dandelion.Adapters

func (Inline) Handle

func (Inline) Handle(c *dandelion.Context) bool

func (Inline) IsMatch

func (Inline) IsMatch(c *dandelion.Context) bool

type Message

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

func (*Message) Adapter

func (i *Message) Adapter() dandelion.Adapters

func (*Message) Handle

func (i *Message) Handle(c *dandelion.Context) bool

func (*Message) IsMatch

func (i *Message) IsMatch(c *dandelion.Context) bool

func (*Message) Mode

func (i *Message) Mode() model.Mode

func (*Message) SwitchMode

func (i *Message) SwitchMode() string

Jump to

Keyboard shortcuts

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