Documentation
¶
Overview ¶
Package config handles reading and writing of ~/.invoicer/config.yaml.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultDatabasePath ¶
DefaultDatabasePath returns the default path to the invoice database (~/.invoicer/invoices.db).
func DefaultPath ¶
DefaultPath returns the default path to the config file (~/.invoicer/config.yaml).
Types ¶
type Config ¶
type Config struct {
Vendor string `yaml:"vendor,omitempty"`
Customer string `yaml:"customer,omitempty"`
Rate float64 `yaml:"rate,omitempty"`
Hours float64 `yaml:"hours,omitempty"`
Project string `yaml:"project,omitempty"`
Database string `yaml:"database,omitempty"`
// BaseURL is the public address of the web app.
BaseURL string `yaml:"baseUrl,omitempty"`
// OIDC holds the web app's access settings.
OIDC *OIDC `yaml:"oidc,omitempty"`
}
Config holds configuration values for invoicer. Only pointer fields are written when explicitly set; nil means "not configured".
type OIDC ¶
type OIDC struct {
Issuer string `yaml:"issuer,omitempty"`
ClientID string `yaml:"clientId,omitempty"`
ClientSecretFile string `yaml:"clientSecretFile,omitempty"`
CookieKeyFile string `yaml:"cookieKeyFile,omitempty"`
AdminGroup string `yaml:"adminGroup,omitempty"`
CustomerGroup string `yaml:"customerGroup,omitempty"`
GroupsClaim string `yaml:"groupsClaim,omitempty"`
}
OIDC holds the web app's OpenID Connect settings.