implement reference grpc server
This commit is contained in:
@ -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"
|
||||
)
|
||||
|
Reference in New Issue
Block a user