balance

package
v1.2.3 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrInsufficientFunds = errors.New("insufficient funds")

Functions

This section is empty.

Types

type Model

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

func NewModel

func NewModel(db *m.Database) Model

func (Model) Dec

func (m Model) Dec(ctx context.Context, userID primitive.ObjectID, amount uint32) (err error)

func (Model) Get

func (m Model) Get(ctx context.Context, userID primitive.ObjectID) (amount uint32, err error)

func (Model) Inc

func (m Model) Inc(ctx context.Context, userID primitive.ObjectID, amount uint32) (err error)

Jump to

Keyboard shortcuts

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