Documentation
¶
Overview ¶
Package failure defines a drop-in replacement for go-ucanto's failure module, with an extended FailureModel that can represent all the fields that may appear, so that decoding doesn't fail because of unexpected fields. This should ideally move to go-ucanto itself in some form, but it's a bit of a hack right now, and the entire issue will go away with the UCAN 1.0 version of go-ucanto.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FailureType ¶
func FromFailureModel ¶
func FromFailureModel(model FailureModel) ucantofailure.IPLDBuilderFailure
Types ¶
type FailureModel ¶
type FailureModel struct {
Name *string
Message string
Stack *string
Audience *ipld.Node //UCANPrincipal
Capability *ipld.Node //Capability
Cause *FailureModel
Causes *[]FailureModel
Claimed *ipld.Node //ParsedCapability
Delegated *ipld.Node //Any
Delegation *ipld.Node //Delegation
DelegationErrors *[]FailureModel
Did *[]byte //DID
ExpiredAt *int64
FailedProofs *[]FailureModel
InvalidProofs *[]FailureModel
Issuer *ipld.Node //UCANPrincipal
Link *datamodel.Link
UnknownCapabilities *[]ipld.Node //[]Capability
ValidAt *int64
IsError *bool
}
FailureModel is a generic failure
func (FailureModel) Error ¶
func (f FailureModel) Error() string
Click to show internal directories.
Click to hide internal directories.