config

package
v0.0.0-...-f17293a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 21, 2022 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_config_proto protoreflect.FileDescriptor

Functions

func GetBool

func GetBool(key string) bool

func GetConf

func GetConf(key string, conf interface{}) error

func GetConfig

func GetConfig() *viper.Viper

func GetEnv

func GetEnv(key, defaultValue string) string

func GetFloat64

func GetFloat64(key string) float64

func GetInt

func GetInt(key string) int

func GetInt32

func GetInt32(key string) int32

func GetInt64

func GetInt64(key string) int64

func GetMap

func GetMap(key string) map[string]interface{}

func GetNormal

func GetNormal(key string) interface{}

func GetString

func GetString(key string) string

func GetStringDefault

func GetStringDefault(key string, d string) string

func GetStringSlice

func GetStringSlice(key string) []string

func GetStruct

func GetStruct(key string, obj interface{})

func SetDefault

func SetDefault(key string, value interface{})

Types

type LoggingConfig

type LoggingConfig struct {
	Level string `protobuf:"bytes,1,opt,name=level,proto3" json:"level,omitempty"`
	// contains filtered or unexported fields
}

func (*LoggingConfig) Descriptor deprecated

func (*LoggingConfig) Descriptor() ([]byte, []int)

Deprecated: Use LoggingConfig.ProtoReflect.Descriptor instead.

func (*LoggingConfig) GetLevel

func (x *LoggingConfig) GetLevel() string

func (*LoggingConfig) ProtoMessage

func (*LoggingConfig) ProtoMessage()

func (*LoggingConfig) ProtoReflect

func (x *LoggingConfig) ProtoReflect() protoreflect.Message

func (*LoggingConfig) Reset

func (x *LoggingConfig) Reset()

func (*LoggingConfig) String

func (x *LoggingConfig) String() string

type MQ

type MQ struct {
	Driver string `protobuf:"bytes,1,opt,name=driver,proto3" json:"driver,omitempty"`
	// contains filtered or unexported fields
}

func (*MQ) Descriptor deprecated

func (*MQ) Descriptor() ([]byte, []int)

Deprecated: Use MQ.ProtoReflect.Descriptor instead.

func (*MQ) GetDriver

func (x *MQ) GetDriver() string

func (*MQ) ProtoMessage

func (*MQ) ProtoMessage()

func (*MQ) ProtoReflect

func (x *MQ) ProtoReflect() protoreflect.Message

func (*MQ) Reset

func (x *MQ) Reset()

func (*MQ) String

func (x *MQ) String() string

type MQ_NsqMQ

type MQ_NsqMQ struct {
	Regions string `protobuf:"bytes,1,opt,name=regions,proto3" json:"regions,omitempty"`
	// contains filtered or unexported fields
}

func (*MQ_NsqMQ) Descriptor deprecated

func (*MQ_NsqMQ) Descriptor() ([]byte, []int)

Deprecated: Use MQ_NsqMQ.ProtoReflect.Descriptor instead.

func (*MQ_NsqMQ) GetRegions

func (x *MQ_NsqMQ) GetRegions() string

func (*MQ_NsqMQ) ProtoMessage

func (*MQ_NsqMQ) ProtoMessage()

func (*MQ_NsqMQ) ProtoReflect

func (x *MQ_NsqMQ) ProtoReflect() protoreflect.Message

func (*MQ_NsqMQ) Reset

func (x *MQ_NsqMQ) Reset()

func (*MQ_NsqMQ) String

func (x *MQ_NsqMQ) String() string

type MQ_NsqMQ_Node

type MQ_NsqMQ_Node struct {
	Addr    string `protobuf:"bytes,1,opt,name=addr,proto3" json:"addr,omitempty"`
	Lookupd string `protobuf:"bytes,2,opt,name=lookupd,proto3" json:"lookupd,omitempty"`
	// contains filtered or unexported fields
}

func (*MQ_NsqMQ_Node) Descriptor deprecated

func (*MQ_NsqMQ_Node) Descriptor() ([]byte, []int)

Deprecated: Use MQ_NsqMQ_Node.ProtoReflect.Descriptor instead.

func (*MQ_NsqMQ_Node) GetAddr

func (x *MQ_NsqMQ_Node) GetAddr() string

func (*MQ_NsqMQ_Node) GetLookupd

func (x *MQ_NsqMQ_Node) GetLookupd() string

func (*MQ_NsqMQ_Node) ProtoMessage

func (*MQ_NsqMQ_Node) ProtoMessage()

func (*MQ_NsqMQ_Node) ProtoReflect

func (x *MQ_NsqMQ_Node) ProtoReflect() protoreflect.Message

func (*MQ_NsqMQ_Node) Reset

func (x *MQ_NsqMQ_Node) Reset()

func (*MQ_NsqMQ_Node) String

func (x *MQ_NsqMQ_Node) String() string

type MysqlConfig

type MysqlConfig struct {
	Host     string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port     string `protobuf:"bytes,2,opt,name=port,proto3" json:"port,omitempty"`
	Database string `protobuf:"bytes,3,opt,name=database,proto3" json:"database,omitempty"`
	User     string `protobuf:"bytes,4,opt,name=user,proto3" json:"user,omitempty"`
	Password string `protobuf:"bytes,5,opt,name=password,proto3" json:"password,omitempty"`
	// contains filtered or unexported fields
}

func (*MysqlConfig) Descriptor deprecated

func (*MysqlConfig) Descriptor() ([]byte, []int)

Deprecated: Use MysqlConfig.ProtoReflect.Descriptor instead.

func (*MysqlConfig) GetDatabase

func (x *MysqlConfig) GetDatabase() string

func (*MysqlConfig) GetHost

func (x *MysqlConfig) GetHost() string

func (*MysqlConfig) GetPassword

func (x *MysqlConfig) GetPassword() string

func (*MysqlConfig) GetPort

func (x *MysqlConfig) GetPort() string

func (*MysqlConfig) GetUser

func (x *MysqlConfig) GetUser() string

func (*MysqlConfig) ProtoMessage

func (*MysqlConfig) ProtoMessage()

func (*MysqlConfig) ProtoReflect

func (x *MysqlConfig) ProtoReflect() protoreflect.Message

func (*MysqlConfig) Reset

func (x *MysqlConfig) Reset()

func (*MysqlConfig) String

func (x *MysqlConfig) String() string

type NotificationConfig

type NotificationConfig struct {
	Token  string `protobuf:"bytes,1,opt,name=token,proto3" json:"token,omitempty"`
	Server string `protobuf:"bytes,2,opt,name=server,proto3" json:"server,omitempty"`
	// contains filtered or unexported fields
}

func (*NotificationConfig) Descriptor deprecated

func (*NotificationConfig) Descriptor() ([]byte, []int)

Deprecated: Use NotificationConfig.ProtoReflect.Descriptor instead.

func (*NotificationConfig) GetServer

func (x *NotificationConfig) GetServer() string

func (*NotificationConfig) GetToken

func (x *NotificationConfig) GetToken() string

func (*NotificationConfig) ProtoMessage

func (*NotificationConfig) ProtoMessage()

func (*NotificationConfig) ProtoReflect

func (x *NotificationConfig) ProtoReflect() protoreflect.Message

func (*NotificationConfig) Reset

func (x *NotificationConfig) Reset()

func (*NotificationConfig) String

func (x *NotificationConfig) String() string

type OssConfig

type OssConfig struct {
	Endpoint            string `protobuf:"bytes,1,opt,name=endpoint,proto3" json:"endpoint,omitempty"`
	EndpointInternal    string `protobuf:"bytes,2,opt,name=endpoint_internal,proto3" json:"endpoint_internal,omitempty"`
	EndpointInternalVpc string `protobuf:"bytes,3,opt,name=endpoint_vpc,proto3" json:"endpoint_internal_vpc,omitempty"`
	// 直连的配置
	AccessKeyId     string `protobuf:"bytes,4,opt,name=access_key_id,proto3" json:"access_key_id,omitempty"`
	AccessKeySecret string `protobuf:"bytes,6,opt,name=access_key_secret,proto3" json:"access_key_secret,omitempty"`
	// sts 临时配置
	TmpAccessKeyId     string `protobuf:"bytes,5,opt,name=tmp_access_key_id,proto3" json:"tmp_access_key_id,omitempty"`
	TmpAccessKeySecret string `protobuf:"bytes,7,opt,name=tmp_access_key_secret,proto3" json:"tmp_access_key_secret,omitempty"`
	TmpSecurityToken   string `protobuf:"bytes,11,opt,name=tmp_security_token,proto3" json:"tmp_security_token,omitempty"`
	Region             string `protobuf:"bytes,12,opt,name=region,proto3" json:"region,omitempty"`
	Bucket             string `protobuf:"bytes,8,opt,name=bucket,proto3" json:"bucket,omitempty"`
	Arn                string `protobuf:"bytes,9,opt,name=arn,proto3" json:"arn,omitempty"`
	SessionName        string `protobuf:"bytes,10,opt,name=session_name,proto3" json:"session_name,omitempty"`
	Expiration         string `protobuf:"bytes,14,opt,name=expiration,proto3" json:"expiration,omitempty"`
	Ttl                int32  `protobuf:"varint,15,opt,name=ttl,proto3" json:"ttl,omitempty"`
	// contains filtered or unexported fields
}

func (*OssConfig) Descriptor deprecated

func (*OssConfig) Descriptor() ([]byte, []int)

Deprecated: Use OssConfig.ProtoReflect.Descriptor instead.

func (*OssConfig) GetAccessKeyId

func (x *OssConfig) GetAccessKeyId() string

func (*OssConfig) GetAccessKeySecret

func (x *OssConfig) GetAccessKeySecret() string

func (*OssConfig) GetArn

func (x *OssConfig) GetArn() string

func (*OssConfig) GetBucket

func (x *OssConfig) GetBucket() string

func (*OssConfig) GetEndpoint

func (x *OssConfig) GetEndpoint() string

func (*OssConfig) GetEndpointInternal

func (x *OssConfig) GetEndpointInternal() string

func (*OssConfig) GetEndpointInternalVpc

func (x *OssConfig) GetEndpointInternalVpc() string

func (*OssConfig) GetExpiration

func (x *OssConfig) GetExpiration() string

func (*OssConfig) GetRegion

func (x *OssConfig) GetRegion() string

func (*OssConfig) GetSessionName

func (x *OssConfig) GetSessionName() string

func (*OssConfig) GetTmpAccessKeyId

func (x *OssConfig) GetTmpAccessKeyId() string

func (*OssConfig) GetTmpAccessKeySecret

func (x *OssConfig) GetTmpAccessKeySecret() string

func (*OssConfig) GetTmpSecurityToken

func (x *OssConfig) GetTmpSecurityToken() string

func (*OssConfig) GetTtl

func (x *OssConfig) GetTtl() int32

func (*OssConfig) ProtoMessage

func (*OssConfig) ProtoMessage()

func (*OssConfig) ProtoReflect

func (x *OssConfig) ProtoReflect() protoreflect.Message

func (*OssConfig) Reset

func (x *OssConfig) Reset()

func (*OssConfig) String

func (x *OssConfig) String() string

type PublicConfig

type PublicConfig struct {
	AccessControlAllowOrigin string `protobuf:"bytes,1,opt,name=access_control_allow_origin,proto3" json:"access_control_allow_origin,omitempty"`
	Timezone                 string `protobuf:"bytes,2,opt,name=timezone,proto3" json:"timezone,omitempty"`
	PidFile                  string `protobuf:"bytes,3,opt,name=pid_file,proto3" json:"pid_file,omitempty"`
	AppEnv                   string `protobuf:"bytes,4,opt,name=app_env,proto3" json:"app_env,omitempty"`
	AppName                  string `protobuf:"bytes,5,opt,name=app_name,proto3" json:"app_name,omitempty"`
	AppDebug                 string `protobuf:"bytes,6,opt,name=app_debug,proto3" json:"app_debug,omitempty"`
	AppKey                   string `protobuf:"bytes,7,opt,name=app_key,proto3" json:"app_key,omitempty"`
	AppPublicKey             string `protobuf:"bytes,8,opt,name=app_public_key,proto3" json:"app_public_key,omitempty"`
	AppPrivateKey            string `protobuf:"bytes,9,opt,name=app_private_key,proto3" json:"app_private_key,omitempty"`
	AppRootCert              string `protobuf:"bytes,10,opt,name=app_root_cert,proto3" json:"app_root_cert,omitempty"`
	SystemAes                string `protobuf:"bytes,11,opt,name=system_aes,proto3" json:"system_aes,omitempty"`
	CachePrefix              string `protobuf:"bytes,12,opt,name=cache_prefix,proto3" json:"cache_prefix,omitempty"`
	Domain                   string `protobuf:"bytes,13,opt,name=domain,proto3" json:"domain,omitempty"`
	// contains filtered or unexported fields
}

func (*PublicConfig) Descriptor deprecated

func (*PublicConfig) Descriptor() ([]byte, []int)

Deprecated: Use PublicConfig.ProtoReflect.Descriptor instead.

func (*PublicConfig) GetAccessControlAllowOrigin

func (x *PublicConfig) GetAccessControlAllowOrigin() string

func (*PublicConfig) GetAppDebug

func (x *PublicConfig) GetAppDebug() string

func (*PublicConfig) GetAppEnv

func (x *PublicConfig) GetAppEnv() string

func (*PublicConfig) GetAppKey

func (x *PublicConfig) GetAppKey() string

func (*PublicConfig) GetAppName

func (x *PublicConfig) GetAppName() string

func (*PublicConfig) GetAppPrivateKey

func (x *PublicConfig) GetAppPrivateKey() string

func (*PublicConfig) GetAppPublicKey

func (x *PublicConfig) GetAppPublicKey() string

func (*PublicConfig) GetAppRootCert

func (x *PublicConfig) GetAppRootCert() string

func (*PublicConfig) GetCachePrefix

func (x *PublicConfig) GetCachePrefix() string

func (*PublicConfig) GetDomain

func (x *PublicConfig) GetDomain() string

func (*PublicConfig) GetPidFile

func (x *PublicConfig) GetPidFile() string

func (*PublicConfig) GetSystemAes

func (x *PublicConfig) GetSystemAes() string

func (*PublicConfig) GetTimezone

func (x *PublicConfig) GetTimezone() string

func (*PublicConfig) ProtoMessage

func (*PublicConfig) ProtoMessage()

func (*PublicConfig) ProtoReflect

func (x *PublicConfig) ProtoReflect() protoreflect.Message

func (*PublicConfig) Reset

func (x *PublicConfig) Reset()

func (*PublicConfig) String

func (x *PublicConfig) String() string

type RedisConfig

type RedisConfig struct {
	Host     string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	Port     int32  `protobuf:"varint,2,opt,name=port,proto3" json:"port,omitempty"`
	Database string `protobuf:"bytes,3,opt,name=database,proto3" json:"database,omitempty"`
	// contains filtered or unexported fields
}

func (*RedisConfig) Descriptor deprecated

func (*RedisConfig) Descriptor() ([]byte, []int)

Deprecated: Use RedisConfig.ProtoReflect.Descriptor instead.

func (*RedisConfig) GetDatabase

func (x *RedisConfig) GetDatabase() string

func (*RedisConfig) GetHost

func (x *RedisConfig) GetHost() string

func (*RedisConfig) GetPort

func (x *RedisConfig) GetPort() int32

func (*RedisConfig) ProtoMessage

func (*RedisConfig) ProtoMessage()

func (*RedisConfig) ProtoReflect

func (x *RedisConfig) ProtoReflect() protoreflect.Message

func (*RedisConfig) Reset

func (x *RedisConfig) Reset()

func (*RedisConfig) String

func (x *RedisConfig) String() string

type ServerConfig

type ServerConfig struct {
	Address string `protobuf:"bytes,1,opt,name=address,json=host,proto3" json:"address,omitempty"`
	Timeout int32  `protobuf:"varint,2,opt,name=timeout,json=port,proto3" json:"timeout,omitempty"`
	// contains filtered or unexported fields
}

func (*ServerConfig) Descriptor deprecated

func (*ServerConfig) Descriptor() ([]byte, []int)

Deprecated: Use ServerConfig.ProtoReflect.Descriptor instead.

func (*ServerConfig) GetAddress

func (x *ServerConfig) GetAddress() string

func (*ServerConfig) GetTimeout

func (x *ServerConfig) GetTimeout() int32

func (*ServerConfig) ProtoMessage

func (*ServerConfig) ProtoMessage()

func (*ServerConfig) ProtoReflect

func (x *ServerConfig) ProtoReflect() protoreflect.Message

func (*ServerConfig) Reset

func (x *ServerConfig) Reset()

func (*ServerConfig) String

func (x *ServerConfig) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL