Documentation
¶
Index ¶
- Constants
- func ClearContent()
- func GetContent(file ...string) string
- func RemoveConfig(file ...string)
- func SetContent(content string, file ...string)
- type TConfig
- func (c *TConfig) AddPath(path string) error
- func (c *TConfig) Clear()
- func (c *TConfig) Contains(pattern string) bool
- func (c *TConfig) FilePath(file ...string) (path string)
- func (c *TConfig) Get(pattern string, def ...interface{}) interface{}
- func (c *TConfig) GetArray(pattern string, def ...interface{}) []interface{}
- func (c *TConfig) GetBool(pattern string, def ...interface{}) bool
- func (c *TConfig) GetDuration(pattern string, def ...interface{}) time.Duration
- func (c *TConfig) GetFileName() string
- func (c *TConfig) GetFilePath(file ...string) (path string)
- func (c *TConfig) GetFloat32(pattern string, def ...interface{}) float32
- func (c *TConfig) GetFloat64(pattern string, def ...interface{}) float64
- func (c *TConfig) GetFloats(pattern string, def ...interface{}) []float64
- func (c *TConfig) GetInt(pattern string, def ...interface{}) int
- func (c *TConfig) GetInt16(pattern string, def ...interface{}) int16
- func (c *TConfig) GetInt32(pattern string, def ...interface{}) int32
- func (c *TConfig) GetInt64(pattern string, def ...interface{}) int64
- func (c *TConfig) GetInt8(pattern string, def ...interface{}) int8
- func (c *TConfig) GetInterfaces(pattern string, def ...interface{}) []interface{}
- func (c *TConfig) GetInts(pattern string, def ...interface{}) []int
- func (c *TConfig) GetMap(pattern string, def ...interface{}) map[string]interface{}
- func (c *TConfig) GetString(pattern string, def ...interface{}) string
- func (c *TConfig) GetStrings(pattern string, def ...interface{}) []string
- func (c *TConfig) GetStruct(pattern string, pointer interface{}, mapping ...map[string]string) error
- func (c *TConfig) GetStructDeep(pattern string, pointer interface{}, mapping ...map[string]string) error
- func (c *TConfig) GetStructs(pattern string, pointer interface{}, mapping ...map[string]string) error
- func (c *TConfig) GetStructsDeep(pattern string, pointer interface{}, mapping ...map[string]string) error
- func (c *TConfig) GetTime(pattern string, format ...string) time.Time
- func (c *TConfig) GetUint(pattern string, def ...interface{}) uint
- func (c *TConfig) GetUint16(pattern string, def ...interface{}) uint16
- func (c *TConfig) GetUint32(pattern string, def ...interface{}) uint32
- func (c *TConfig) GetUint64(pattern string, def ...interface{}) uint64
- func (c *TConfig) GetUint8(pattern string, def ...interface{}) uint8
- func (c *TConfig) GetVar(pattern string, def ...interface{}) *_type.TVar
- func (c *TConfig) GetXTime(pattern string, format ...string) *xtime.Time
- func (c *TConfig) SetFileName(name string)
- func (c *TConfig) SetPath(path string) error
- func (c *TConfig) SetViolenceCheck(check bool)
Constants ¶
View Source
const (
DEFAULT_CONFIG_FILE = "config.yaml"
)
View Source
const (
// 默认配置实例名称
DEFAULT_GROUP_NAME = "default"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type TConfig ¶
type TConfig struct {
// contains filtered or unexported fields
}
func (*TConfig) GetDuration ¶
func (*TConfig) GetFloat32 ¶
func (*TConfig) GetFloat64 ¶
func (*TConfig) GetInterfaces ¶
func (*TConfig) GetStrings ¶
func (*TConfig) GetStructDeep ¶
func (*TConfig) GetStructs ¶
func (*TConfig) GetStructsDeep ¶
func (*TConfig) SetViolenceCheck ¶
设置是否检查访问子层,默认false
Click to show internal directories.
Click to hide internal directories.