Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrPossiblyInsecureHashFunction = fmt.Errorf("potentially insecure hash functions not allowed") ErrBelowMinimumHashLength = fmt.Errorf("hashes must be at least %d bytes long", minimumHashLength) ErrAboveMaximumHashLength = fmt.Errorf("hashes must be at most %d bytes long", maximumHashLength) )
View Source
var DefaultAllowlist defaultAllowlist
DefaultAllowlist is the default list of hashes allowed in IPFS.
Functions ¶
func ValidateCid ¶
ValidateCid validates multihash allowance behind given CID.
Types ¶
type Allowlist ¶ added in v0.12.0
type Allowlist interface { // IsAllowed checks for multihash allowance by the code. IsAllowed(code uint64) bool }
Allowlist defines an interface containing list of allowed multihashes.
func NewAllowlist ¶ added in v0.12.0
NewAllowlist constructs new Allowlist from the given map set.
func NewOverridingAllowlist ¶ added in v0.12.0
NewOverridingAllowlist is like NewAllowlist but it will fallback to an other [AllowList] if keys are missing. If override is nil it will return unsecure for unknown things.
Click to show internal directories.
Click to hide internal directories.