Categorygithub.com/ipfs/go-namesys
modulepackage
0.7.1
Repository: https://github.com/ipfs/go-namesys.git
Documentation: pkg.go.dev

# README

go-namesys

go-namesys provides publish and resolution support for the /ipns/ namespace

Go Reference Travis CI

ā— This repo is no longer maintained.

šŸ‘‰ We highly recommend switching to the maintained version at https://github.com/ipfs/boxo/tree/main/namesys. šŸŽļø Good news! There is tooling and documentation to expedite a switch in your repo.

āš ļø If you continue using this repo, please note that security fixes will not be provided (unless someone steps in to maintain it).

šŸ“š Learn more, including how to take the maintainership mantle or ask questions, here.

Summary

Package namesys defines Resolver and Publisher interfaces for IPNS paths, that is, paths in the form of /ipns/<name_to_be_resolved>. A "resolved" IPNS path becomes an /ipfs/<cid> path.

Traditionally, these paths would be in the form of /ipns/{libp2p-key}, which references an IPNS record in a distributed ValueStore (usually the IPFS DHT).

Additionally, the /ipns/ namespace can also be used with domain names that use DNSLink (/ipns/en.wikipedia-on-ipfs.org, see https://docs.ipfs.io/concepts/dnslink/).

The package provides implementations for all three resolvers.

Table of Contents

Install

go-namesys works like a regular Go module:

> go get github.com/ipfs/go-namesys

Usage

import "github.com/ipfs/go-namesys"

See the Pkg.go.dev documentation

License

This project is dual-licensed under Apache 2.0 and MIT terms:

# Packages

Package republisher provides a utility to automatically re-publish IPNS records related to the keys in a Keystore.
No description provided by the author

# Functions

IpnsDsKey returns a datastore key given an IPNS identifier (peer ID).
NewDNSResolver constructs a name resolver using DNS TXT records.
NewIpnsPublisher constructs a publisher for the IPFS Routing name system.
NewIpnsResolver constructs a name resolver using the IPFS Routing system to implement SFS-like naming on top.
NewNameSystem will construct the IPFS naming system based on Routing Deprecated: use github.com/ipfs/boxo/namesys.NewNameSystem.
PkKeyForID returns the public key routing key for the given peer ID.
PublishEntry stores the given IpnsEntry in the ValueStore with the given ipnskey.
PublishPublicKey stores the given public key in the ValueStore with the given key.
PutRecordToRouting publishes the given entry using the provided ValueStore, keyed on the ID associated with the provided public key.
Deprecated: use github.com/ipfs/boxo/namesys.StartSpan.
WithCache is an option that instructs the name system to use a (LRU) cache of the given size.
WithDatastore is an option that supplies a datastore to use instead of an in-memory map datastore.
WithDNSResolver is an option that supplies a custom DNS resolver to use instead of the system default.

# Constants

DefaultResolverCacheTTL defines max ttl of a record placed in namesys cache.

# Variables

ErrPublishFailed signals an error when attempting to publish.
ErrResolveFailed signals an error when attempting to resolve.
ErrResolveRecursion signals a recursion-depth limit.

# Structs

DNSResolver implements a Resolver on DNS domains Deprecated: use github.com/ipfs/boxo/namesys.DNSResolver.
IpnsPublisher is capable of publishing and resolving names to the IPFS routing system.
IpnsResolver implements NSResolver for the main IPFS SFS-like naming Deprecated: use github.com/ipfs/boxo/namesys.IpnsResolver.
Result is the return type for Resolver.ResolveAsync.

# Interfaces

NameSystem represents a cohesive name publishing and resolving system.
Publisher is an object capable of publishing particular names.
Resolver is an object capable of resolving names.

# Type aliases

LookupTXTFunc is a function that lookups TXT record values.
Deprecated: use github.com/ipfs/boxo/namesys.Option.