credittracker

package
v0.1.23 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

type Client struct {
	Endpoint       string
	RequestTimeout time.Duration
	MaxRetries     int
	RetryTimeout   time.Duration
	// contains filtered or unexported fields
}

Client implements the Client interface.

func NewClient

func NewClient(settings *config.Settings, appName string) (*Client, error)

NewClient creates a new credit tracker client.

func (*Client) Close

func (c *Client) Close() error

Close closes the gRPC connection

func (*Client) DeductCredits

func (c *Client) DeductCredits(ctx context.Context, referenceID string, developerLicense string, tokenID *big.Int, amount uint64) error

DeductCredits deducts credits from the given developer license and token.

func (*Client) RefundCredits

func (c *Client) RefundCredits(ctx context.Context, referenceID string) error

RefundCredits refunds credits from the given developer license and token.

Jump to

Keyboard shortcuts

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