commands

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Jan 15, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var PathToConfig string

PathToConfig is path to config file

View Source
var Subversion string

Subversion is version engraved

View Source
var Verbose bool

Verbose depicts how many messages application sends to STDOUT

View Source
var Version string

Version is version engraved

Functions

func Execute

func Execute() error

Execute executes the root command.

func FindConfig

func FindConfig() (pathToConfig string)

FindConfig finds path to config file in most usual places

Types

type Config

type Config map[string]Sink

Config depicts manifold of sinks to be used by notification system

func LoadConfigFromFile

func LoadConfigFromFile(pathToFile string) (cfg Config, err error)

LoadConfigFromFile loads config from file

func (*Config) Save

func (cfg *Config) Save(pathToFile string) (err error)

Save saves config to file

type Sink

type Sink struct {
	Token  string `json:"token"`
	ChatID int64  `json:"chatID"`
}

Sink depicts single pair of bot token and telegram channel we can send messages too

Jump to

Keyboard shortcuts

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