bank

package
v0.0.0-...-8f95268 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2023 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PseudoAccount = "c1e395d9-8c00-4124-819a-85b0402900cf"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Account

type Account struct {
	ID        int    `db:"id"`
	AccountID string `db:"accountID"`
	Balance   int64  `db:"balance"`
}

type Action

type Action int32
const (
	Action_UNKNOWN_ACTION Action = 0
	Action_INCREASE       Action = 1
	Action_DECREASE       Action = 2
)

type Dealing

type Dealing struct {
	FromAccountID string
	ToAccountID   string
	Amount        int64
}

func (*Dealing) IsValid

func (d *Dealing) IsValid() bool

type Transaction

type Transaction struct {
	AccountID   string `db:"accountID"`
	Action      Action `db:"action"`
	Amount      int64  `db:"amount"`
	TimestampMs int64  `db:"timeMs"`
	TradeID     string `db:"tradeID"`
}

Jump to

Keyboard shortcuts

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