Help us shape the future of Go! Take the 2026 Go Developer Survey

ledgeradapter

package
v1.9.0 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package ledgeradapter adapts the ledger extension to the authsome bridge.Ledger interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Adapter

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

Adapter implements bridge.Ledger by delegating to the ledger extension.

func New

func New(engine *ledger.Ledger) *Adapter

New creates a new ledger adapter.

func (*Adapter) CheckEntitlement

func (a *Adapter) CheckEntitlement(ctx context.Context, featureKey string) (bool, error)

CheckEntitlement checks whether a tenant is entitled to use a feature.

func (*Adapter) RecordUsage

func (a *Adapter) RecordUsage(ctx context.Context, featureKey string, quantity int64) error

RecordUsage records a usage event for a metered feature.

Jump to

Keyboard shortcuts

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