config

package
v0.0.0-...-8236bb3 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Cfg = Config{
	BotToken:          "xxx",
	AuthorizedUserIDs: []int64{},
	Repo:              "https://git.xxx.com/xxx/xxx.git",
	Username:          "someone",
	Password:          "password",
	CommitAuthor:      "Beanbot",
	CommitAuthorEmail: "beanbot@example.com",
	Syntax: syntax.Config{
		Currencies:      []string{"CNY", "USD"},
		Accounts:        map[string]string{"zfb": "Assets::Digital::Alipay"},
		DefaultCurrency: "CNY",
	},
	TxnBeanPathPattern: "txs/{{.YYYY}}-{{.MM}}.bean",
}
View Source
var TxnBeanPathTmpl *template.Template

Functions

func Load

func Load(path string) error

Types

type Config

type Config struct {
	BotToken           string        `yaml:"botToken"`
	AuthorizedUserIDs  []int64       `yaml:"authorizedUserIDs"`
	Repo               string        `yaml:"repo"`
	Username           string        `yaml:"username"`
	Password           string        `yaml:"password"`
	CommitAuthor       string        `yaml:"commitAuthor"`
	CommitAuthorEmail  string        `yaml:"commitAuthorEmail"`
	Syntax             syntax.Config `yaml:"syntax"`
	TxnBeanPathPattern string        `yaml:"txnBeanPathPattern"`
}

Jump to

Keyboard shortcuts

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