assert

package
v0.0.0-...-4418081 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 20, 2025 License: Apache-2.0, MIT Imports: 12 Imported by: 11

Documentation

Index

Constants

View Source
const EqualsAbility = "assert/equals"
View Source
const InclusionAbility = "assert/inclusion"
View Source
const IndexAbility = "assert/index"
View Source
const LocationAbility = "assert/location"
View Source
const PartitionAbility = "assert/partition"
View Source
const RelationAbility = "assert/relation"

Variables

View Source
var LocationCaveatsReader = schema.Mapped(schema.Struct[LegacyLocationCaveats](LocationCaveatsType(), nil, types.Converters...),
	func(llc LegacyLocationCaveats) (LocationCaveats, failure.Failure) {
		space := did.Undef
		if llc.Space != nil {
			space = *llc.Space
		}
		return LocationCaveats{llc.Content, llc.Location, llc.Range, space}, nil
	})

Functions

func EqualsCaveatsType

func EqualsCaveatsType() ipldschema.Type

func InclusionCaveatsType

func InclusionCaveatsType() ipldschema.Type

func IndexCaveatsType

func IndexCaveatsType() ipldschema.Type

func LocationCaveatsType

func LocationCaveatsType() ipldschema.Type

func PartitionCaveatsType

func PartitionCaveatsType() ipldschema.Type

func RelationCaveatsType

func RelationCaveatsType() ipldschema.Type

Types

type EqualsCaveats

type EqualsCaveats struct {
	Content types.HasMultihash
	Equals  ipld.Link
}

func (EqualsCaveats) ToIPLD

func (ec EqualsCaveats) ToIPLD() (datamodel.Node, error)

type InclusionCaveats

type InclusionCaveats struct {
	Content  types.HasMultihash
	Includes ipld.Link
	Proof    *ipld.Link
}

func (InclusionCaveats) ToIPLD

func (ic InclusionCaveats) ToIPLD() (datamodel.Node, error)

type IndexCaveats

type IndexCaveats struct {
	Content ipld.Link
	Index   ipld.Link
}

func (IndexCaveats) ToIPLD

func (ic IndexCaveats) ToIPLD() (datamodel.Node, error)

type LegacyLocationCaveats

type LegacyLocationCaveats struct {
	Content  types.HasMultihash
	Location []url.URL
	Range    *Range
	Space    *did.DID
}

Space field used to be optional, so we maintain compatibility

type LocationCaveats

type LocationCaveats struct {
	Content  types.HasMultihash
	Location []url.URL
	Range    *Range
	Space    did.DID
}

func (LocationCaveats) ToIPLD

func (lc LocationCaveats) ToIPLD() (datamodel.Node, error)

type PartitionCaveats

type PartitionCaveats struct {
	Content types.HasMultihash
	Blocks  *ipld.Link
	Parts   []ipld.Link
}

func (PartitionCaveats) ToIPLD

func (pc PartitionCaveats) ToIPLD() (datamodel.Node, error)

type Range

type Range struct {
	Offset uint64
	Length *uint64
}

type RelationCaveats

type RelationCaveats struct {
	Content  types.HasMultihash
	Children []ipld.Link
	Parts    []RelationPart
}

func (RelationCaveats) ToIPLD

func (rc RelationCaveats) ToIPLD() (datamodel.Node, error)

type RelationPart

type RelationPart struct {
	Content  ipld.Link
	Includes *RelationPartInclusion
}

type RelationPartInclusion

type RelationPartInclusion struct {
	Content ipld.Link
	Parts   *[]ipld.Link
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL