Documentation ¶
Index ¶
- Variables
- func DoRequest(request *http.Request) (*http.Response, error)
- func EncodeURL(input string, params map[string]string) string
- func Error(bot *telegram.BotAPI, update *telegram.Update, message string) error
- func LoadEnv(path string)
- func OpenCache()
- func ParseTelegramMessage(input string) (output string)
- func Plot(c chart.Chart, name string) telegram.FileReader
- type Command
- type Flag
Constants ¶
This section is empty.
Variables ¶
View Source
var Cache *redis.Client
Cache is the main Redis cache of the app
View Source
var Colors = []color.NRGBA{
{0xcd, 0xdc, 0x39, 0xff},
{0x03, 0xa9, 0xf4, 0xff},
{0xf4, 0x43, 0x36, 0xff},
{0x8b, 0xc3, 0x4a, 0xff},
{0x00, 0xbc, 0xd4, 0xff},
{0xff, 0x98, 0x00, 0xff},
{0x9c, 0x27, 0xb0, 0xff},
{0x00, 0x96, 0x88, 0xff},
{0xe9, 0x1e, 0x63, 0xff},
{0x79, 0x55, 0x48, 0xff},
{0x4c, 0xaf, 0x50, 0xff},
{0xff, 0xc1, 0x07, 0xff},
{0x3f, 0x51, 0xb5, 0xff},
{0x21, 0x96, 0xf3, 0xff},
{0xff, 0xeb, 0x3b, 0xff},
}
Colors defines the colors available for charts
View Source
var Green = color.New(color.FgGreen)
Green is a tool to display Green color into the term
View Source
var Red = color.New(color.FgRed)
Red is a tool to display Red color into the term
Functions ¶
func LoadEnv ¶
func LoadEnv(path string)
LoadEnv loads all the environment variables stored in a .env file
func ParseTelegramMessage ¶
ParseTelegramMessage escapes all the characters required to print MarkdownV2 content
Types ¶
type Command ¶
type Command struct { // Name of the command as shown in Telegram UI Name string // A complete description of the command to show in the help message Description string // The list of flags that can be passed by the user Flags map[string]Flag // The command actions Execute func(bot *telegram.BotAPI, update *telegram.Update, args []string, flags map[string]interface{}) error }
Command describes a Telegram commands with all its information
type Flag ¶
type Flag struct { // A complete description of the flag to show in the help message Description string // Default value of the flag. Currently supported types: string, integer, float Value interface{} }
Flag holds the data of a command flag, that's to say an optional parameter passed at the beginning
Click to show internal directories.
Click to hide internal directories.