Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateAndLoadDotEnv ¶
GenerateAndLoadDotEnv to create and load envfile
func GenerateDoc ¶ added in v0.9.17
GenerateDoc generate usage document
Types ¶
type Envconfig ¶
type Envconfig struct {
Ctor string
Prefix string
SpecType string
Name string
Fields []*Field
FnName string
}
Envconfig model
type EnvconfigAnnot ¶ added in v0.9.17
type EnvconfigAnnot struct {
TagName string // By default is `@envconfig`
Template string // By default defined in defaultCfgTemplate variable
Target string // By default is `cmd/PROJECT_NAME/envconfig_annotated.go`
GenDotEnv string // Dotenv path. It will be generated if not empty
GenDoc string // Usage documentation path. It will be if not emtpy
}
EnvconfigAnnot handle @envconfig annotation e.g. `@envconfig (prefix: "PREFIX" ctor:"CTOR")`
func (*EnvconfigAnnot) Annotation ¶ added in v0.9.21
func (m *EnvconfigAnnot) Annotation() *typgen.Annotation
func (*EnvconfigAnnot) Context ¶ added in v0.9.17
func (m *EnvconfigAnnot) Context(c *typgo.Context, directive typgen.Directives) *Context
Context create context instance
func (*EnvconfigAnnot) Process ¶ added in v0.9.17
func (m *EnvconfigAnnot) Process(c *typgo.Context, directives typgen.Directives) error
Annotate Envconfig to prepare dependency-injection and env-file
Click to show internal directories.
Click to hide internal directories.