Documentation ¶
Index ¶
- Constants
- func EnvStringsConfig(fileName string) option
- func Execute(str string) (ret string, err error)
- func ExecuteWith(str string, envValues map[string]interface{}) (ret string, err error)
- func FuncMap(name string, function interface{}) option
- func UnmarshalJsonArray(data string) ([]interface{}, error)
- func UnmarshalJsonObject(data string) (map[string]interface{}, error)
- type EnvStringConfig
- type EnvStrings
- func (p *EnvStrings) Execute(str string) (ret string, err error)
- func (p *EnvStrings) ExecuteWith(str string, envValues map[string]interface{}) (ret string, err error)
- func (p *EnvStrings) FuncUsageStatic() map[string][]FuncStaticItem
- func (p *EnvStrings) RegisterFunc(name string, function interface{}) (err error)
- type ExtFunc
- type ExtFuncs
- type ExtFuncsRedis
- type FuncStaticItem
- type StorageConfig
- type TemplateFuncs
Constants ¶
View Source
const ( ENV_STRINGS_KEY = "ENV_STRINGS" ENV_STRINGS_EXT = ".env" ENV_STRINGS_CONF = "/etc/env_strings.conf" ENV_STRINGS_CONFIG_KEY = "ENV_STRINGS_CONF" )
View Source
const (
STORAGE_REDIS = "redis"
)
Variables ¶
This section is empty.
Functions ¶
func EnvStringsConfig ¶
func EnvStringsConfig(fileName string) option
func ExecuteWith ¶
func UnmarshalJsonArray ¶
func UnmarshalJsonObject ¶
Types ¶
type EnvStringConfig ¶
type EnvStringConfig struct {
Storages []StorageConfig `json:"storages"`
}
type EnvStrings ¶
type EnvStrings struct {
// contains filtered or unexported fields
}
func NewEnvStrings ¶
func NewEnvStrings(envName string, envExt string, opts ...option) *EnvStrings
func (*EnvStrings) ExecuteWith ¶
func (p *EnvStrings) ExecuteWith(str string, envValues map[string]interface{}) (ret string, err error)
func (*EnvStrings) FuncUsageStatic ¶
func (p *EnvStrings) FuncUsageStatic() map[string][]FuncStaticItem
func (*EnvStrings) RegisterFunc ¶
func (p *EnvStrings) RegisterFunc(name string, function interface{}) (err error)
type ExtFuncs ¶
func NewExtFuncsRedis ¶
type ExtFuncsRedis ¶
type ExtFuncsRedis struct {
// contains filtered or unexported fields
}
func (*ExtFuncsRedis) Get ¶
func (p *ExtFuncsRedis) Get(args ...interface{}) (ret interface{}, err error)
func (*ExtFuncsRedis) GetFuncs ¶
func (p *ExtFuncsRedis) GetFuncs() template.FuncMap
func (*ExtFuncsRedis) HGet ¶
func (p *ExtFuncsRedis) HGet(args ...interface{}) (ret interface{}, err error)
type FuncStaticItem ¶
type StorageConfig ¶
type TemplateFuncs ¶
type TemplateFuncs struct {
// contains filtered or unexported fields
}
func NewTemplateFuncs ¶
func NewTemplateFuncs() *TemplateFuncs
func (*TemplateFuncs) GetFuncMaps ¶
func (p *TemplateFuncs) GetFuncMaps(envName string) template.FuncMap
func (*TemplateFuncs) Register ¶
func (p *TemplateFuncs) Register(name string, function interface{}) (err error)
Click to show internal directories.
Click to hide internal directories.