conf

package
v0.0.0-...-83adff0 Latest Latest
Warning

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

Go to latest
Published: Jul 6, 2020 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Conf = &Config{}
)

Conf global variable.

Functions

func Init

func Init() (err error)

Init create config instance.

Types

type Config

type Config struct {
	VipURI string
	// base
	App *bm.App
	// log
	Xlog *log.Config
	// http
	BM *bm.ServerConfig
	// db
	NewMysql *sql.Config
	//old db
	OldMysql *sql.Config
	// http client
	HTTPClient *bm.ClientConfig
	//Property
	Property *Property

	URLConf *URLConf
	//databus group config
	DatabusUtil *databusutil.Config
	//point databus
	Databus *DataSource
	// mc
	Memcache *Memcache
	// redis
	Redis   *Redis
	PayConf *PayConf
	// rpc clients
	RPCClient2 *RPC
	// grpc
	VipClient *warden.ClientConfig
}

Config struct of conf.

type DataSource

type DataSource struct {
	AccLogin      *databus.Config
	OldVipBinLog  *databus.Config
	SalaryCoupon  *databus.Config
	NewVipBinLog  *databus.Config
	AccountNotify *databus.Config
	CouponNotify  *databus.Config
	AutoRenew     *databus.Config
}

DataSource databus config zone.

type Memcache

type Memcache struct {
	*memcache.Config
	Expire xtime.Duration
}

Memcache memcache

type PayConf

type PayConf struct {
	BasicURL       string
	CustomerID     string
	Token          string
	NotifyURL      string
	OrderNotifyURL string
	SignNotifyURL  string
	PlanID         int32
	ProductID      string
	Version        string
}

PayConf pay conf info

type Property

type Property struct {
	UpdateUserInfoCron               string
	AutoRenewCron                    string
	SendMessageCron                  string
	SendBcoinCron                    string
	WillExpireMsgCron                string
	HadExpiredMsgCron                string
	PushDataCron                     string
	EleEompensateCron                string
	HandlerThread                    int
	ReadThread                       int
	Retry                            int
	FrozenExpire                     xtime.Duration
	FrozenDate                       xtime.Duration
	FrozenLimit                      int64
	FrozenCron                       string
	PayMapping                       map[string]string
	MsgURL                           string
	ActivityID                       int64
	AnnualVipBcoinDay                int
	AnnualVipBcoinCouponMoney        int
	PayCoURL                         string
	SalaryDay                        int
	AnnualVipSalaryCount             int
	NormalVipSalaryCount             int
	SalaryVideoCouponnIterval        xtime.Duration
	SalaryVideoCouponCron            string
	MsgOpen                          bool
	BatchSize                        int
	SalaryCouponMaps                 map[string]map[string]int64 // map[coupontype]map[viptype]salarycount
	SalaryCouponTypes                []int8
	SalaryCouponBatchNoMaps          map[string]string // map[coupontype]batchnofmt
	SalaryCouponMsgTitleMaps         map[string]string // map[ coupontype]msgTitle
	SalaryCouponMsgContentMaps       map[string]string // map[coupontype]msgsContent
	SalaryCouponMsgSupplyContentMaps map[string]string // map[coupontype]msgsContent
	SalaryCouponURL                  string
	ActiveStartTime                  string
	SendMedalEndTime                 string
	SendVipbuyEndTime                string
	SummerActiveStartTime            string
	SummerActiveEndTime              string
	SendCodeStartTime                string
	SendCodeEndTime                  string
	CouponIDs                        []string
	MedalID                          int64
	CodeExchangeMap                  map[string][]int64
	CodeExchangeTimeMap              map[string]int
	CodeExchangePicMap               map[string]string
	VipbuyExchangeNameMap            map[string]string
	GrayScope                        int64
	PushToken                        string
	BusinessID                       int64
	SplitPush                        int
	UpdateDB                         bool
	NotGrantLimit                    int
}

Property config for biz logic.

type RPC

type RPC struct {
	Coupon *rpc.ClientConfig
}

RPC rpc clients.

type Redis

type Redis struct {
	*redis.Config
	Expire xtime.Duration
}

Redis redis

type URLConf

type URLConf struct {
	PayCoURL    string
	PayURL      string
	MsgURL      string
	MallURL     string
	AccountURL  string
	APICoURL    string
	OldVipCoURL string
}

URLConf url conf

Jump to

Keyboard shortcuts

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