Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ParamError = errcode.CreateCoinBaseError( paramErrorCode, "request param error:%s") ReqError = errcode.CreateCoinBaseError(requestErrorCode, "%s") )
Functions ¶
func ResponseError ¶
func ResponseError( ctx *gin.Context, httpCode int, err *errcode.CoinBaseError, model interface{})
Types ¶
type Client ¶
type Client struct { ID string Socket *websocket.Conn Receive chan *Message Send chan *api.MsgData SendMsg chan []byte // contains filtered or unexported fields }
func (*Client) UpdateExchange ¶
func (*Client) UpdateMsgType ¶
func (*Client) UpdateSymbol ¶
type ClientManager ¶
type ClientManager struct { Broadcast chan *api.MsgData PartialMsg chan string // contains filtered or unexported fields }
func NewClientManager ¶
func NewClientManager(ctx context.Context) *ClientManager
func (*ClientManager) Start ¶
func (manager *ClientManager) Start()
func (*ClientManager) Stop ¶
func (manager *ClientManager) Stop()
type CoinCorpServer ¶
type CoinCorpServer struct { Upgrader *websocket.Upgrader ClientManager *ClientManager // contains filtered or unexported fields }
func CreateCoinCorpServer ¶
func CreateCoinCorpServer( ctx context.Context, cfg *baseconfig.HTTPConfig, msgManagerMap map[string]*msgmanager.MessageManager, exchanges map[string]api.ExchangeAPI) *CoinCorpServer
func (*CoinCorpServer) ApiHandler ¶
func (server *CoinCorpServer) ApiHandler(ctx *gin.Context)
func (*CoinCorpServer) EditLeverage ¶
func (server *CoinCorpServer) EditLeverage(ctx *gin.Context)
func (*CoinCorpServer) Shutdown ¶
func (server *CoinCorpServer) Shutdown()
func (*CoinCorpServer) Start ¶
func (server *CoinCorpServer) Start()
func (*CoinCorpServer) Stop ¶
func (server *CoinCorpServer) Stop()
func (*CoinCorpServer) TradeOrder ¶
func (server *CoinCorpServer) TradeOrder(ctx *gin.Context)
type LeverageModel ¶
Click to show internal directories.
Click to hide internal directories.