Documentation ¶
Index ¶
- type App
- func (a *App) ConnectToDb()
- func (a *App) Get(path string, name string, f func(w http.ResponseWriter, r *http.Request))
- func (a *App) Initialize()
- func (a *App) Ping(w http.ResponseWriter, r *http.Request)
- func (a *App) Post(path string, name string, f func(w http.ResponseWriter, r *http.Request))
- func (a *App) Run()
- func (a *App) Scrumify(w http.ResponseWriter, r *http.Request)
- func (a *App) SetMiddleware()
- func (a *App) SetRoutes()
- type AppConfig
- type DatabaseConfig
- type ServerConfig
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type App ¶
App defines the various components of the app.
func (*App) ConnectToDb ¶ added in v0.0.1
func (a *App) ConnectToDb()
ConnectToDb will connect the app to the database specified by a.Config.
func (*App) Initialize ¶
func (a *App) Initialize()
Initialize will create the various components of the app needed to run it from a.Config. The app can be configured with a.Config.Load().
func (*App) Ping ¶ added in v0.0.1
func (a *App) Ping(w http.ResponseWriter, r *http.Request)
Ping calls the Ping controller.
func (*App) Run ¶
func (a *App) Run()
Run will run the app depending on what platform it is configured to run on.
func (*App) Scrumify ¶ added in v0.2.0
func (a *App) Scrumify(w http.ResponseWriter, r *http.Request)
Scrumify calls the Scrumify controller.
func (*App) SetMiddleware ¶ added in v0.1.2
func (a *App) SetMiddleware()
SetMiddleware will initialize middleware handlers for the router.
type AppConfig ¶
type AppConfig struct { Database *DatabaseConfig Server *ServerConfig AllowedOrigins string Platform string }
AppConfig defines the settings of the app that can be configured.
type DatabaseConfig ¶
type DatabaseConfig struct { Host string Port string User string Password string Schema string SslMode string }
DatabaseConfig defines the parameters needed to connect to a database. Currently, only Postgres databases are supported.
func (*DatabaseConfig) GetInfo ¶
func (dc *DatabaseConfig) GetInfo() string
GetInfo returns the parameters defined in DatabaseConfig.
type ServerConfig ¶
ServerConfig defines the parameters needed to serve the app on an IPv4 interface.
func (*ServerConfig) GetAddr ¶
func (sc *ServerConfig) GetAddr() string
GetAddr returns the full IPv4 interface defined in ServerConfig.