Documentation ¶
Index ¶
- Variables
- func BindFailure(t testing.TB, n ipld.Node) fdm.FailureModel
- 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 RandomBytes(size int) []byte
- func RandomCID() datamodel.Link
- func RandomDID() did.DID
- func RandomMultihash() mh.Multihash
- func RandomSigner() principal.Signer
- func RequireEqualDelegation(t *testing.T, expected delegation.Delegation, actual delegation.Delegation)
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 BindFailure ¶
func BindFailure(t testing.TB, n ipld.Node) fdm.FailureModel
BindFailure binds the IPLD node to a FailureModel if possible. This works around IPLD requiring data to match the schema exactly
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 RandomBytes ¶
func RandomMultihash ¶
func RandomSigner ¶
func RequireEqualDelegation ¶
func RequireEqualDelegation(t *testing.T, expected delegation.Delegation, actual delegation.Delegation)
RequireEqualDelegation compares two delegations to verify their equality
Types ¶
This section is empty.