generated from ipfs/ipfs-repository-template
-
Notifications
You must be signed in to change notification settings - Fork 108
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: rename HasDNSLinkRecord to GetDNSLinkRecord
- Loading branch information
Showing
4 changed files
with
19 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,18 +32,19 @@ type API interface { | |
// from the routing system. | ||
GetIPNSRecord(context.Context, cid.Cid) ([]byte, error) | ||
|
||
// GetDNSLinkRecord returns the DNSLink TXT record for the provided FQDN. | ||
// Unlike ResolvePath, it does not perform recursive resolution. It only | ||
// checks for the existence of a DNSLink TXT record with path starting with | ||
// /ipfs/ or /ipns/ and returns the path as-is. | ||
GetDNSLinkRecord(context.Context, string) (path.Path, error) | ||
|
||
// IsCached returns whether or not the path exists locally. | ||
IsCached(context.Context, path.Path) bool | ||
|
||
// ResolvePath resolves the path using UnixFS resolver. If the path does not | ||
// exist due to a missing link, it should return an error of type: | ||
// https://pkg.go.dev/github.com/ipfs/[email protected]/resolver#ErrNoLink | ||
ResolvePath(context.Context, path.Path) (path.Resolved, error) | ||
|
||
// HasDNSLinkRecord returns if the provided path has a DNSLink TXT record. | ||
// It does not perform any validation, only checks for the existence of | ||
// a DNSLink TXT record. | ||
HasDNSLinkRecord(context.Context, string) bool | ||
} | ||
|
||
// A helper function to clean up a set of headers: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters