configs

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GinServerSettings

type GinServerSettings struct {
	Port int `yaml:"port"`
}

type PostgresSettings

type PostgresSettings struct {
	ConnectionString string `yaml:"connectionString"`
}

type SqliteSettings

type SqliteSettings struct {
	DBPath string `yaml:"dbPath"`
}

type YamlConfigs

type YamlConfigs struct {
	/* ------------------------ choose one of delivery methods ------------------------ */
	UseGinServer bool `yaml:"useGinServer"`
	/* ------------------------- choose one of storage methods ------------------------ */
	UseSqlite   bool `yaml:"useSqlite"`
	UsePostgres bool `yaml:"usePostgres"`
	/* ---------------------------- delivery settings --------------------------- */
	GinServerSettings GinServerSettings `yaml:"ginServerSettings"`
	/* ---------------------------- storage settings ---------------------------- */
	SqliteSettings   SqliteSettings   `yaml:"sqliteSettings"`
	PostgresSettings PostgresSettings `yaml:"postgresSettings"`
}

func DecodeYaml

func DecodeYaml(file io.Reader) (YamlConfigs, error)

Jump to

Keyboard shortcuts

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