Documentation
¶
Index ¶
Constants ¶
View Source
const PutAbility = "http/put"
Variables ¶
View Source
var Put = validator.NewCapability( PutAbility, schema.DIDString(), PutCaveatsReader, func(claimed, delegated ucan.Capability[PutCaveats]) failure.Failure { if fail := equalWith(claimed, delegated); fail != nil { return fail } if fail := equalURL(claimed, delegated); fail != nil { return fail } if fail := equalHeaders(claimed, delegated); fail != nil { return fail } if fail := equalBody(claimed, delegated); fail != nil { return fail } return nil }, )
Put is a capability that allows the agent to perform an HTTP PUT request.
View Source
var PutCaveatsReader = schema.Struct[PutCaveats](PutCaveatsType(), nil, types.Converters...)
View Source
var PutOkReader = schema.Struct[PutOk](PutOkType(), nil, types.Converters...)
Functions ¶
func PutCaveatsType ¶
Types ¶
type Body ¶
type Body struct {
// Digest is the multihash of the blob included in the request body.
Digest multihash.Multihash
// Size is the size in bytes of the blob included in the request body.
Size uint64
}
Body describes the contents of the HTTP PUT request body.
type PutCaveats ¶
PutCaveats represents the caveats required to perform a http/put invocation.
type PutOk ¶
type PutOk struct {
}
PutOk represents the successful response for a http/put invocation.
type PutReceiptReader ¶ added in v0.0.7
type PutReceiptReader receipt.ReceiptReader[PutOk, failure.Failure]
func NewPutReceiptReader ¶ added in v0.0.7
func NewPutReceiptReader() (PutReceiptReader, error)
Click to show internal directories.
Click to hide internal directories.