domain

package
v0.0.0-...-40fc3ee Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2019 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Currency

type Currency struct {
	Abbreviation string `json:"abbreviation" bson:"abbreviation,omitempty"`
	Name         string `json:"name" bson:"name,omitempty"`
	Type         string `json:"type" bson:"type,omitempty"`
}

Currency ...

type Money

type Money struct {
	Currency Currency `json:"currency" bson:"currency,omitempty"`
	Amount   float64  `json:"amount" bson:"amount,omitempty"`
}

Money ...

type Token

type Token struct {
	Type   string  `json:"type" bson:"type,omitempty"`
	Amount int64   `json:"amount" bson:"amount,omitempty"`
	Value  float32 `json:"value" bson:"value,omitempty"`
}

Token ...

type Wallet

type Wallet struct {
	ID           bson.ObjectId `json:"id" bson:"_id,omitempty"`
	UserID       bson.ObjectId `json:"user_id" bson:"user_id,omitempty"`
	Details      string        `json:"details" bson:"details,omitempty"`
	Description  string        `json:"description" bson:"description,omitempty"`
	Type         string        `json:"type" bson:"type,omitempty"`
	Tokens       []Token       `json:"tokens" bson:"tokens,omitempty"`
	Balance      Money         `json:"balance" bson:"balance,omitempty"`
	CreatedOn    time.Time     `json:"created_on" bson:"createdOn,omitempty"`
	ExpiresOn    time.Time     `json:"expires_on" bson:"expiresOn,omitempty"`
	LastAccessed time.Time     `json:"last_accessed" bson:"lastAccessed,omitempty"`
}

Wallet ...

func NewWallet

func NewWallet(userID, details, description, typ, currencyAbbr, currencyName, currencyType, tokenType string,
	balanceAmount float64, tokenVal float32, tokenAmt int64) *Wallet

NewWallet creates a new Wallet!

Jump to

Keyboard shortcuts

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