bindcap

package
v0.0.0-...-8bebe15 Latest Latest
Warning

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

Go to latest
Published: May 14, 2026 License: Apache-2.0, MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Arguments

type Arguments interface {
	cbg.CBORMarshaler
	cbg.CBORUnmarshaler
}

type Capability

type Capability[A Arguments] struct {
	// contains filtered or unexported fields
}

Capability that can be used to validate an invocation against proof policies.

func New

func New[A Arguments](cmd ucan.Command, options ...capability.Option) (*Capability[A], error)

New creates a new capability definition that can be used to validate an invocation against proof policies.

func (*Capability[A]) Command

func (c *Capability[A]) Command() ucan.Command

func (*Capability[A]) Delegate

func (c *Capability[A]) Delegate(issuer ucan.Signer, audience did.DID, subject did.DID, options ...delegation.Option) (*delegation.Delegation, error)

func (*Capability[A]) Invoke

func (c *Capability[A]) Invoke(issuer ucan.Signer, subject did.DID, arguments A, options ...invocation.Option) (*invocation.Invocation, error)

func (*Capability[A]) Match

func (c *Capability[A]) Match(inv ucan.Invocation, proofs map[cid.Cid]ucan.Delegation) (*capability.Match, error)

Match an invocation against the capability, resulting in a match, which is the task from the invocation, verified to be matching with delegation policies.

Match also ensures the invocation arguments can be bound to the specified Arguments type A.

func (*Capability[A]) Policy

func (c *Capability[A]) Policy() ucan.Policy

Jump to

Keyboard shortcuts

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