Documentation
¶
Overview ¶
Package config implements parsing and setting app configuration options
Index ¶
- type Options
- func (o *Options) BasePath() string
- func (o *Options) BaseURL() string
- func (o *Options) DatabaseDriver() string
- func (o *Options) DatabaseURL() string
- func (o *Options) InitEmail() string
- func (o *Options) IsHTTPS() bool
- func (o *Options) ListenAddr() string
- func (o *Options) RootURL() string
- func (o *Options) RunMigrations() bool
- func (o *Options) SMTPFrom() string
- func (o *Options) SMTPPass() string
- func (o *Options) SMTPURL() string
- func (o *Options) SMTPUser() string
- type Parser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Options ¶
type Options struct {
// contains filtered or unexported fields
}
Options consist of all application configuration
var Opts *Options
Opts is the application level configuration options
func (*Options) BasePath ¶
BasePath returns the configured path of the service as specified in the BaseURL
func (*Options) DatabaseDriver ¶
DatabaseDriver returns the configured sql dialect
func (*Options) DatabaseURL ¶
DatabaseURL returns the configured database url.
func (*Options) ListenAddr ¶
ListenAddr is the application's listen ip and port if configured to serve http
func (*Options) RunMigrations ¶
RunMigrations indicates if the application should run database migrations.
func (*Options) SMTPFrom ¶
SMTPFrom returns the configured From address for email sent by the application.
type Parser ¶
type Parser struct {
// contains filtered or unexported fields
}
Parser contains and produces configuration options
func (*Parser) ParseEnvironmentVariables ¶
ParseEnvironmentVariables will update the Parser's options based on the application env