Documentation ¶
Index ¶
- Constants
- Variables
- type GRcpConfig
- func (g *GRcpConfig) AllSettings() map[string]interface{}
- func (g *GRcpConfig) DelConfig() error
- func (g *GRcpConfig) Get(key string) interface{}
- func (g *GRcpConfig) GetAll() (string, error)
- func (g *GRcpConfig) GetBool(key string) bool
- func (g *GRcpConfig) GetDuration(key string) time.Duration
- func (g *GRcpConfig) GetFloat64(key string) float64
- func (g *GRcpConfig) GetInt(key string) int
- func (g *GRcpConfig) GetInt32(key string) int32
- func (g *GRcpConfig) GetInt64(key string) int64
- func (g *GRcpConfig) GetIntSlice(key string) []int
- func (g *GRcpConfig) GetSizeInBytes(key string) uint
- func (g *GRcpConfig) GetString(key string) string
- func (g *GRcpConfig) GetStringMap(key string) map[string]interface{}
- func (g *GRcpConfig) GetStringMapString(key string) map[string]string
- func (g *GRcpConfig) GetStringMapStringSlice(key string) map[string][]string
- func (g *GRcpConfig) GetStringSlice(key string) []string
- func (g *GRcpConfig) GetTime(key string) time.Time
- func (g *GRcpConfig) GetUint(key string) uint
- func (g *GRcpConfig) GetUint32(key string) uint32
- func (g *GRcpConfig) GetUint64(key string) uint64
- func (g *GRcpConfig) PutConfig(data string) error
Constants ¶
View Source
const ( FN = "application" //生成配置文件的名称 Ext = "json" //生成配置文件的后缀 ServerHost = "GO_GRPC_CONFIG_SERVER_HOST" //服务端地址 ENV = "GO_GRPC_CONFIG_ENV" //环境 NAMESPACE = "GO_GRPC_CONFIG_NAMESPACE" //命名空间 PROJECT = "GO_GRPC_CONFIG_PROJECT" //项目 VERSION = "GO_GRPC_CONFIG_VERSION" //版本 )
Variables ¶
View Source
var (
I *info
)
Functions ¶
This section is empty.
Types ¶
type GRcpConfig ¶
type GRcpConfig struct {
// contains filtered or unexported fields
}
var (
C *GRcpConfig
)
func (*GRcpConfig) AllSettings ¶
func (g *GRcpConfig) AllSettings() map[string]interface{}
func (*GRcpConfig) DelConfig ¶ added in v1.1.0
func (g *GRcpConfig) DelConfig() error
DelConfig @Author liangdongpo @Description 删除缓存**慎用,会把此环境、命名空间、项目、版本条件的缓存都删除 @Date 12:35 下午 2021/11/18 @Param @return
func (*GRcpConfig) Get ¶
func (g *GRcpConfig) Get(key string) interface{}
func (*GRcpConfig) GetAll ¶ added in v1.1.1
func (g *GRcpConfig) GetAll() (string, error)
GetAll @Author liangdongpo @Description 获取所有配置:string 类型 @Date 12:45 下午 2021/11/18 @Param @return
func (*GRcpConfig) GetBool ¶
func (g *GRcpConfig) GetBool(key string) bool
func (*GRcpConfig) GetDuration ¶
func (g *GRcpConfig) GetDuration(key string) time.Duration
func (*GRcpConfig) GetFloat64 ¶
func (g *GRcpConfig) GetFloat64(key string) float64
func (*GRcpConfig) GetInt ¶
func (g *GRcpConfig) GetInt(key string) int
func (*GRcpConfig) GetInt32 ¶
func (g *GRcpConfig) GetInt32(key string) int32
func (*GRcpConfig) GetInt64 ¶
func (g *GRcpConfig) GetInt64(key string) int64
func (*GRcpConfig) GetIntSlice ¶
func (g *GRcpConfig) GetIntSlice(key string) []int
func (*GRcpConfig) GetSizeInBytes ¶
func (g *GRcpConfig) GetSizeInBytes(key string) uint
func (*GRcpConfig) GetString ¶
func (g *GRcpConfig) GetString(key string) string
func (*GRcpConfig) GetStringMap ¶
func (g *GRcpConfig) GetStringMap(key string) map[string]interface{}
func (*GRcpConfig) GetStringMapString ¶
func (g *GRcpConfig) GetStringMapString(key string) map[string]string
func (*GRcpConfig) GetStringMapStringSlice ¶
func (g *GRcpConfig) GetStringMapStringSlice(key string) map[string][]string
func (*GRcpConfig) GetStringSlice ¶
func (g *GRcpConfig) GetStringSlice(key string) []string
func (*GRcpConfig) GetUint ¶
func (g *GRcpConfig) GetUint(key string) uint
func (*GRcpConfig) GetUint32 ¶
func (g *GRcpConfig) GetUint32(key string) uint32
func (*GRcpConfig) GetUint64 ¶
func (g *GRcpConfig) GetUint64(key string) uint64
func (*GRcpConfig) PutConfig ¶ added in v1.1.0
func (g *GRcpConfig) PutConfig(data string) error
PutConfig @Author liangdongpo @Description 设置缓存 @Date 12:33 下午 2021/11/18 @Param @return
Directories ¶
Path | Synopsis |
---|---|
kitex_gen
|
|
grpcConfig/grpcconfig
Code generated by Kitex v0.0.5.
|
Code generated by Kitex v0.0.5. |
Click to show internal directories.
Click to hide internal directories.