generated from rmcguire/go-server-with-otel
Initial commit
This commit is contained in:
@@ -0,0 +1,31 @@
|
||||
// Package config contains ServiceConfig, which is intended
|
||||
// to extend go-app/pkg/config.AppConfig. Add any custom fields
|
||||
// here, and it will automatically be handled by go-app, including
|
||||
// overrides by environment, and json schema generation
|
||||
package config
|
||||
|
||||
import (
|
||||
"gitea.libretechconsulting.com/rmcguire/go-app/pkg/config"
|
||||
)
|
||||
|
||||
type ServiceConfig struct {
|
||||
Timezone string `yaml:"timezone" json:"timezone,omitempty" default:"UTC"`
|
||||
Opts *DemoOpts `yaml:"opts" json:"opts,omitempty"`
|
||||
|
||||
// Embeds go-app config, used by go-app to
|
||||
// merge custom config into go-app config, and to produce
|
||||
// a complete configuration json schema
|
||||
*config.AppConfig
|
||||
}
|
||||
|
||||
type DemoOpts struct {
|
||||
FactLang string `yaml:"factLang" json:"factLang,omitempty" default:"en"`
|
||||
FactType FactType `yaml:"factType" json:"factType,omitempty" default:"random" enum:"today,random"`
|
||||
}
|
||||
|
||||
type FactType string
|
||||
|
||||
const (
|
||||
TypeToday FactType = "today"
|
||||
TypeRandom FactType = "random"
|
||||
)
|
||||
Reference in New Issue
Block a user