Documentation
¶
Index ¶
- func RegisterModel(config Config)
- type AppIdAndChannelConfigMap
- type AppIdAndChannelConfigs
- type AppIdChannelConfig
- type BaseConfig
- type ChannelServiceConfig
- type ChannelServiceConfigMap
- type Config
- type ConfigType
- type MerchantConfig
- type MerchantConfigMap
- type NoticeConfig
- type PayConfig
- type PersonalMerchant
- type PersonalMerchantConfigMap
- type ServiceConfig
- type ServiceConfigMap
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RegisterModel ¶
func RegisterModel(config Config)
Types ¶
type AppIdAndChannelConfigMap ¶
type AppIdAndChannelConfigMap map[string]AppIdAndChannelConfigs
################## appid ##################
func (*AppIdAndChannelConfigMap) ConfigType ¶
func (g *AppIdAndChannelConfigMap) ConfigType() ConfigType
func (*AppIdAndChannelConfigMap) DirName ¶
func (g *AppIdAndChannelConfigMap) DirName() string
type AppIdAndChannelConfigs ¶
type AppIdAndChannelConfigs struct { AppId string `json:"app_id"` ChannelConfigs []AppIdChannelConfig `json:"channel_configs"` }
type AppIdChannelConfig ¶
type BaseConfig ¶
type BaseConfig struct {
// contains filtered or unexported fields
}
func (*BaseConfig) BaseDir ¶
func (b *BaseConfig) BaseDir() string
func (*BaseConfig) FullPath ¶
func (b *BaseConfig) FullPath() string
func (*BaseConfig) Key ¶
func (b *BaseConfig) Key() string
type ChannelServiceConfig ¶
type ChannelServiceConfig struct { BaseConfig ChannelId string `json:"channel_id"` ServiceName string `json:"service_name"` Host string `json:"host"` Port int `json:"port"` }
type ChannelServiceConfigMap ¶
type ChannelServiceConfigMap map[string]ChannelServiceConfig
################## channel ##################
func (*ChannelServiceConfigMap) ConfigType ¶
func (g *ChannelServiceConfigMap) ConfigType() ConfigType
func (*ChannelServiceConfigMap) DirName ¶
func (g *ChannelServiceConfigMap) DirName() string
type Config ¶
type Config interface { DirName() string ConfigType() ConfigType }
type ConfigType ¶
type ConfigType string
var ( // 数组的形式,存储为key/model的形式,即:如果在key目录下新增对象,则会解析成map, MAP ConfigType = "MAP" // 对象的形式,会将设置反序列化为对象 MODEL ConfigType = "MODEL" )
type MerchantConfig ¶
type MerchantConfigMap ¶
type MerchantConfigMap map[string]MerchantConfig
func (*MerchantConfigMap) ConfigType ¶
func (g *MerchantConfigMap) ConfigType() ConfigType
func (*MerchantConfigMap) DirName ¶
func (g *MerchantConfigMap) DirName() string
type NoticeConfig ¶
type NoticeConfig struct { NoticeIntervalSecond int `json:"notice_interval_second"` // 通知间隔 // // 例如: [30, 30, 120, 240, 480, 1200, 3600, 7200, 43200, 86400, 172800] // 表示如果通知失败,则会隔 30s, 30s, 2min, 4min, 8min, 20min, 1H, 2H, 12H, 24H, 48H 通知 NoticeDelaySecondExpressions []int `json:"notice_expressions"` }
################## notice ##################
func (*NoticeConfig) ConfigType ¶
func (g *NoticeConfig) ConfigType() ConfigType
func (*NoticeConfig) DirName ¶
func (g *NoticeConfig) DirName() string
type PayConfig ¶
type PayConfig struct { ClusterId *string `json:"cluster_id"` Concurrency int `json:"concurrency"` // 通知地址的正则,必须包含{gateway_order_id} NotifyUrlPattern string `json:"notify_url_pattern"` // 跳转地址的正则,必须包含{gateway_order_id} ReturnUrlPattern string `json:"return_url_pattern"` }
func (*PayConfig) ConfigType ¶
func (g *PayConfig) ConfigType() ConfigType
type PersonalMerchant ¶
type PersonalMerchantConfigMap ¶
type PersonalMerchantConfigMap map[string]PersonalMerchant
################## personal merchant ##################
func (*PersonalMerchantConfigMap) ConfigType ¶
func (g *PersonalMerchantConfigMap) ConfigType() ConfigType
func (*PersonalMerchantConfigMap) DirName ¶
func (g *PersonalMerchantConfigMap) DirName() string
type ServiceConfig ¶
type ServiceConfigMap ¶
type ServiceConfigMap map[string]ServiceConfig
################## service ##################
func (*ServiceConfigMap) ConfigType ¶
func (g *ServiceConfigMap) ConfigType() ConfigType
func (*ServiceConfigMap) DirName ¶
func (g *ServiceConfigMap) DirName() string
Click to show internal directories.
Click to hide internal directories.