telegram

package
v0.0.0-...-4976f39 Latest Latest
Warning

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

Go to latest
Published: Feb 7, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

type Adapter interface {
	ListenAndServe() error
	Shutdown()
}

func NewAdapter

func NewAdapter(logger *zap.Logger, config *Config, service domain.Service) (Adapter, error)

type Config

type Config struct {
	Token        string        `short:"t" long:"token" env:"TOKEN" description:"Telegram Bot API token" required:"yes"`
	Debug        bool          `long:"debug" env:"DEBUG" description:"Debug logs for Telegram Bot API adapter"`
	AutoDeleting time.Duration `long:"auto-deleting" env:"AUTO_DELETING" description:"Messages auto-deleting in supergroups" default:"1m"`
}

Jump to

Keyboard shortcuts

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