Files
QSfera/pkg/handler/config/option.go
T
Thomas Boerger b6d43661a8 Embed phoenix and serve it
So far Phoenix have been embedded into the binary and we can customize
the required config based on flags, env variables and optionally via
config file. For now I'm embedding the whole Phonix content, optherwise
the all-in-one binary `ocis` will get pretty complicated until we add
the generate commands to that repo as well and provide a mechanism to
inject the embedding.
2019-09-06 13:40:18 +02:00

47 lines
883 B
Go

package config
// Option configures an assets option.
type Option func(*config)
// WithServer returns an option to set server.
func WithServer(val string) Option {
return func(c *config) {
c.server = val
}
}
// WithTheme returns an option to set theme.
func WithTheme(val string) Option {
return func(c *config) {
c.theme = val
}
}
// WithVersion returns an option to set version.
func WithVersion(val string) Option {
return func(c *config) {
c.version = val
}
}
// WithClient returns an option to set client id.
func WithClient(val string) Option {
return func(c *config) {
c.client = val
}
}
// WithApps returns an option to set apps.
func WithApps(val []string) Option {
return func(c *config) {
c.apps = val
}
}
// WithCustom returns an option to set custom config.
func WithCustom(val string) Option {
return func(c *config) {
c.custom = val
}
}