Documentation
¶
Index ¶
- Variables
- func MultihashFromBytes(t *testing.T, b []byte) mh.Multihash
- 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 RandomBigInt(t *testing.T) *big.Int
- func RandomBitswapProviderResult(t *testing.T) model.ProviderResult
- func RandomBytes(t *testing.T, size int) []byte
- func RandomCAR(t *testing.T, size int) (datamodel.Link, mh.Multihash, []byte)
- func RandomCID(t *testing.T) datamodel.Link
- func RandomDID(t *testing.T) did.DID
- func RandomEqualsClaim(t *testing.T) ucan.Capability[cassert.EqualsCaveats]
- func RandomEqualsDelegation(t *testing.T) delegation.Delegation
- func RandomIndexClaim(t *testing.T) ucan.Capability[cassert.IndexCaveats]
- func RandomIndexClaimProviderResult(t *testing.T) model.ProviderResult
- func RandomIndexDelegation(t *testing.T) delegation.Delegation
- func RandomLocationClaim(t *testing.T) ucan.Capability[cassert.LocationCaveats]
- func RandomLocationCommitmentProviderResult(t *testing.T) model.ProviderResult
- func RandomLocationDelegation(t *testing.T) delegation.Delegation
- func RandomMultiaddr(t *testing.T) multiaddr.Multiaddr
- func RandomMultihash(t *testing.T) mh.Multihash
- func RandomMultihashes(t *testing.T, count int) []mh.Multihash
- func RandomPeer(t *testing.T) peer.ID
- func RandomPiece(t testing.TB, unpaddedSize int64) piece.PieceLink
- func RandomPrincipal(t *testing.T) ucan.Principal
- func RandomProviderResult(t *testing.T) model.ProviderResult
- func RandomShardedDagIndexView(t *testing.T, size int) (mh.Multihash, blobindex.ShardedDagIndexView)
- func RandomSigner(t *testing.T) 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, _ = ed25519.Parse("MgCZT5vOnYZoVAeyjnzuJIVY9J4LNtJ+f8Js0cTPuKUpFne0BVEDJjEu6quFIU8yp91/TY/+MYK8GvlKoTDnqOCovCVM=")
did:key:z6Mkk89bC3JrVqKie71YEcc5M1SMVxuCgNx6zLZ8SYJsxALi
var Bob, _ = ed25519.Parse("MgCYbj5AJfVvdrjkjNCxB3iAUwx7RQHVQ7H1sKyHy46Iose0BEevXgL1V73PD9snOCIoONgb+yQ9sycYchQC8kygR4qY=")
did:key:z6MkffDZCkCTWreg8868fG1FGFogcJj5X6PY93pPcWDn9bob
var Mallory, _ = ed25519.Parse("MgCYtH0AvYxiQwBG6+ZXcwlXywq9tI50G2mCAUJbwrrahkO0B0elFYkl3Ulf3Q3A/EvcVY0utb4etiSE8e6pi4H0FEmU=")
did:key:z6MktafZTREjJkvV5mfJxcLpNBoVPwDLhTuMg9ng7dY4zMAL
var Service, _ = ed25519.Parse("MgCYKXoHVy7Vk4/QjcEGi+MCqjntUiasxXJ8uJKY0qh11e+0Bs8WsdqGK7xothgrDzzWD0ME7ynPjz2okXDh8537lId8=")
did:key:z6MkrZ1r5XBFZjBU34qyD8fueMbMRkKw17BZaq2ivKFjnz2z
var TestURL, _ = url.Parse("https://storacha.network")
var WebService, _ = signer.Wrap(Service, webServiceDID)
did:web:test.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 ¶
func RandomBitswapProviderResult(t *testing.T) model.ProviderResult
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 RandomEqualsClaim ¶
func RandomEqualsClaim(t *testing.T) ucan.Capability[cassert.EqualsCaveats]
func RandomEqualsDelegation ¶
func RandomEqualsDelegation(t *testing.T) delegation.Delegation
func RandomIndexClaim ¶
func RandomIndexClaim(t *testing.T) ucan.Capability[cassert.IndexCaveats]
func RandomIndexClaimProviderResult ¶
func RandomIndexClaimProviderResult(t *testing.T) model.ProviderResult
func RandomIndexDelegation ¶
func RandomIndexDelegation(t *testing.T) delegation.Delegation
func RandomLocationClaim ¶
func RandomLocationClaim(t *testing.T) ucan.Capability[cassert.LocationCaveats]
func RandomLocationCommitmentProviderResult ¶
func RandomLocationCommitmentProviderResult(t *testing.T) model.ProviderResult
func RandomLocationDelegation ¶
func RandomLocationDelegation(t *testing.T) delegation.Delegation
func RandomPiece ¶
RandomPiece is a helper that produces a piece with the given unpadded size.
func RandomProviderResult ¶
func RandomProviderResult(t *testing.T) model.ProviderResult
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.