Documentation
¶
Overview ¶
Code generated by genx:code DO NOT EDIT.
Index ¶
- Variables
- func DotEnv(values map[string]string) []byte
- type Code
- type Decoder
- type Encoder
- type Group
- func (g *Group) Add(v *Var) bool
- func (g *Group) Bytes() []byte
- func (g *Group) Get(key string) *Var
- func (g *Group) Key(key string) string
- func (g *Group) Len() int
- func (g *Group) MapEntries(k string) []string
- func (g *Group) MaskBytes() []byte
- func (g *Group) Name() string
- func (g *Group) SliceLength(k string) int
- func (g *Group) Values() map[string]*Var
- type PathWalker
- type Var
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TextMarshallerT = reflect.TypeFor[encoding.TextMarshaler]() TextUnmarshallerT = reflect.TypeFor[encoding.TextUnmarshaler]() )
Functions ¶
Types ¶
type Code ¶
type Code int8
Code defines env parsing error code +genx:code @def envx.Error
const ( CODE_UNDEFINED Code = iota + 1 CODE__DEC_INVALID_VALUE // cannot set value CODE__DEC_INVALID_VALUE_CANNOT_SET // nil value CODE__DEC_INVALID_MAP_KEY_TYPE // invalid map key type, expect alphabet string or positive integer CODE__DEC_FAILED_UNMARSHAL // failed to unmarshal CODE__ENC_INVALID_MAP_KEY_TYPE // invalid map key type, expect alphabet string or positive integer CODE__ENC_INVALID_MAP_KEY_VALUE // invalid map key value, expect alphabet string or positive integer CODE__ENC_INVALID_ENV_KEY // invalid env key, expect alphabet string CODE__ENC_FAILED_MARSHAL // failed to marshal CODE__ENC_DUPLICATE_GROUP_KEY // group key duplicated )
type Group ¶
type Group struct {
// contains filtered or unexported fields
}
func ParseGroupFromEnv ¶
func (*Group) MapEntries ¶
func (*Group) SliceLength ¶
type PathWalker ¶
type PathWalker struct {
// contains filtered or unexported fields
}
func NewPathWalker ¶
func NewPathWalker() *PathWalker
func (*PathWalker) Enter ¶
func (pw *PathWalker) Enter(i any)
func (*PathWalker) Leave ¶
func (pw *PathWalker) Leave()
func (*PathWalker) Paths ¶
func (pw *PathWalker) Paths() []any
func (*PathWalker) String ¶
func (pw *PathWalker) String() string
Click to show internal directories.
Click to hide internal directories.