models

package
v0.0.0-...-a953cbe Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Transaction

type Transaction struct {
	Id                 bson.ObjectId `bson:"_id,omitempty" json:"id"`
	TxId               string        `bson:"txid,omitempty" json:"txid"`
	Amount             int           `bson:"amount,omitempty" json:"amount"`
	AmountWithoutCents float64       `bson:"amount_without_cents,omitempty" json:"amount_without_cents"`
	Timestamp          int           `bson:"timestamp,omitempty" json:"timestamp"`
	TimeLimit          int           `bson:"time_limit,omitempty" json:"timelimit"`
	Late               bool          `bson:"late,omitempty" json:"late"`
	VerifyingKey       string        `bson:"-" json:"verifying_key"`
	SigningKey         string        `bson:"-" json:"signing_key"`
	UserTel            string        `bson:"user_tel,omitempty" json:"user_tel"`
}

func (*Transaction) IsLate

func (t *Transaction) IsLate() bool

func (*Transaction) SetAmountWithoutCents

func (t *Transaction) SetAmountWithoutCents()

func (*Transaction) SetLate

func (t *Transaction) SetLate()

func (*Transaction) SetTimeLimit

func (t *Transaction) SetTimeLimit(days int)

type User

type User struct {
	FullName     string `bson:"full_name,omitempty" json:"full_name"`
	Tel          string `bson:"tel,omitempty" json:"tel"`
	VerifyingKey string `bson:"verifying_key,omitempty" json:"verifying_key"`
	SigningKey   string `bson:"signing_key,omitempty" json:"signing_key"`
}

func (*User) Fill

func (u *User) Fill()

func (*User) SetRandomName

func (u *User) SetRandomName()

func (*User) SetRandomSigningKey

func (u *User) SetRandomSigningKey()

func (*User) SetRandomTel

func (u *User) SetRandomTel()

func (*User) SetRandomVerifyingKey

func (u *User) SetRandomVerifyingKey()

Jump to

Keyboard shortcuts

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