Documentation
¶
Index ¶
- func ReadConfig(configEnvVar, configFile, secretsFile string) error
- type AirtableBaseConfig
- type AirtableConfig
- type AirtableFieldsConfig
- type AirtableSecrets
- type Budget
- type CalculatedField
- type Config
- type CurrencyConversion
- type ExchangerateAPISecrets
- type InfluxSecrets
- type Secrets
- type SqlSecrets
- type YnabConfig
- type YnabSecrets
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ReadConfig ¶
Types ¶
type AirtableBaseConfig ¶
type AirtableBaseConfig struct {
BaseID string `json:"airtableBaseId"`
AirtableTableName string
InfluxMeasurement string
Fields AirtableFieldsConfig
}
type AirtableConfig ¶
type AirtableConfig struct {
UpdateFrequency string `json:"updateFrequency"`
AirtableDatabase string `json:"airtableDatabase"`
AirtableBases []AirtableBaseConfig `json:"airtableBases"`
}
func CurrentAirtableConfig ¶
func CurrentAirtableConfig() *AirtableConfig
type AirtableFieldsConfig ¶
type AirtableSecrets ¶
type AirtableSecrets struct {
AirtableAPIKey string `json:"airtableApiKey"`
}
func CurrentAirtableSecrets ¶
func CurrentAirtableSecrets() *AirtableSecrets
type Budget ¶
type Budget struct {
Name string `json:"name"`
// Date to import transactions after
ImportAfterDate string `json:"importAfterDate"`
ID string `json:"id"`
Currency string `json:"currency"`
Conversions CurrencyConversion `json:"conversions"`
CalculatedFields []CalculatedField
}
type CalculatedField ¶
type Config ¶
type Config struct {
Ynab YnabConfig
Airtable AirtableConfig
}
func CurrentConfig ¶
func CurrentConfig() *Config
type CurrencyConversion ¶
type ExchangerateAPISecrets ¶
type ExchangerateAPISecrets struct {
AccessKey string `json:"accessKey" env:"EXCHANGE_RATES_API_ACCESS_KEY"`
}
func CurrentExchangeRateAPISecrets ¶
func CurrentExchangeRateAPISecrets() *ExchangerateAPISecrets
type InfluxSecrets ¶
func CurrentInfluxSecrets ¶
func CurrentInfluxSecrets() *InfluxSecrets
type Secrets ¶
type Secrets struct {
Ynab YnabSecrets
Airtable AirtableSecrets
Influx InfluxSecrets
SQL SqlSecrets
ExchangerateAPI ExchangerateAPISecrets `json:"exchangeratesapi"`
// Altternative to Sql struct, also specifies table name which will be used for all importer
// designed to be used with heroku env variable
DatabaseURL string `env:"DATABASE_URL"`
}
func CurrentSecrets ¶
func CurrentSecrets() *Secrets
type SqlSecrets ¶
type SqlSecrets struct {
SqlHost string `env:"SQL_HOST"`
SqlUsername string `env:"SQL_USERNAME"`
SqlPassword string `env:"SQL_PASSWORD"`
}
func CurrentSqlSecrets ¶
func CurrentSqlSecrets() *SqlSecrets
type YnabConfig ¶
type YnabConfig struct {
UpdateFrequency string
Currencies []string
Budgets []Budget
SQL struct {
YnabDatabase string
TransactionsTable string
AccountsTable string
BudgetsTable string
NetworthTable string
BatchSize int
}
Tags struct {
Enabled bool
RegexMatch string
}
}
func CurrentYnabConfig ¶
func CurrentYnabConfig() *YnabConfig
type YnabSecrets ¶
type YnabSecrets struct {
YnabAccessToken string `json:"ynabAccessToken" env:"YNAB_ACCESS_TOKEN"`
}
func CurrentYnabSecrets ¶
func CurrentYnabSecrets() *YnabSecrets
Click to show internal directories.
Click to hide internal directories.