model

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Feb 21, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LimitStringField

func LimitStringField(s string, maxRunes uint) string

LimitStringField crops string

Types

type Deposit

type Deposit struct {
	ID           uint64    `gorm:"PRIMARY_KEY;AUTO_INCREMENT:true"`
	Status       uint8     `gorm:"NOT NULL"`
	StatusString string    `gorm:"SIZE:16;NOT NULL"`
	Src          []byte    `gorm:"SIZE:32;NOT NULL"`
	Tx           []byte    `gorm:"SIZE:32;NOT NULL"`
	Dst          []byte    `gorm:"SIZE:20;NOT NULL"`
	Token        string    `gorm:"SIZE:4;NOT NULL"`
	Amount       string    `gorm:"NOT NULL" sql:"TYPE:decimal(30,18)"`
	NextCheckAt  time.Time `gorm:"NOT NULL;DEFAULT:current_timestamp"`
}

Deposit model

func (*Deposit) From

func (d *Deposit) From(t *types.Deposit) error

From mapping

func (*Deposit) To

func (d *Deposit) To() (*types.Deposit, error)

To mapping

type Setting

type Setting struct {
	Key   string `gorm:"PRIMARY_KEY;NOT NULL"`
	Value string `gorm:"SIZE:1024;NOT NULL"`
}

Setting model

type Wallet

type Wallet struct {
	User     []byte `gorm:"SIZE:32;PRIMARY_KEY;NOT NULL;"`
	Ethereum []byte `gorm:"SIZE:20;NOT NULL"`
}

Wallet model

func (*Wallet) From

func (w *Wallet) From(t *types.Wallet) error

From mapping

func (*Wallet) To

func (w *Wallet) To() (*types.Wallet, error)

To mapping

Jump to

Keyboard shortcuts

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