creditledger

package
v0.2.21 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// CreditsCurrency is the currency used to charge Fabriktor credits.
	CreditsCurrency = money.USD
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Client added in v0.1.1122

type Client interface {
	contract.CreditLedgerOperator
}

func NewClient added in v0.1.1122

func NewClient(d Dependencies, opts ClientOptions) (Client, error)

type ClientOption

type ClientOption = contract.Opt[ClientOptions]

func WithAuthenticationSecret added in v0.1.1122

func WithAuthenticationSecret(x []byte) ClientOption

func WithConsumeCreditsURL

func WithConsumeCreditsURL(x *url.URL) ClientOption

func WithLoaded

func WithLoaded(x Loaded) ClientOption

func WithTotalCreditsURL added in v0.1.1122

func WithTotalCreditsURL(x *url.URL) ClientOption

type ClientOptions

type ClientOptions struct {
	Loaded
}

func ApplyClientOptions

func ApplyClientOptions(opts *ClientOptions, modifiers ...ClientOption) ClientOptions

type DefaultTool added in v0.1.1122

type DefaultTool struct {
	T *contract.Tool[Client]
}

func NewTool added in v0.1.1122

func NewTool(c Client, opts contract.ToolOptions[Client]) *DefaultTool

func (*DefaultTool) ConsumeCredits added in v0.1.1122

ConsumeCredits consumes credits for a backend-defined operation.

func (*DefaultTool) TotalCredits added in v0.1.1122

TotalCredits returns the current credit balance for an owner.

type Dependencies added in v0.1.1122

type Loaded

type Loaded struct {
	TotalCreditsURL      *url.URL
	ConsumeCreditsURL    *url.URL
	AuthenticationSecret []byte
}

type Tool added in v0.1.1122

type Tool interface {
	Client
}

Jump to

Keyboard shortcuts

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