implement reference grpc server

This commit is contained in:
2025-03-30 20:19:25 -04:00
parent 4bd50b75b9
commit a69cd3f44c
14 changed files with 202 additions and 27 deletions

View File

@ -8,8 +8,8 @@ import (
)
type DemoConfig struct {
DemoField int `yaml:"demoField" json:"demoField,omitempty"`
DemoType *DemoOpts `yaml:"demoType" json:"demoType,omitempty"`
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
@ -18,6 +18,13 @@ type DemoConfig struct {
}
type DemoOpts struct {
OptField int `yaml:"optField" json:"optField,omitempty"`
OptName string `yaml:"optName" json:"optName,omitempty"`
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"
)