Documentation
¶
Overview ¶
package namesys implements various functionality for the ipns naming system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
ErrExpiredRecord should be returned when an ipns record is invalid due to being too old
ErrPublishFailed signals an error when attempting to publish.
ErrResolveFailed signals an error when attempting to resolve.
ErrUnrecognizedValidity is returned when an IpnsRecord has an unknown validity type.
var IpnsRecordValidator = &record.ValidChecker{ Func: ValidateIpnsRecord, Sign: true, }
Functions ¶
Types ¶
type DNSResolver ¶
type DNSResolver struct {
}
DNSResolver implements a Resolver on DNS domains
func (*DNSResolver) CanResolve ¶
func (r *DNSResolver) CanResolve(name string) bool
CanResolve implements Resolver
type NameSystem ¶
Namesys represents a cohesive name publishing and resolving system.
Publishing a name is the process of establishing a mapping, a key-value pair, according to naming rules and databases.
Resolving a name is the process of looking up the value associated with the key (name).
func NewNameSystem ¶
func NewNameSystem(r routing.IpfsRouting) NameSystem
NewNameSystem will construct the IPFS naming system based on Routing
type ProquintResolver ¶
type ProquintResolver struct{}
func (*ProquintResolver) CanResolve ¶
func (r *ProquintResolver) CanResolve(name string) bool
CanResolve implements Resolver. Checks whether the name is a proquint string.
type Publisher ¶
type Publisher interface {
// Publish establishes a name-value mapping.
// TODO make this not PrivKey specific.
Publish(ctx context.Context, name ci.PrivKey, value u.Key) error
}
Publisher is an object capable of publishing particular names.
func NewRoutingPublisher ¶
func NewRoutingPublisher(route routing.IpfsRouting) Publisher
NewRoutingPublisher constructs a publisher for the IPFS Routing name system.
type Resolver ¶
type Resolver interface {
// Resolve looks up a name, and returns the value previously published.
Resolve(ctx context.Context, name string) (value u.Key, err error)
// CanResolve checks whether this Resolver can resolve a name
CanResolve(name string) bool
}
Resolver is an object capable of resolving names.
func NewRoutingResolver ¶
func NewRoutingResolver(route routing.IpfsRouting) Resolver
NewRoutingResolver constructs a name resolver using the IPFS Routing system to implement SFS-like naming on top.
Source Files
¶
- dns.go
- interface.go
- namesys.go
- proquint.go
- publisher.go
- routing.go