configs

package
v0.2.1-0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2024 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetDefaultPrinter

func GetDefaultPrinter() pkg.Printer

func InitiateDatabaseConnection added in v0.2.0

func InitiateDatabaseConnection(ctx context.Context) error

Types

type DBConfigArangoDB

type DBConfigArangoDB struct {
	Name     string `json:"name" yaml:"name"`
	Host     string `json:"host" yaml:"host"`
	Port     string `json:"port" yaml:"port"`
	User     string `json:"user" yaml:"user"`
	Password string `json:"password" yaml:"password"`
}

type DBConfigPostgres

type DBConfigPostgres struct {
	Name     string `json:"name" yaml:"name"`
	Host     string `json:"host" yaml:"host"`
	Port     string `json:"port" yaml:"port"`
	User     string `json:"user" yaml:"user"`
	Password string `json:"password" yaml:"password"`
	SSLMode  string `json:"sslmode" yaml:"sslmode"`
}

func (DBConfigPostgres) String

func (cp DBConfigPostgres) String() string

type DBConfigSQLite added in v0.2.0

type DBConfigSQLite struct {
	SyncToDrive          bool          `json:"syncToDrive" yaml:"syncToDrive"`
	DisableSyncFromDrive bool          `json:"disableSyncFromDrive" yaml:"disableSyncFromDrive"`
	SyncInterval         time.Duration `json:"syncInterval" yaml:"syncInterval"`
}

type DatabaseConfig

type DatabaseConfig struct {
	Type DatabaseType `json:"type" yaml:"type"`

	//ArangoDB DBConfigArangoDB `json:"arangodb" yaml:"arangodb"`
	Postgres lib.PostgresConfig `json:"postgres" yaml:"postgres"`
	SQLite   DBConfigSQLite     `json:"sqlite" yaml:"sqlite"`
}

type DatabaseType

type DatabaseType string
const (
	DatabaseArangoDB DatabaseType = "arangodb"
	DatabasePostgres DatabaseType = "postgres"
	DatabaseSQLite   DatabaseType = "sqlite"
	DatabaseSupabase DatabaseType = "supabase"
)

type ExpenseConfiguration added in v0.2.0

type ExpenseConfiguration struct {
	TelegramSecret string         `json:"telegramSecret" yaml:"telegramSecret"`
	Database       DatabaseConfig `json:"database" yaml:"database"`
}
var TrackerConfig ExpenseConfiguration

Jump to

Keyboard shortcuts

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