nope_connector

package
v1.0.0-beta.76 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewConnector

func NewConnector() credit.Connector

Types

type Connector

type Connector struct{}

func (*Connector) CreateFeature

func (c *Connector) CreateFeature(ctx context.Context, namespace string, feature credit.Feature) (credit.Feature, error)

Feature

func (*Connector) CreateGrant

func (c *Connector) CreateGrant(ctx context.Context, namespace string, grant credit.Grant) (credit.Grant, error)

Grant

func (*Connector) CreateLedger

func (c *Connector) CreateLedger(ctx context.Context, namespace string, ledger credit.Ledger) (credit.Ledger, error)

Ledger

func (*Connector) DeleteFeature

func (c *Connector) DeleteFeature(ctx context.Context, namespace string, featureID ulid.ULID) error

func (*Connector) GetBalance

func (c *Connector) GetBalance(ctx context.Context, namespace string, ledgerID ulid.ULID, cutline time.Time) (credit.Balance, error)

Credit

func (*Connector) GetFeature

func (c *Connector) GetFeature(ctx context.Context, namespace string, featureID ulid.ULID) (credit.Feature, error)

func (*Connector) GetGrant

func (c *Connector) GetGrant(ctx context.Context, namespace string, id ulid.ULID) (credit.Grant, error)

func (*Connector) GetHighWatermark

func (c *Connector) GetHighWatermark(ctx context.Context, namespace string, ledgerID ulid.ULID) (credit.HighWatermark, error)

func (*Connector) GetHistory

func (c *Connector) GetHistory(ctx context.Context, namespace string, ledgerID ulid.ULID, from time.Time, to time.Time, limit int) (credit.LedgerEntryList, error)

func (*Connector) ListFeatures

func (c *Connector) ListFeatures(ctx context.Context, namespace string, params credit.ListFeaturesParams) ([]credit.Feature, error)

func (*Connector) ListGrants

func (c *Connector) ListGrants(ctx context.Context, namespace string, params credit.ListGrantsParams) ([]credit.Grant, error)

func (*Connector) ListLedgers

func (c *Connector) ListLedgers(ctx context.Context, namespace string, params credit.ListLedgersParams) ([]credit.Ledger, error)

func (*Connector) Reset

func (c *Connector) Reset(ctx context.Context, namespace string, reset credit.Reset) (credit.Reset, []credit.Grant, error)

func (*Connector) VoidGrant

func (c *Connector) VoidGrant(ctx context.Context, namespace string, grant credit.Grant) (credit.Grant, error)

Jump to

Keyboard shortcuts

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