watch

package
v0.12.0 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChatID added in v0.7.1

type ChatID struct {
	ChatID int64 `mapstructure:"chat_id"`
}

type WGroup added in v0.6.0

type WGroup struct {
	Name              string           `mapstructure:"group"`
	TelegramChatID    int64            `mapstructure:"telegram_chat_id"`
	ReplyToMessageID  int              `mapstructure:"telegram_reply_to_message_id"`
	AdditionalChatIDs []*ChatID        `mapstructure:"telegram_chat_ids"`
	Users             []*WUser         `mapstructure:"users"`
	Wallets           []*wallet.Wallet `mapstructure:"wallets"`
}

type WUser added in v0.6.0

type WUser struct {
	Name             string           `mapstructure:"name"`
	TelegramUsername string           `mapstructure:"telegram_username"`
	Wallets          []*wallet.Wallet `mapstructure:"wallets"`

	WalletAddresses []common.Address

	Group *WGroup
}

type Watcher

type Watcher struct {
	Groups          map[string]*WGroup
	UserAddresses   map[common.Address]*WGroup
	WalletAddresses map[common.Address]*WGroup
	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]*WUser

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