watchlist

package
v0.0.0-...-67c89e5 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AssetDetails

type AssetDetails struct {
	ExternalSystemType int32 `json:"external_system_type,string"`
	ERC20              struct {
		Withdraw bool           `json:"withdraw"`
		Address  common.Address `json:"address"`
	} `json:"erc20"`
}

AssetDetails contain details about asset that can be deposited using service

func (AssetDetails) Validate

func (s AssetDetails) Validate() error

Validate validates asset details

type Details

type Details struct {
	regources.Asset
	AssetDetails
}

Details is a composition structure which contain asset resource and it's details

type Opts

type Opts struct {
	Streamer getters.AssetHandler
	Log      *logan.Entry
}

Opts contain parameters required to build service

type Service

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

Service is struct representing watchlist service

func New

func New(opts Opts) *Service

New creates new watchlist service

func (*Service) GetToAdd

func (s *Service) GetToAdd() <-chan Details

GetToAdd returns channel assets to watch deposits for will be sent into

func (*Service) GetToRemove

func (s *Service) GetToRemove() <-chan string

GetToRemove returns channel assets to stop watching deposits for will be sent into

func (*Service) Run

func (s *Service) Run(ctx context.Context)

Run runs watchlist service

Jump to

Keyboard shortcuts

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