mysql

package
v0.0.0-...-f5db1f5 Latest Latest
Warning

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

Go to latest
Published: May 7, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TAddress = reflect.TypeOf(&types.Address{})
View Source
var TMessage = reflect.TypeOf(&types.Message{})
View Source
var TMysqlAddress = reflect.TypeOf(&mysqlAddress{})
View Source
var TMysqlMessage = reflect.TypeOf(&mysqlMessage{})
View Source
var TMysqlNode = reflect.TypeOf(&mysqlNode{})
View Source
var TMysqlSharedParams = reflect.TypeOf(&mysqlSharedParams{})
View Source
var TMysqlWallet = reflect.TypeOf(&mysqlWallet{})
View Source
var TMysqlWalletAddress = reflect.TypeOf(&mysqlWalletAddress{})
View Source
var TNode = reflect.TypeOf(&types.Node{})
View Source
var TSharedParams = reflect.TypeOf(&types.SharedParams{})
View Source
var TWallet = reflect.TypeOf(&types.Wallet{})
View Source
var TWalletAddress = reflect.TypeOf(&types.WalletAddress{})

Functions

func FromAddress

func FromAddress(addr *types.Address) *mysqlAddress

func FromMessage

func FromMessage(srcMsg *types.Message) *mysqlMessage

func FromNode

func FromNode(node *types.Node) *mysqlNode

func FromSharedParams

func FromSharedParams(sp types.SharedParams) *mysqlSharedParams

func FromWallet

func FromWallet(msg types.Wallet) *mysqlWallet

func FromWalletAddress

func FromWalletAddress(walletAddr types.WalletAddress) *mysqlWalletAddress

func OpenMysql

func OpenMysql(cfg *config.MySqlConfig) (repo.Repo, error)

Types

type MsgMeta

type MsgMeta struct {
	ExpireEpoch       abi.ChainEpoch `gorm:"column:expire_epoch;type:bigint;"`
	GasOverEstimation float64        `gorm:"column:gas_over_estimation;type:decimal(10,2);"`
	MaxFee            types.Int      `gorm:"column:max_fee;type:varchar(256);"`
	MaxFeeCap         types.Int      `gorm:"column:max_fee_cap;type:varchar(256);"`
}

func FromMeta

func FromMeta(srcMeta *types.MsgMeta) *MsgMeta

func (*MsgMeta) Meta

func (meta *MsgMeta) Meta() *types.MsgMeta

type MysqlRepo

type MysqlRepo struct {
	*gorm.DB
}

func (MysqlRepo) AddressRepo

func (d MysqlRepo) AddressRepo() repo.AddressRepo

func (MysqlRepo) AutoMigrate

func (d MysqlRepo) AutoMigrate() error

func (MysqlRepo) DbClose

func (d MysqlRepo) DbClose() error

func (MysqlRepo) GetDb

func (d MysqlRepo) GetDb() *gorm.DB

func (MysqlRepo) MessageRepo

func (d MysqlRepo) MessageRepo() repo.MessageRepo

func (MysqlRepo) NodeRepo

func (d MysqlRepo) NodeRepo() repo.NodeRepo

func (MysqlRepo) SharedParamsRepo

func (d MysqlRepo) SharedParamsRepo() repo.SharedParamsRepo

func (MysqlRepo) Transaction

func (d MysqlRepo) Transaction(cb func(txRepo repo.TxRepo) error) error

func (MysqlRepo) WalletAddressRepo

func (d MysqlRepo) WalletAddressRepo() repo.WalletAddressRepo

func (MysqlRepo) WalletRepo

func (d MysqlRepo) WalletRepo() repo.WalletRepo

type TxMysqlRepo

type TxMysqlRepo struct {
	*gorm.DB
}

func (*TxMysqlRepo) AddressRepo

func (t *TxMysqlRepo) AddressRepo() repo.AddressRepo

func (*TxMysqlRepo) MessageRepo

func (t *TxMysqlRepo) MessageRepo() repo.MessageRepo

func (*TxMysqlRepo) WalletAddressRepo

func (t *TxMysqlRepo) WalletAddressRepo() repo.WalletAddressRepo

func (*TxMysqlRepo) WalletRepo

func (t *TxMysqlRepo) WalletRepo() repo.WalletRepo

Jump to

Keyboard shortcuts

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