Documentation ¶
Index ¶
- Variables
- func Bootstrap() error
- func RequiresBootStrap() bool
- func ScheduleAt(f func(), t time.Time, i time.Duration) chan struct{}
- func Setup()
- func SetupAssets()
- func SetupAuth()
- func SetupDatabase()
- func SetupLog() error
- func SetupMail()
- func SetupRoutes() *mux.Mux
- func SetupServices()
- func SetupView()
Constants ¶
This section is empty.
Variables ¶
var ( // ConfigDevelopment holds the development config from fragmenta.json ConfigDevelopment map[string]string // ConfigProduction holds development config from fragmenta.json ConfigProduction map[string]string // ConfigTest holds the app test config from fragmenta.json ConfigTest map[string]string )
Functions ¶
func Bootstrap ¶
func Bootstrap() error
Bootstrap generates missing config files, sql migrations, and runs the first migrations For this we need to know what to call the app, but we default to kennygrant/gohackernews for now we could use our current folder name?
func RequiresBootStrap ¶
func RequiresBootStrap() bool
RequiresBootStrap returns true if the app requires bootstrapping
func ScheduleAt ¶ added in v1.0.2
ScheduleAt schedules execution for a particular time and at intervals thereafter. If interval is 0, the function will be called only once. Callers should call close(task) before exiting the app or to stop repeating the action.
func SetupAssets ¶ added in v1.0.1
func SetupAssets()
SetupAssets compiles or copies our assets from src into the public assets folder.
func SetupAuth ¶ added in v1.0.1
func SetupAuth()
SetupAuth sets up the auth pkg and authorisation for users
func SetupDatabase ¶ added in v1.0.1
func SetupDatabase()
SetupDatabase sets up the db with query given our server config.
func SetupMail ¶ added in v1.0.1
func SetupMail()
SetupMail sets us up to send mail via sendgrid (requires key).
func SetupRoutes ¶ added in v1.0.1
SetupRoutes creates a new router and adds the routes for this app to it.
func SetupServices ¶ added in v1.0.1
func SetupServices()
SetupServices sets up external services from our config file
Types ¶
This section is empty.