config

package
v0.0.0-...-07aeb4e Latest Latest
Warning

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

Go to latest
Published: Dec 16, 2024 License: MPL-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetConfigPath

func GetConfigPath(override *string) string

func GetSource

func GetSource() string

func GetSyncDays

func GetSyncDays() int

func GetTargets

func GetTargets() []string

func LoadConfig

func LoadConfig(path string) error

func LoadConfigFromEnv

func LoadConfigFromEnv() error

func SaveConfig

func SaveConfig(cfg *Config) error

Types

type ColumnConfig

type ColumnConfig struct {
	Chapter string `yaml:"chapter" env:"COLUMN_CHAPTER"`
}

ColumnConfig represents the columns configuration

func GetColumns

func GetColumns() ColumnConfig

type Config

type Config struct {
	Columns   ColumnConfig   `yaml:"columns"`
	Databases DatabaseConfig `yaml:"databases"`
	Source    string         `yaml:"source" env:"SOURCE"`
	Targets   []string       `yaml:"targets" env:"TARGETS"`
	Tokens    TokenConfig    `yaml:"tokens"`
	SyncDays  int            `yaml:"syncDays" env:"SYNC_DAYS"`
}

func GetConfig

func GetConfig() Config

type DatabaseConfig

type DatabaseConfig struct {
	Calibre    string `yaml:"calibre" env:"DATABASE_CALIBRE"`
	CalibreWeb string `yaml:"calibreweb" env:"DATABASE_CALIBREWEB"`
}

DatabaseConfig represents the database paths configuration

func GetDatabases

func GetDatabases() DatabaseConfig

type TokenConfig

type TokenConfig struct {
	Anilist   string `yaml:"anilist" env:"TOKEN_ANILIST"`
	Hardcover string `yaml:"hardcover" env:"TOKEN_HARDCOVER"`
}

TokenConfig represents the API tokens configuration

func GetTokens

func GetTokens() TokenConfig

Jump to

Keyboard shortcuts

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