resolver

package module
v0.0.0-...-eaf1643 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2020 License: GPL-2.0 Imports: 11 Imported by: 8

README

go-bmail-resolver

resolve bmail naming request

Documentation

Index

Constants

View Source
const Separator = 0x7f

Variables

View Source
var RetryRule = map[int]int{
	1: 1,
	2: 2,
	3: 3,
}

Functions

func BasView

func BasView(conn *ethclient.Client) *eth.BasView

func GetCallOpts

func GetCallOpts(blockNumber uint64) *bind.CallOpts

func Split

func Split(buffer []byte, s byte) []string

Types

type Config

type Config struct {
	A          []byte
	AAAA       []byte
	MX         []byte
	BlockChain []byte
	IOTA       []byte
	CName      []byte
	MXBCA      []byte
}

func ConvertToConfig

func ConvertToConfig(s struct {
	A          []byte
	AAAA       []byte
	MX         []byte
	BlockChain []byte
	IOTA       []byte
	CName      []byte
	MXBCA      []byte
}) Config

func QueryDomainConfigs

func QueryDomainConfigs(hash Hash) (*Config, error)

type DNSResolver

type DNSResolver struct {
}

func (*DNSResolver) BMailBCA

func (ds *DNSResolver) BMailBCA(mailHash string) (bmail.Address, string)

func (*DNSResolver) DomainA

func (ds *DNSResolver) DomainA(domain string) []net.IP

func (*DNSResolver) DomainA2

func (ds *DNSResolver) DomainA2(domainName string) ([]net.IP, error)

func (*DNSResolver) DomainA3

func (ds *DNSResolver) DomainA3(domain string) ([]net.IP, []string, error)

func (*DNSResolver) DomainMX

func (ds *DNSResolver) DomainMX(domainMX string) ([]net.IP, []bmail.Address)

type EthResolver

type EthResolver struct {
}

func (*EthResolver) BMailBCA

func (er *EthResolver) BMailBCA(mailName string) (bmail.Address, string)

func (*EthResolver) BMailBCARetErr

func (er *EthResolver) BMailBCARetErr(mailName string) (bmail.Address, string, error)

func (*EthResolver) DomainA

func (er *EthResolver) DomainA(domain string) []net.IP

func (*EthResolver) DomainA2

func (er *EthResolver) DomainA2(domain string) ([]net.IP, error)

func (*EthResolver) DomainA3

func (er *EthResolver) DomainA3(domain string) ([]net.IP, []string, error)

func (*EthResolver) DomainMX

func (er *EthResolver) DomainMX(domain string) ([]net.IP, []bmail.Address)

func (*EthResolver) DomainMXRetErr

func (er *EthResolver) DomainMXRetErr(domain string) ([]net.IP, []bmail.Address, error)

type EthResolverConf

type EthResolverConf struct {
	AccessPoints []string
	BasViewAddr  common.Address
}
var ResConf *EthResolverConf

type Hash

type Hash [32]byte

func GetHash

func GetHash(key string) Hash

func (Hash) String

func (hash Hash) String() string

type MailInfo

type MailInfo struct {
	Owner      common.Address
	Expiration *big.Int
	DomainHash [32]byte
	IsValid    bool
	AliasName  string
	BcAddress  bmail.Address
}

func ConvertToMailInfo

func ConvertToMailInfo(s struct {
	Owner      common.Address
	Expiration *big.Int
	DomainHash [32]byte
	IsValid    bool
	AliasName  []byte
	BcAddress  []byte
}) MailInfo

func QueryEmailInfo

func QueryEmailInfo(hash Hash) (*MailInfo, error)

type NameResolver

type NameResolver interface {
	DomainA(domainName string) []net.IP
	DomainA2(domainName string) ([]net.IP, error)
	DomainA3(domain string) ([]net.IP, []string, error)
	DomainMX(domainName string) ([]net.IP, []bmail.Address)
	BMailBCA(mailName string) (address bmail.Address, cname string)
}

func NewDnsResolver

func NewDnsResolver() NameResolver

func NewEthResolver

func NewEthResolver(debug bool) NameResolver

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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