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"`
CustomerEmail string `yaml:"customerEmail,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"`
// Resend holds the email sending settings.
Resend *Resend `yaml:"resend,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.
type Resend ¶ added in v0.2.4
type Resend struct {
APIKeyFile string `yaml:"apiKeyFile,omitempty"`
From string `yaml:"from,omitempty"`
}
Resend holds the settings for sending invoice email through Resend.
func (*Resend) Configured ¶ added in v0.2.4
Configured reports whether the config sets any email sending setting.