nameresolver

package
v0.8.2 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrUnregisterName = "unregistered name"
	ErrUnSupportName  = "unsupport name service resolution"
)

Variables

This section is empty.

Functions

func NameServiceStrings

func NameServiceStrings() []string

NameServiceStrings returns a slice of all String values of the enum

func NewAuthenticationTransport

func NewAuthenticationTransport(apiKey string) http.RoundTripper

Types

type AuthenticationTransport

type AuthenticationTransport struct {
	APIKey string
	// contains filtered or unexported fields
}

func (*AuthenticationTransport) RoundTrip

func (a *AuthenticationTransport) RoundTrip(request *http.Request) (*http.Response, error)

type NameResolver

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

func NewNameResolver

func NewNameResolver(ctx context.Context, config *config.RPCNetwork) (*NameResolver, error)

func (*NameResolver) Resolve

func (n *NameResolver) Resolve(ctx context.Context, input string) (string, error)

type NameService

type NameService int
const (
	NameServiceUnknown   NameService = iota // unknown
	NameServiceENS                          // eth
	NameServiceCSB                          // csb
	NameServiceLens                         // lens
	NameServiceFarcaster                    // fc
)

func NameServiceString

func NameServiceString(s string) (NameService, error)

NameServiceString retrieves an enum value from the enum constants string name. Throws an error if the param is not part of the enum.

func NameServiceValues

func NameServiceValues() []NameService

NameServiceValues returns all values of the enum

func (NameService) IsANameService

func (i NameService) IsANameService() bool

IsANameService returns "true" if the value is listed in the enum definition. "false" otherwise

func (NameService) MarshalJSON

func (i NameService) MarshalJSON() ([]byte, error)

MarshalJSON implements the json.Marshaler interface for NameService

func (*NameService) Scan

func (i *NameService) Scan(value interface{}) error

func (NameService) String

func (i NameService) String() string

func (*NameService) UnmarshalJSON

func (i *NameService) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface for NameService

func (NameService) Value

func (i NameService) Value() (driver.Value, error)

func (NameService) Values

func (NameService) Values() []string

type UserNameProof

type UserNameProof struct {
	Timestamp uint32 `json:"timestamp"`
	Name      string `json:"name"`
	Owner     string `json:"owner"`
	Signature string `json:"signature"`
	Fid       uint64 `json:"fid"`
	Type      string `json:"type"`
}

Jump to

Keyboard shortcuts

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