Documentation ¶
Index ¶
- type BitgetBaseWsClient
- func (p *BitgetBaseWsClient) CheckSum(jsonMap map[string]interface{}) bool
- func (p *BitgetBaseWsClient) Connect()
- func (p *BitgetBaseWsClient) ConnectWebSocket() error
- func (p *BitgetBaseWsClient) DisconnectWebSocket() error
- func (p *BitgetBaseWsClient) ExecuterPing()
- func (p *BitgetBaseWsClient) GetListener(argJson interface{}) model.OnReceive
- func (p *BitgetBaseWsClient) Init() *BitgetBaseWsClient
- func (p *BitgetBaseWsClient) Login() error
- func (p *BitgetBaseWsClient) ReadLoop(ctx context.Context)
- func (p *BitgetBaseWsClient) Send(data string) error
- func (p *BitgetBaseWsClient) SendByType(req model.WsBaseReq) error
- func (p *BitgetBaseWsClient) SetListener(msgListener model.OnReceive, errorListener model.OnError)
- func (p *BitgetBaseWsClient) StartReadLoop(ctx context.Context)
- type BitgetRestClient
- func (p *BitgetRestClient) DoGet(ctx context.Context, uri string, params map[string]string) (string, error)
- func (p *BitgetRestClient) DoPost(ctx context.Context, uri string, params string) (string, error)
- func (p *BitgetRestClient) Init() *BitgetRestClient
- func (p *BitgetRestClient) InitSigner(secretKey string)
- func (p *BitgetRestClient) InitWithCreds(creds *config.ApiCreds) *BitgetRestClient
- type Signer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BitgetBaseWsClient ¶
type BitgetBaseWsClient struct { WsUrl string NeedLogin bool Connection bool LoginStatus bool Listener model.OnReceive ErrorListener model.OnError Ticker *time.Ticker SendMutex *sync.Mutex WebSocketClient *websocket.Conn LastReceivedTime time.Time AllSuribe *model.Set Signer *Signer ScribeMapS *model.Subs BooksMap map[model.SubscribeReq]model.BookInfo }
func (*BitgetBaseWsClient) CheckSum ¶
func (p *BitgetBaseWsClient) CheckSum(jsonMap map[string]interface{}) bool
CheckSum хз че за метод, но связан с books. Пока-что всегда возвращает true
func (*BitgetBaseWsClient) Connect ¶
func (p *BitgetBaseWsClient) Connect()
func (*BitgetBaseWsClient) ConnectWebSocket ¶
func (p *BitgetBaseWsClient) ConnectWebSocket() error
ConnectWebSocket Подключение к websocket серверу
func (*BitgetBaseWsClient) DisconnectWebSocket ¶
func (p *BitgetBaseWsClient) DisconnectWebSocket() error
func (*BitgetBaseWsClient) ExecuterPing ¶
func (p *BitgetBaseWsClient) ExecuterPing()
func (*BitgetBaseWsClient) GetListener ¶
func (p *BitgetBaseWsClient) GetListener(argJson interface{}) model.OnReceive
func (*BitgetBaseWsClient) Init ¶
func (p *BitgetBaseWsClient) Init() *BitgetBaseWsClient
func (*BitgetBaseWsClient) Login ¶
func (p *BitgetBaseWsClient) Login() error
func (*BitgetBaseWsClient) ReadLoop ¶
func (p *BitgetBaseWsClient) ReadLoop(ctx context.Context)
ReadLoop вычитка сообщений из websocket канала Тут происходит вся магия с резолвом обработчика
func (*BitgetBaseWsClient) Send ¶
func (p *BitgetBaseWsClient) Send(data string) error
func (*BitgetBaseWsClient) SendByType ¶
func (p *BitgetBaseWsClient) SendByType(req model.WsBaseReq) error
func (*BitgetBaseWsClient) SetListener ¶
func (p *BitgetBaseWsClient) SetListener(msgListener model.OnReceive, errorListener model.OnError)
func (*BitgetBaseWsClient) StartReadLoop ¶
func (p *BitgetBaseWsClient) StartReadLoop(ctx context.Context)
type BitgetRestClient ¶
type BitgetRestClient struct { ApiKey string ApiSecretKey string Passphrase string BaseUrl string HttpClient *http.Client Signer *Signer SyncTimeDeltaMilliSeconds int64 }
func (*BitgetRestClient) Init ¶
func (p *BitgetRestClient) Init() *BitgetRestClient
func (*BitgetRestClient) InitSigner ¶ added in v0.0.8
func (p *BitgetRestClient) InitSigner(secretKey string)
func (*BitgetRestClient) InitWithCreds ¶
func (p *BitgetRestClient) InitWithCreds(creds *config.ApiCreds) *BitgetRestClient
Click to show internal directories.
Click to hide internal directories.