config

package
v0.0.0-...-8093eda Latest Latest
Warning

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

Go to latest
Published: Apr 3, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	Port string `yaml:"port",json:"port"`
}

AppConfig stores the applications configuration

func NewAppConfig

func NewAppConfig(port string) (*AppConfig, error)

Functions ****************************** NewAppConfig return an application configuration for use with the API and app

type CronConfig

type CronConfig struct {
	DB  CronConfigDB  `yaml:"db",json:"db"`
	API CronConfigAPI `yaml:"api",json:"api"`
}

CronConfig stores the cron job configuration

func NewCronConfig

func NewCronConfig() (*CronConfig, error)

NewCronConfig return a cron job configuration from the environment variables TODO: Switch to viper

type CronConfigAPI

type CronConfigAPI struct {
	Keys CronConfigAPIKeys `yaml:"keys",json:"keys"`
}

CronConfigAPI

type CronConfigAPIKeys

type CronConfigAPIKeys struct {
	AlphaVantage string `yaml:"alphavantage",json:"alphavantage"`
}

CronConfigAPIKeys

type CronConfigDB

type CronConfigDB struct {
	Host     string `yaml:"host",json:"host"`
	Port     int    `yaml:"port",json:"port"`
	Name     string `yaml:"name",json:"name"`
	Username string `yaml:"username",json:"username"`
	Password string `yaml:"password",json:"password"`
}

CronConfigDB

type DBConfig

type DBConfig struct {
	Host     string `yaml:"host",json:"host"`
	Port     int    `yaml:"port",json:"port"`
	Name     string `yaml:"name",json:"name"`
	Username string `yaml:"username",json:"username"`
	Password string `yaml:"password",json:"password"`
}

CronConfigDB

Jump to

Keyboard shortcuts

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