Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Meta Environment string AuthBasePath string StocksBasePath string Timeout time.Duration // Auth CookieStoreSecret string CookieMaxAge int GoogleClientID string GoogleClientSecret string GoogleCallbackUrl string HashCost int DatabaseHost string DatabaseUser string DatabasePassword string DatabasePort int DatabaseName string FinnHubApiKey string // contains filtered or unexported fields }
func LoadConfig ¶
func LoadConfig() *Config
func (*Config) GetCookieStore ¶
func (c *Config) GetCookieStore() *sessions.CookieStore
func (*Config) GetDatalayer ¶
func (c *Config) GetDatalayer() (datalayer.StockStore, error)
GetDatalayer connects to the database and returns a valid StockStore or a connection error. The connection pool is cached in the config object.
func (*Config) GetStockFetcher ¶
func (c *Config) GetStockFetcher() stockfetcher.StockFetcher
GetStockFetcher generates the API client for fetching stock prices. The client is cached in the config object.
Click to show internal directories.
Click to hide internal directories.