Initial commit

This commit is contained in:
2026-07-04 20:29:29 +00:00
commit 8198e8cfee
40 changed files with 3096 additions and 0 deletions
+31
View File
@@ -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"
)