appname

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	//KyberSwapAppName is the name of kyberswap
	KyberSwapAppName = "KyberSwap"
	//ThirdPartyAppName is the generic name for third party apps
	ThirdPartyAppName = "ThirdParty"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AddrToAppName

type AddrToAppName interface {
	UpdateMapAddrAppName(addr ethereum.Address, name string) error
	GetAddrToAppName() map[ethereum.Address]string
}

AddrToAppName define a set of interface required to translate address to app name

type MapAddrAppName

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

MapAddrAppName return the app name according to address

func NewMapAddrAppName

func NewMapAddrAppName(options ...Option) *MapAddrAppName

NewMapAddrAppName return a new instance of MapAddrAppName

func (*MapAddrAppName) GetAddrToAppName

func (apn *MapAddrAppName) GetAddrToAppName() map[ethereum.Address]string

GetAddrToAppName return a map of address to app name

func (*MapAddrAppName) UpdateMapAddrAppName

func (apn *MapAddrAppName) UpdateMapAddrAppName(addr ethereum.Address, name string) error

UpdateMapAddrAppName update an address map to a name

type Option

type Option func(m *MapAddrAppName)

Option sets the initialization behavior MappAddrAppName inSTANCE

func WithDataFile

func WithDataFile(path string) Option

WithDataFile returns an option to read data in from a JSON file

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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