wsclient

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 12, 2023 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateSubscriptionArgs

type AggregateSubscriptionArgs struct {
	Id string
	SubscriptionOptions
}

type NFTEventsSubscriptionArgs

type NFTEventsSubscriptionArgs struct {
	Address   string
	NetworkId int
	SubscriptionOptions
}

type PairEventsSubscriptionArgs

type PairEventsSubscriptionArgs struct {
	Id string
	SubscriptionOptions
}

type PriceUpdateSubscriptionArgs

type PriceUpdateSubscriptionArgs struct {
	Address   string
	NetworkId int
	SubscriptionOptions
}

type SubscriptionAuth

type SubscriptionAuth struct {
	Host          string `json:"host"`
	Authorization string `json:"Authorization"`
}

type SubscriptionConfig

type SubscriptionConfig struct {
	Id      string              `json:"id"`
	Payload SubscriptionPayload `json:"payload"`
	Type    string              `json:"type"`
}

type SubscriptionOptions

type SubscriptionOptions struct {
	SubscriptionId string
	Query          string
}

type SubscriptionPayload

type SubscriptionPayload struct {
	Data       string                        `json:"data"`
	Extensions SubscriptionPayloadExtensions `json:"extensions"`
}

type SubscriptionPayloadExtensions

type SubscriptionPayloadExtensions struct {
	Authorization SubscriptionAuth `json:"authorization"`
}

type WSClient

type WSClient struct {
	// contains filtered or unexported fields
}

func New

func New(apiKey string) WSClient

func (*WSClient) Close

func (ws *WSClient) Close() error

func (*WSClient) SubscribeToAggregates

func (ws *WSClient) SubscribeToAggregates(
	args AggregateSubscriptionArgs,
) (*chan *AggregateBatchUpdate, *chan struct{}, error)

func (*WSClient) SubscribeToNFTEvents

func (ws *WSClient) SubscribeToNFTEvents(
	args NFTEventsSubscriptionArgs,
) (*chan *NFTEvent, *chan struct{}, error)

func (*WSClient) SubscribeToPairEvents

func (ws *WSClient) SubscribeToPairEvents(
	args PairEventsSubscriptionArgs,
) (*chan *Event, *chan struct{}, error)

func (*WSClient) SubscribeToPriceUpdates

func (ws *WSClient) SubscribeToPriceUpdates(
	args PriceUpdateSubscriptionArgs,
) (*chan *PriceUpdate, *chan struct{}, error)

type WSMsg

type WSMsg struct {
	Id      string          `json:"id"`
	Type    string          `json:"type"`
	Payload json.RawMessage `json:"payload"`
}

Jump to

Keyboard shortcuts

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