package
0.0.0-20240826102644-179a93e6e53a
Repository: https://github.com/libp2p/go-routing-language.git
Documentation: pkg.go.dev

# Functions

MatchAllFetchCid parses all fetch cid patterns found in src.
MatchAllFindCid parses all find cid patterns found in src.
ParseFetchCid parses formulas of the form `fetch(cid=link(CID:STRING), providers=[PROVIDER])`.
ParseFindCid parses formulas of the form `find(link(CID:STRING))`.
ParseLink parses formulas of the form `link(CID:STRING)`.
ParseMultiaddr parses formulas of the form multiaddr(MULTIADDR:STRING) to a libp2p multiaddr.
ParsePeer parses formulas of the form `peer(MULTIFORMAT:STRING)` to a libp2p peer id.
ParseProvideCid parses formulas of the form `provide(cid=link(CID:STRING), fetch=FETCH:FETCH)`.
ParseProvider parses a provider pattern from a syntactic representation.
ParseProviders parses a list of providers, ignoring unrecognizable provider patterns.

# Structs

FetchCid is the Go representation of the routing language pattern fetch(cid=link(CID:STRING), providers=[PROVIDER]).
FetchCidParser is a parser for fetch cid patterns.
FindCid is the Go representation of the `find(link(CID:STRING))` pattern from the Routing Language Spec.
FindCidParser is a parser for `find(link(CID:STRING))` patterns.
FindPath is the Go representation of the `find(path(PATH:STRING))` pattern from the Routing Language Spec.
Link represents the pattern `link(CID:STRING)`.
LinkParser is a Parser for the link pattern.
Multiaddr represents the pattern `multiaddr(MULTIADDR:STRING)` or `multiaddr(MULTIADDR:BYTES)`.
MultiaddrParser is a parser for the peer pattern.
Peer represents the pattern `peer(MULTIFORMAT:STRING)` or `peer(MULTIFORMAT:BYTES)`.
PeerParser is a parser for the peer pattern.
FindCid is the Go representation of the `provide(cid=link(CID:STRING), fetch=FETCH:FETCH)` pattern from the Routing Language Spec.
ProvideCidParser is a parser for `provide(cid=link(CID:STRING), fetch=FETCH:FETCH)` patterns.

# Interfaces

Fetch represents a FETCH pattern.
Pattern represents Go implementations of patterns from the Routing Language Spec: https://docs.google.com/document/d/1bGQ3-1u1XgfcXrb0FqbPLtelaOFpuRpsKTpyrgTtfDs/edit.
Provider represents the pattern PROVIDER = MULTIADDRESS | PEER.

# Type aliases

Providers is a list of providers.