Documentation ¶
Index ¶
Constants ¶
View Source
const ( StatusPublished = iota StatusReceived )
View Source
const (
TableName = `block_witness`
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockWitness ¶
type BlockWitness struct { gorm.Model Height int64 `gorm:"index:idx_height,unique"` WitnessData string Status int64 }
func (*BlockWitness) TableName ¶
func (*BlockWitness) TableName() string
type BlockWitnessModel ¶
type BlockWitnessModel interface { CreateBlockWitnessTable() error DropBlockWitnessTable() error GetLatestBlockWitnessHeight() (height int64, err error) GetBlockWitnessByHeight(height int64) (witness *BlockWitness, err error) UpdateBlockWitnessStatus(witness *BlockWitness, status int64) error GetLatestBlockWitness() (witness *BlockWitness, err error) CreateBlockWitness(witness *BlockWitness) error }
func NewBlockWitnessModel ¶
func NewBlockWitnessModel(db *gorm.DB) BlockWitnessModel
Click to show internal directories.
Click to hide internal directories.