model

package
v0.0.0-...-cbb836e Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2023 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTables

func InitTables(db *gorm.DB)

Types

type BlockLog

type BlockLog struct {
	Id         int64
	Chain      string
	BlockHash  string
	ParentHash string
	Height     int64
	BlockTime  int64
	CreateTime int64
}

func (*BlockLog) BeforeCreate

func (l *BlockLog) BeforeCreate() (err error)

func (BlockLog) TableName

func (BlockLog) TableName() string

type EventLog

type EventLog struct {
	Id        int64
	EventName string

	TaskId             int64
	Operator           string
	ExecutableObjectId string
	InputObjectIds     string
	MaxGas             string
	Method             string
	Params             string

	Status       EventStatus
	BlockHash    string
	TxHash       string
	Height       int64
	ConfirmedNum int64
	CreateTime   int64
	UpdateTime   int64
}

func (*EventLog) BeforeCreate

func (l *EventLog) BeforeCreate() (err error)

func (EventLog) TableName

func (EventLog) TableName() string

type EventStatus

type EventStatus int
const (
	EventStatusInit      EventStatus = 0
	EventStatusConfirmed EventStatus = 1
	EventStatusProcessed EventStatus = 2
)

type ExecutionTask

type ExecutionTask struct {
	Id int64

	InvokeTxHash string
	TaskId       int64

	ExecutionObjectId string
	ExecutionUri      string

	InputFiles   string // split by ","
	MaxGas       string
	InvokeMethod string
	Params       string // hex encoded

	// results
	GasUsed         int64
	ExecutionStatus string
	ResultDataUri   string
	LogDataUri      string
	SubmitTxHash    string

	Status     ExecutionTaskStatus
	CreateTime int64
	UpdateTime int64
}

func (*ExecutionTask) BeforeCreate

func (l *ExecutionTask) BeforeCreate() (err error)

func (ExecutionTask) TableName

func (ExecutionTask) TableName() string

type ExecutionTaskStatus

type ExecutionTaskStatus int
const (
	ExecutionTaskStatusStatusInit             ExecutionTaskStatus = 0 // just created by observer
	ExecutionTaskStatusStatusExecuted         ExecutionTaskStatus = 1 // executed by executor
	ExecutionTaskStatusStatusReceiptSubmitted ExecutionTaskStatus = 2 // receipt submitted by sender
)

Jump to

Keyboard shortcuts

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