ensresolver

package
v0.1.11 Latest Latest
Warning

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

Go to latest
Published: Apr 11, 2024 License: GPL-3.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 EnsName

type EnsName struct {
	CreatedAt time.Time
	UpdatedAt time.Time
	Address   string
	Name      string
}

type Publisher

type Publisher interface {
	PublishJSON(ctx context.Context, subject string, obj any) error
}

type Repo

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

func NewRepo

func NewRepo(db *gorm.DB) *Repo

func (*Repo) BatchCreate

func (r *Repo) BatchCreate(data []EnsName) error

func (*Repo) GetByAddresses added in v0.1.5

func (r *Repo) GetByAddresses(addresses []string) ([]EnsName, error)

type Server added in v0.1.5

type Server struct {
	storagepb.UnimplementedEnsServer
	// contains filtered or unexported fields
}

func NewServer added in v0.1.5

func NewServer(sp *Service) *Server

func (*Server) GetEnsByAddresses added in v0.1.5

type Service

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

func NewService

func NewService(repo *Repo, cl enspb.EnsClient, pl Publisher) (*Service, error)

func (*Service) AddRequests

func (s *Service) AddRequests(list []string)

AddRequests add requests to resolve ens names. The results will be putted to the queue

func (*Service) GetByAddresses added in v0.1.5

func (s *Service) GetByAddresses(addresses []string) ([]EnsName, error)

func (*Service) Start

func (s *Service) Start(ctx context.Context) error

Jump to

Keyboard shortcuts

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