pubsub

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Sep 15, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Service

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

func NewService

func NewService(pubsub ports.SecurePubSub) *Service

func (*Service) AddWebhook

func (s *Service) AddWebhook(
	_ context.Context, webhook ports.Webhook,
) (string, error)

func (*Service) AddWebhookWithID

func (s *Service) AddWebhookWithID(
	_ context.Context, webhook ports.Webhook,
) (string, error)

func (*Service) Close

func (s *Service) Close()

func (*Service) ListWebhooks

func (s *Service) ListWebhooks(
	_ context.Context, event ports.WebhookEvent,
) ([]ports.WebhookInfo, error)

func (*Service) PublisAccountDepositEvent

func (s *Service) PublisAccountDepositEvent(
	accountName string, accountBalance map[string]ports.Balance,
	deposit domain.Deposit, market ports.Market,
) error

func (*Service) PublisAccountLowBalanceEvent

func (s *Service) PublisAccountLowBalanceEvent(
	accountName string, accountBalance map[string]ports.Balance,
	market ports.Market,
) error

func (*Service) PublisAccountWithdrawEvent

func (s *Service) PublisAccountWithdrawEvent(
	accountName string, accountBalance map[string]ports.Balance,
	withdrawal domain.Withdrawal, market ports.Market,
) error

func (*Service) PublishTradeSettledEvent

func (s *Service) PublishTradeSettledEvent(
	accountName string, accountBalance map[string]ports.Balance,
	trade domain.Trade,
) error

func (*Service) RemoveWebhook

func (s *Service) RemoveWebhook(_ context.Context, id string) error

func (*Service) SecurePubSub

func (s *Service) SecurePubSub() ports.SecurePubSub

Jump to

Keyboard shortcuts

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