Documentation ¶
Overview ¶
Package types provides base public types used by bot.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Assets ¶ added in v1.1.0
type Assets interface { // LoadAsset loads the asset with the given key. LoadAsset(ctx context.Context, key string) (io.ReadCloser, error) }
Assets provider interface.
type Bot ¶
type Bot interface { // Handle register bot's handler with filter. Handle(EventFilter, Handler) // Start bot. Start() error // Stop bot. Stop() error }
Bot instance.
type ContextProvider ¶
type DataContainer ¶ added in v1.6.0
type DataContainer struct {
// contains filtered or unexported fields
}
func (*DataContainer) Get ¶ added in v1.6.0
func (c *DataContainer) Get() any
func (*DataContainer) Set ¶ added in v1.6.0
func (c *DataContainer) Set(data any)
type DataLoader ¶ added in v1.6.0
type EventFilter ¶
EventFilter checks that telegram update could be handlerd.
type Handler ¶
type Handler interface { // Handle update message. // telegram.BotAPI is deprecated and will be removed in future versions. Handle(context.Context, *telegram.Update, *telegram.BotAPI) error }
Handler of telegram update message.
type PaymentProviders ¶ added in v1.2.0
type Secrets ¶ added in v1.5.0
type Secrets interface { // Get secret map, returns error if not found. Get(ctx context.Context) (map[string]Secret, error) }
Secrets is a collection of secrets.
type StateChanges ¶ added in v1.2.0
func (*StateChanges) IsEmpty ¶ added in v1.2.0
func (s *StateChanges) IsEmpty() bool
Click to show internal directories.
Click to hide internal directories.