Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var SettingsModule = fx.Provide( func() (out SettingsResult, err error) { err = out.LoadFromEnv() return }, )
View Source
var SqliteDriverModule = fx.Provide( func( l *zap.Logger, s SettingsParams, ) (out ofx.GormDriverResult, err error) { out.Dialector = sqlite.Open(s.GormDns) return out, nil }, )
Functions ¶
This section is empty.
Types ¶
type DemoClient ¶
type DemoClient struct {
// contains filtered or unexported fields
}
func NewDemoClient ¶
func NewDemoClient( target string, secure bool, ) (result *DemoClient, err error)
type SettingsParams ¶
type SettingsResult ¶
type SettingsResult struct { fx.Out DemoUrl string `name:"DemoUrl" envconfig:"DEMO_URL" default:"localhost:8081"` DbName string `name:"DbName" envconfig:"DB_NAME" default:"demo"` GormDns string `name:"GormDns" envconfig:"GORM_DNS" default:"demo.db"` }
func (*SettingsResult) LoadFromEnv ¶
func (g *SettingsResult) LoadFromEnv() (err error)
Click to show internal directories.
Click to hide internal directories.