Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ApplyEnvConfiguration ¶ added in v0.4.1
func ApplyEnvConfiguration(config *Configuration)
ApplyEnvConfiguration applies the env variables on top of existing config
Types ¶
type Configuration ¶ added in v0.4.1
type Configuration struct {
ArticlesPerPage int
DatabasePath string
Description string
EnableCreate bool
EnableEdit bool
GoogleAnalyticsCode string
Port string
Title string
}
Configuration can be modified through environment variables
func DefaultConfiguration ¶ added in v0.4.1
func DefaultConfiguration() Configuration
DefaultConfiguration returns the default settings for the app
type Container ¶
type Container struct {
Configuration Configuration
Db Database
Giphy GiphyAdapter
Version string
}
Container Define the main container for the application
type Database ¶
type Database interface {
Close()
Connect(dbFile string) error
Exec(sql string, args ...interface{}) (sql.Result, error)
Query(sql string, args ...interface{}) (rows.Rows, error)
}
Database Define same interface as database
type GiphyAdapter ¶
GiphyAdapter Interface for API
Click to show internal directories.
Click to hide internal directories.