receipts

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2026 License: Apache-2.0, MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrNotFound = errors.New("receipt not found")

Functions

This section is empty.

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewClient

func NewClient(endpoint *url.URL, options ...Option) *Client

func (*Client) Fetch

func (c *Client) Fetch(ctx context.Context, lnk ucan.Link) (receipt.AnyReceipt, error)

Fetch a receipt from the receipt API. Returns ErrNotFound if the API responds with http.StatusNotFound.

type Option

type Option func(c *Client)

func WithCodec

func WithCodec(codec transport.ResponseDecoder) Option

func WithHTTPClient

func WithHTTPClient(client *http.Client) Option

Jump to

Keyboard shortcuts

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