models

package
v0.0.0-...-c40edbd Latest Latest
Warning

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

Go to latest
Published: Mar 21, 2023 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Event

type Event struct {
	ID              int    `json:"id" gorm:"primary_key:true;column:id;auto_increment;not null"`
	EventName       string `json:"eventName" gorm:"column:event_name;uniqueIndex:idx_event_event_name_tx;not null"`
	TransactionHash string `json:"transactionHash" gorm:"column:transaction_hash;uniqueIndex:idx_event_event_name_tx;not null"`
	FromChainId     string `json:"fromChainId" gorm:"column:from_chain_id;not null"`
	CreatedAt       int64  `json:"created_at" gorm:"column:created_at;type:bigint;index:idx_event_created_at;not null"`
}

func (Event) BeforeCreate

func (e Event) BeforeCreate(tx *gorm.DB) (err error)

func (Event) TableName

func (e Event) TableName() string

type Job

type Job struct {
	ID               int    `json:"id" gorm:"primary_key:true;column:id;auto_increment;not null"`
	Listener         string `json:"listener" gorm:"column:listener;index:idx_job_listener_name;not null"`
	SubscriptionName string `json:"subscriptionName" gorm:"column:subscription_name;not null"`
	Type             int    `json:"type" gorm:"column:type;not null"`
	RetryCount       int    `json:"retryCount" gorm:"column:retry_count;not null"`
	Status           string `json:"status" gorm:"column:status;not null"`
	Data             string `json:"data" gorm:"column:data;not null"`
	Transaction      string `json:"transaction" gorm:"column:transaction;index:idx_job_transaction;not null"`
	CreatedAt        int64  `json:"created_at" gorm:"column:created_at;type:bigint;index:idx_job_created_at;not null"`
	FromChainId      string `json:"fromChainId" gorm:"column:from_chain_id;not null"`

	// Method is used to execute function in `callback` job
	Method string `json:"method" gorm:"column:method;not null"`
}

func (Job) BeforeCreate

func (m Job) BeforeCreate(tx *gorm.DB) (err error)

func (Job) TableName

func (m Job) TableName() string

type ProcessedBlock

type ProcessedBlock struct {
	ChainId string `json:"id" gorm:"primary_key:true;column:id;"`
	Block   int64  `json:"block" gorm:"column:block;not null"`
}

func (ProcessedBlock) BeforeCreate

func (m ProcessedBlock) BeforeCreate(tx *gorm.DB) (err error)

func (ProcessedBlock) TableName

func (m ProcessedBlock) TableName() string

Jump to

Keyboard shortcuts

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