Documentation ¶
Index ¶
- Constants
- type OSStreamWatcher
- func (s *OSStreamWatcher) Connect() error
- func (s *OSStreamWatcher) Disconnect() error
- func (s *OSStreamWatcher) OnItemListed(collectionSlug string, eventHandler func(itemListedEvent any))
- func (s *OSStreamWatcher) OnItemMetadataUpdated(collectionSlug string, eventHandler func(itemMetadataUpdatedEvent any))
- func (s *OSStreamWatcher) OnItemReceivedBid(collectionSlug string, eventHandler func(itemReceivedBidEvent any))
- func (s *OSStreamWatcher) OnItemReceivedOffer(collectionSlug string, eventHandler func(itemReceivedOfferEvent any))
- func (s *OSStreamWatcher) SubscribeToListingsFor(slug string)
- type StreamEventType
Constants ¶
View Source
const StreamAPIEndpoint = "wss://stream.openseabeta.com/socket"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OSStreamWatcher ¶
type OSStreamWatcher struct { QueueListings chan *models.ItemListedEvent // contains filtered or unexported fields }
func NewStreamWatcher ¶
func NewStreamWatcher(token string, onError func(error)) *OSStreamWatcher
func (*OSStreamWatcher) Connect ¶
func (s *OSStreamWatcher) Connect() error
func (*OSStreamWatcher) Disconnect ¶
func (s *OSStreamWatcher) Disconnect() error
func (*OSStreamWatcher) OnItemListed ¶
func (s *OSStreamWatcher) OnItemListed(collectionSlug string, eventHandler func(itemListedEvent any))
func (*OSStreamWatcher) OnItemMetadataUpdated ¶
func (s *OSStreamWatcher) OnItemMetadataUpdated(collectionSlug string, eventHandler func(itemMetadataUpdatedEvent any))
func (*OSStreamWatcher) OnItemReceivedBid ¶
func (s *OSStreamWatcher) OnItemReceivedBid(collectionSlug string, eventHandler func(itemReceivedBidEvent any))
func (*OSStreamWatcher) OnItemReceivedOffer ¶
func (s *OSStreamWatcher) OnItemReceivedOffer(collectionSlug string, eventHandler func(itemReceivedOfferEvent any))
func (*OSStreamWatcher) SubscribeToListingsFor ¶
func (s *OSStreamWatcher) SubscribeToListingsFor(slug string)
type StreamEventType ¶
type StreamEventType string
const ( Listed StreamEventType = "item_listed" ReceivedOffer StreamEventType = "item_received_offer" ReceivedBid StreamEventType = "item_received_bid" MetadataUpdated StreamEventType = "item_metadata_updated" )
Click to show internal directories.
Click to hide internal directories.