watch

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type WatchGroup

type WatchGroup struct {
	Name           string         `mapstructure:"group"`
	TelegramChatID int64          `mapstructure:"telegram_chat_id"`
	Users          []*WatchUser   `mapstructure:"users"`
	Wallets        []*WatchWallet `mapstructure:"wallets"`
}

type WatchUser

type WatchUser struct {
	Name             string         `mapstructure:"name"`
	TelegramUsername string         `mapstructure:"telegram_username"`
	Wallets          []*WatchWallet `mapstructure:"wallets"`

	WalletAddresses []common.Address

	Group *WatchGroup
}

type WatchWallet

type WatchWallet struct {
	Name    string         `mapstructure:"name"`
	Address common.Address `mapstructure:"address"`
}

type Watcher

type Watcher struct {
	Groups          map[string]*WatchGroup
	UserAddresses   map[common.Address]*WatchGroup
	WalletAddresses map[common.Address]*WatchGroup
	WatchUsers      WatcherUsers
}

func (*Watcher) Contains

func (wu *Watcher) Contains(address common.Address) bool

Contains returns true if the given string is in the slice.

func (*Watcher) ContainsAddressFromSlice

func (wu *Watcher) ContainsAddressFromSlice(addresses []common.Address) common.Address

func (*Watcher) ContainsOneOf

func (wu *Watcher) ContainsOneOf(addresses map[common.Address]bool) common.Address

type WatcherUsers

type WatcherUsers map[common.Address]*WatchUser

func (*WatcherUsers) Contains

func (wu *WatcherUsers) Contains(address common.Address) bool

Contains returns true if the given string is in the slice.

func (*WatcherUsers) ContainsOneOf

func (wu *WatcherUsers) ContainsOneOf(addresses map[common.Address]bool) common.Address

Jump to

Keyboard shortcuts

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