model

package
v0.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var CreateTaskTableSQL = `` /* 447-byte string literal not displayed */

Functions

func CreateIndexSQL

func CreateIndexSQL(tableName string, cols []string) []string

func CreateTableSQL

func CreateTableSQL(tableTame string, cols []string) string

Types

type EventBase

type EventBase struct {
	Address     string   `gorm:"address"`
	Topics      []string `gorm:"topics"`
	Data        []byte   `gorm:"data"`
	BlockNumber uint64   `gorm:"blockNumber"`
	TxHash      string   `gorm:"txHash"`
	TxIndex     uint     `gorm:"txIndex"`
	BlockHash   string   `gorm:"blockHash"`
	LogIndex    uint     `gorm:"logIndex"`
	Removed     bool     `gorm:"removed"`
}

type Task

type Task struct {
	ID        uint   `db:"id"`
	Contract  string `db:"contract"`
	Abi       string `db:"abi"`
	ChainId   uint64 `db:"chainId"`
	Rpc       string `db:"rpc"`
	Interval  int64  `db:"interval"` // 区块轮询间隔
	Start     uint64 `db:"start"`
	Current   uint64 `db:"current"`
	Paused    uint   `db:"paused"` // 是否暂停
	DeletedAt int64  `db:"deletedAt"`
	UpdatedAt int64  `db:"updatedAt"`
}

func (*Task) TableName

func (t *Task) TableName(eventName string) string

func (*Task) TableNames

func (t *Task) TableNames() map[string]string

func (*Task) TablePrefix

func (t *Task) TablePrefix() string

Jump to

Keyboard shortcuts

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