config

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PERIOD_TYPE_DEFAULT = "default"
	PERIOD_TYPE_DAY     = "day"
	PERIOD_TYPE_HOUR    = "hour"
	PERIOD_TYPE_MINUTE  = "minute"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	TimezoneLocation string   `yaml:"timezone_location"`
	Trello           Trello   `yaml:"trello"`
	Sources          Sources  `yaml:"sources"`
	Telegram         Telegram `yaml:"telegram"`
}

func ReadConfig

func ReadConfig(fileName string) (cfg Config, err error)

ReadConfig reads the YAML config file & decodes all parameters

type Period added in v0.0.3

type Period struct {
	Type     string `yaml:"type"`
	Interval int    `yaml:"interval"`
}

type Source added in v0.1.0

type Source struct {
	Name     string `yaml:"name"`
	Endpoint string `yaml:"endpoint"`
	Strict   bool   `yaml:"strict"`
	Label    string `yaml:"label_id"`
	List     string `yaml:"list_id"`
	Period   Period `yaml:"period"`
}

type Sources

type Sources struct {
	GithubIssues Source `yaml:"github_issues"`
	TodoDock     Source `yaml:"tododock"`
	Habits       Source `yaml:"habits"`
}

type Telegram added in v0.0.5

type Telegram struct {
	Enabled bool   `yaml:"enabled"`
	Token   string `yaml:"token"`
	ChatId  int64  `yaml:"chat_id"`
}

type Trello added in v0.0.4

type Trello struct {
	ApiKey   string `yaml:"api_key"`
	ApiToken string `yaml:"api_token"`
	BoardId  string `yaml:"board_id"`
}

Jump to

Keyboard shortcuts

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