dao

package
v0.0.0-...-188077f Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDatabase

func ConnectDatabase() error

ConnectDatabase connect database

func DB

func DB() *gorm.DB

DB export db

func Transaction

func Transaction() *gorm.DB

Transaction begin transaction

Types

type DropRecord

type DropRecord struct {
	gorm.Model

	EndEpoch     uint64
	DelegateName string `gorm:"type:varchar(100)"`
	Voter        string `gorm:"type:varchar(41)"`
	Index        uint64
	Amount       string `gorm:"type:varchar(50)"`
	Status       string `gorm:"type:varchar(15);index:idx_drop_records_status"`
	Hash         string `gorm:"type:varchar(64)"`
	Signature    string `gorm:"type:text"`
	ErrorMessage string `gorm:"type:text"`
}

DropRecord drop record model

func FindNewDropRecordByLimit

func FindNewDropRecordByLimit(limit int32) (result []DropRecord, err error)

FindNewDropRecordByLimit find by limit

func (DropRecord) Save

func (t DropRecord) Save(tx *gorm.DB) error

Save insert or update drop record

func (DropRecord) TableName

func (DropRecord) TableName() string

TableName table name of DropRecord

func (*DropRecord) Verify

func (t *DropRecord) Verify() error

Verify verify signature

Jump to

Keyboard shortcuts

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