Documentation ¶
Index ¶
- Constants
- func AppConfig(bootstrap *configpb.Bootstrap) *configpb.App
- func ClusterServiceApis(bootstrap *configpb.Bootstrap) []*configpb.ClusterServiceApi
- func ConsulConfig(bootstrap *configpb.Bootstrap) *configpb.Consul
- func CurrentPath() string
- func EtcdConfig(bootstrap *configpb.Bootstrap) *configpb.Etcd
- func GRPCConfig(bootstrap *configpb.Bootstrap) *configpb.Server_GRPC
- func HTTPConfig(bootstrap *configpb.Bootstrap) *configpb.Server_HTTP
- func JaegerConfig(bootstrap *configpb.Bootstrap) *configpb.Jaeger
- func Loading(filePath string, loadingOpts ...Option) (*configpb.Bootstrap, error)
- func LoadingConfigFromConsul(consulClient *consulapi.Client, appConfig *configpb.App, loadingOpts ...Option) (*configpb.Bootstrap, error)
- func LoadingFile(filePath string, loadingOpts ...Option) (*configpb.Bootstrap, error)
- func LogConfig(bootstrap *configpb.Bootstrap) *configpb.Log
- func LogConsoleConfig(bootstrap *configpb.Bootstrap) *configpb.Log_Console
- func LogFileConfig(bootstrap *configpb.Bootstrap) *configpb.Log_File
- func MergeConfig(first, second proto.Message)
- func MongoConfig(bootstrap *configpb.Bootstrap) *configpb.Mongo
- func MysqlConfig(bootstrap *configpb.Bootstrap) *configpb.MySQL
- func PostgresConfig(bootstrap *configpb.Bootstrap) *configpb.PSQL
- func RabbitmqConfig(bootstrap *configpb.Bootstrap) *configpb.Rabbitmq
- func RedisConfig(bootstrap *configpb.Bootstrap) *configpb.Redis
- func ServiceEncryptConfig(bootstrap *configpb.Bootstrap) *configpb.Encrypt_ServiceEncrypt
- func SettingCaptchaConfig(bootstrap *configpb.Bootstrap) *configpb.Setting_Captcha
- func SettingConfig(bootstrap *configpb.Bootstrap) *configpb.Setting
- func SettingLoginConfig(bootstrap *configpb.Bootstrap) *configpb.Setting_Login
- func SnowflakeConfig(bootstrap *configpb.Bootstrap) *configpb.Snowflake
- func ThirdPartyApis(bootstrap *configpb.Bootstrap) []*configpb.ThirdPartyApi
- func ToConsulConfig(cfg *configpb.Consul) *consulpkg.Config
- func TokenEncryptConfig(bootstrap *configpb.Bootstrap) *configpb.Encrypt_TokenEncrypt
- func TransferEncryptConfig(bootstrap *configpb.Bootstrap) *configpb.Encrypt_TransferEncrypt
- func Watch(filePaths ...string) error
- type Option
Constants ¶
View Source
const ( CONFIG_METHOD_LOCAL = "local" CONFIG_METHOD_CONSUL = "consul" )
Variables ¶
This section is empty.
Functions ¶
func ClusterServiceApis ¶ added in v0.0.10
func ClusterServiceApis(bootstrap *configpb.Bootstrap) []*configpb.ClusterServiceApi
func CurrentPath ¶
func CurrentPath() string
func GRPCConfig ¶
func GRPCConfig(bootstrap *configpb.Bootstrap) *configpb.Server_GRPC
func HTTPConfig ¶
func HTTPConfig(bootstrap *configpb.Bootstrap) *configpb.Server_HTTP
func LoadingConfigFromConsul ¶
func LoadingConfigFromConsul(consulClient *consulapi.Client, appConfig *configpb.App, loadingOpts ...Option) (*configpb.Bootstrap, error)
LoadingConfigFromConsul 从consul中加载配置 首先:读取服务base配置 然后:读取本服务配置 最后:使用本服务配置 覆盖 base 配置
func LoadingFile ¶
func LogConsoleConfig ¶
func LogConsoleConfig(bootstrap *configpb.Bootstrap) *configpb.Log_Console
func MergeConfig ¶
MergeConfig 合并配置;后面的覆盖前面的 Merge merges src into dst, which must be a message with the same descriptor.
func ServiceEncryptConfig ¶
func ServiceEncryptConfig(bootstrap *configpb.Bootstrap) *configpb.Encrypt_ServiceEncrypt
func SettingCaptchaConfig ¶
func SettingCaptchaConfig(bootstrap *configpb.Bootstrap) *configpb.Setting_Captcha
func SettingLoginConfig ¶
func SettingLoginConfig(bootstrap *configpb.Bootstrap) *configpb.Setting_Login
func ThirdPartyApis ¶
func ThirdPartyApis(bootstrap *configpb.Bootstrap) []*configpb.ThirdPartyApi
func ToConsulConfig ¶
ToConsulConfig ...
func TokenEncryptConfig ¶
func TokenEncryptConfig(bootstrap *configpb.Bootstrap) *configpb.Encrypt_TokenEncrypt
func TransferEncryptConfig ¶
func TransferEncryptConfig(bootstrap *configpb.Bootstrap) *configpb.Encrypt_TransferEncrypt
Types ¶
Click to show internal directories.
Click to hide internal directories.