endpoint

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewResolver added in v0.4.0

func NewResolver(rs resolverService, es endpointService) (*resolver, error)

Types

type Config added in v0.4.0

type Config interface {
	Resolvers() ([]config.Resolver, error)
	TranslatePath(path string) string
}

type PublicKeyExtractor added in v0.4.0

type PublicKeyExtractor struct{}

func (PublicKeyExtractor) ExtractPublicKey added in v0.4.0

func (p PublicKeyExtractor) ExtractPublicKey(id view.Identity) (any, error)

type Resolver

type Resolver struct {
	config.Resolver
	Id             []byte
	RootID         view.Identity
	IdentityGetter func() (view.Identity, []byte, error)
}

func (*Resolver) GetIdentity

func (r *Resolver) GetIdentity() (view.Identity, error)

type ResolverService added in v0.4.0

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

func NewResolverService

func NewResolverService(config Config, service Service) (*ResolverService, error)

NewResolverService returns a new instance of the view-sdk endpoint resolverService

func (*ResolverService) GetIdentity added in v0.4.0

func (r *ResolverService) GetIdentity(label string) view.Identity

GetIdentity returns the identity associated to the passed label. The label is matched against the name

func (*ResolverService) LoadResolvers added in v0.4.0

func (r *ResolverService) LoadResolvers() error

LoadResolvers loads the resolvers specified in the configuration file, if any

type Service

type Service interface {
	Bind(longTerm view.Identity, ephemeral view.Identity) error
	AddResolver(name string, domain string, addresses map[string]string, aliases []string, id []byte) (view.Identity, error)
	AddPublicKeyExtractor(extractor view2.PublicKeyExtractor) error
}

Jump to

Keyboard shortcuts

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