models

package
v0.0.0-...-eef5595 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2018 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	SyncMapSumNetworkIn *sync.Map         //统计流量
	SumNetworkInLock    = new(sync.Mutex) //流量统计锁

	Conf    Config
	WsMutex sync.Mutex
	WsConn  = make(map[websocket.Connection]bool)
)
View Source
var (
	Engine *xorm.Engine
)
View Source
var SyncMapMql5 *sync.Map

Functions

func ReadFile

func ReadFile(path string) *[]byte

func YamlInit

func YamlInit()

Types

type AliyunAccounts

type AliyunAccounts struct {
	Uuid    uuid.UUID `xorm:"pk uuid DEFAULT uuid_generate_v4()"`
	AliUid  string    `xorm:"varchar(16)"`
	Mobile  string    `formam:"bigint"`
	Created time.Time `xorm:"created"`
}

type ApiServices

type ApiServices struct {
	Account    string    `xorm:"account"`     //用户的uuid
	OrderBizId string    `xorm:"varchar(16)"` //用户购买后生产的业务实例ID
	OrderId    string    `xorm:"varchar(16)"` //订单ID
	SkuId      string    `xorm:"varchar(16)"` //针对商品的某个版本分配的ID
	HasReq     int64     `xorm:"bigint"`      //剩余次数
	Bill       int32     `xorm:"smallint"`    //计费方式:1,请求次数 2,流量下发
	Created    time.Time `xorm:"created"`     //服务购买时间
	ExpiredOn  time.Time `xorm:"expired_on"`  //失效日期
	IsDelete   bool      `xorm:"is_delete"`   //是否删除
}

type Config

type Config struct {
	Config struct {
		DriverName     string `yaml:"driverName"`
		DataSourceName string `yaml:"dataSourceName"`
	}
	Mq struct {
		Uri string `yaml:"uri"`
	}
	Push struct {
		Enable    bool     `yaml:"enable"`
		Server    string   `yaml:"server"`
		ApiServer []string `yaml:"apiServer"`
	}
	Aliyun struct {
		KeyId      string `yaml:"keyId"`
		KeySecret  string `yaml:"keySecret"`
		ServiceKey string `yaml:"serviceKey"`
	}
}

type CreateInstance

type CreateInstance struct {
	AliUid          string `formam:"aliUid"` //用户唯一标识
	AccountQuantity int    `formam:"accountQuantity"`
	Mobile          string `formam:"mobile"`
	OrderBizId      string `formam:"orderBizId"` //云市场业务 ID, 用作instanceId
	OrderId         string `formam:"orderId"`    //云市场订单 ID
	SkuId           string `formam:"skuId"`      //商品规格标识,与商品唯一对应,可在商品管理的销售信息中查看
	Token           string `formam:"token"`
	Action          string `formam:"action"`
}

type Mql5

type Mql5 struct {
	//Type     string `json:"type"`
	Title    string  `json:"title"`
	Symbol   string  `json:"symbol"`
	Bid      float64 `json:"bid"`
	Ask      float64 `json:"ask"`
	UnixNano int64   `json:"unixnano"`
	TimeStr  string  `json:"timestr"`
}

type RenewInstance

type RenewInstance struct {
	InstanceId string    `formam:"instanceId"` //用户唯一标识
	ExpiredOn  time.Time `formam:"expiredOn"`  //失效日期 ( yyyy - MM - dd HH:mm:ss )
	Token      string    `formam:"token"`
	Action     string    `formam:"action"`
}

type Result

type Result struct {
	Code    int         `json:"code"`
	Message string      `json:"message"`
	Data    interface{} `json:"data"`
}

Jump to

Keyboard shortcuts

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