models

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2025 License: Apache-2.0 Imports: 1 Imported by: 5 modules, 7 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

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