Documentation ¶
Index ¶
- Variables
- func Must[T any](val T, err error) func(*testing.T) T
- func Must2[T, U any](val1 T, val2 U, err error) func(*testing.T) (T, U)
- func RandomBitswapProviderResult() model.ProviderResult
- func RandomBytes(size int) []byte
- func RandomCAR(size int) (datamodel.Link, mh.Multihash, []byte)
- func RandomCID() datamodel.Link
- func RandomIndexClaim() ucan.Capability[assert.IndexCaveats]
- func RandomIndexDelegation() delegation.Delegation
- func RandomLocationClaim() ucan.Capability[assert.LocationCaveats]
- func RandomLocationCommitmentProviderResult() model.ProviderResult
- func RandomLocationDelegation() delegation.Delegation
- func RandomMultiaddr() multiaddr.Multiaddr
- func RandomMultihash() mh.Multihash
- func RandomMultihashes(count int) []mh.Multihash
- func RandomPeer() peer.ID
- func RandomPrincipal() ucan.Principal
- func RandomProviderResult() model.ProviderResult
- func RandomShardedDagIndexView(size int) (mh.Multihash, blobindex.ShardedDagIndexView)
- func RandomSigner() principal.Signer
- func RequireEqualDelegation(t *testing.T, expectedDelegation delegation.Delegation, ...)
- func RequireEqualIndex(t *testing.T, expectedIndex blobindex.ShardedDagIndexView, ...)
Constants ¶
This section is empty.
Variables ¶
var Alice, _ = signer.Parse("MgCZT5vOnYZoVAeyjnzuJIVY9J4LNtJ+f8Js0cTPuKUpFne0BVEDJjEu6quFIU8yp91/TY/+MYK8GvlKoTDnqOCovCVM=")
did:key:z6Mkk89bC3JrVqKie71YEcc5M1SMVxuCgNx6zLZ8SYJsxALi
var Bob, _ = signer.Parse("MgCYbj5AJfVvdrjkjNCxB3iAUwx7RQHVQ7H1sKyHy46Iose0BEevXgL1V73PD9snOCIoONgb+yQ9sycYchQC8kygR4qY=")
did:key:z6MkffDZCkCTWreg8868fG1FGFogcJj5X6PY93pPcWDn9bob
var Mallory, _ = signer.Parse("MgCYtH0AvYxiQwBG6+ZXcwlXywq9tI50G2mCAUJbwrrahkO0B0elFYkl3Ulf3Q3A/EvcVY0utb4etiSE8e6pi4H0FEmU=")
did:key:z6MktafZTREjJkvV5mfJxcLpNBoVPwDLhTuMg9ng7dY4zMAL
var Service, _ = signer.Parse("MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8=")
did:key:z6MkrZ1r5XBFZjBU34qyD8fueMbMRkKw17BZaq2ivKFjnz2z
var TestURL, _ = url.Parse("https://storacha.network")
Functions ¶
func Must ¶
Must takes return values from a function and returns the non-error one. If the error value is non-nil then it fails the test
func Must2 ¶
Must2 takes return values from a 3 return function and returns the non-error ones. If the error value is non-nil then it fails the test.
func RandomBitswapProviderResult ¶ added in v1.0.0
func RandomBitswapProviderResult() model.ProviderResult
func RandomBytes ¶
func RandomCAR ¶
RandomCAR creates a CAR with a single block of random bytes of the specified size. It returns the link of the root block, the hash of the CAR itself and the bytes of the CAR.
func RandomIndexClaim ¶
func RandomIndexClaim() ucan.Capability[assert.IndexCaveats]
func RandomIndexDelegation ¶
func RandomIndexDelegation() delegation.Delegation
func RandomLocationClaim ¶
func RandomLocationClaim() ucan.Capability[assert.LocationCaveats]
func RandomLocationCommitmentProviderResult ¶ added in v1.0.0
func RandomLocationCommitmentProviderResult() model.ProviderResult
func RandomLocationDelegation ¶
func RandomLocationDelegation() delegation.Delegation
func RandomMultiaddr ¶
func RandomMultiaddr() multiaddr.Multiaddr
func RandomMultihash ¶
func RandomMultihashes ¶
func RandomPeer ¶
func RandomPrincipal ¶ added in v1.0.0
func RandomProviderResult ¶
func RandomProviderResult() model.ProviderResult
func RandomShardedDagIndexView ¶
func RandomShardedDagIndexView(size int) (mh.Multihash, blobindex.ShardedDagIndexView)
func RandomSigner ¶ added in v1.0.0
func RequireEqualDelegation ¶
func RequireEqualDelegation(t *testing.T, expectedDelegation delegation.Delegation, actualDelegation delegation.Delegation)
RequireEqualDelegation compares two delegations to verify their equality
func RequireEqualIndex ¶
func RequireEqualIndex(t *testing.T, expectedIndex blobindex.ShardedDagIndexView, actualIndex blobindex.ShardedDagIndexView)
RequireEqualIndex compares two sharded dag indexes to verify their equality
Types ¶
This section is empty.