models

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2025 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

MigrateModels contains a list of model objects that should have DB migrations applied

Functions

This section is empty.

Types

type Epoch

type Epoch struct {
	ID uint `gorm:"primarykey"`
	// NOTE: we would normally use this as the primary key, but GORM doesn't
	// like a primary key value of 0
	EpochId       uint64 `gorm:"uniqueIndex"`
	StartSlot     uint64
	Nonce         []byte
	EraId         uint
	SlotLength    uint
	LengthInSlots uint
}

func (Epoch) TableName

func (Epoch) TableName() string

type PParamUpdate

type PParamUpdate struct {
	ID          uint `gorm:"primarykey"`
	GenesisHash []byte
	Cbor        []byte
	AddedSlot   uint64
	Epoch       uint64
}

func (PParamUpdate) TableName

func (PParamUpdate) TableName() string

type PParams

type PParams struct {
	ID        uint `gorm:"primarykey"`
	Cbor      []byte
	AddedSlot uint64
	Epoch     uint64
	EraId     uint
}

func (PParams) TableName

func (PParams) TableName() string

type PoolRegistration

type PoolRegistration struct {
	ID            uint   `gorm:"primarykey"`
	PoolKeyHash   []byte `gorm:"index"`
	VrfKeyHash    []byte
	Pledge        types.Uint64
	Cost          types.Uint64
	Margin        *types.Rat
	Owners        []PoolRegistrationOwner
	Relays        []PoolRegistrationRelay
	MetadataUrl   string
	MetadataHash  []byte
	AddedSlot     uint64
	DepositAmount uint64
}

func (PoolRegistration) TableName

func (PoolRegistration) TableName() string

type PoolRegistrationOwner

type PoolRegistrationOwner struct {
	ID                 uint `gorm:"primarykey"`
	PoolRegistrationID uint
	KeyHash            []byte
}

func (PoolRegistrationOwner) TableName

func (PoolRegistrationOwner) TableName() string

type PoolRegistrationRelay

type PoolRegistrationRelay struct {
	ID                 uint `gorm:"primarykey"`
	PoolRegistrationID uint
	Port               uint
	Ipv4               *net.IP
	Ipv6               *net.IP
	Hostname           string
}

func (PoolRegistrationRelay) TableName

func (PoolRegistrationRelay) TableName() string

type PoolRetirement

type PoolRetirement struct {
	ID          uint   `gorm:"primarykey"`
	PoolKeyHash []byte `gorm:"index"`
	Epoch       uint64
	AddedSlot   uint64
}

func (PoolRetirement) TableName

func (PoolRetirement) TableName() string

type StakeDelegation

type StakeDelegation struct {
	ID          uint   `gorm:"primarykey"`
	StakingKey  []byte `gorm:"index"`
	PoolKeyHash []byte `gorm:"index"`
	AddedSlot   uint64
}

func (StakeDelegation) TableName

func (StakeDelegation) TableName() string

type StakeDeregistration

type StakeDeregistration struct {
	ID         uint   `gorm:"primarykey"`
	StakingKey []byte `gorm:"index"`
	AddedSlot  uint64
}

func (StakeDeregistration) TableName

func (StakeDeregistration) TableName() string

type StakeRegistration

type StakeRegistration struct {
	ID            uint   `gorm:"primarykey"`
	StakingKey    []byte `gorm:"index"`
	AddedSlot     uint64
	DepositAmount uint64
}

func (StakeRegistration) TableName

func (StakeRegistration) TableName() string

type Tip

type Tip struct {
	ID          uint `gorm:"primarykey"`
	Slot        uint64
	Hash        []byte
	BlockNumber uint64
}

func (Tip) TableName

func (Tip) TableName() string

type Utxo

type Utxo struct {
	ID          uint   `gorm:"primarykey"`
	TxId        []byte `gorm:"index:tx_id_output_idx"`
	OutputIdx   uint32 `gorm:"index:tx_id_output_idx"`
	AddedSlot   uint64 `gorm:"index"`
	DeletedSlot uint64 `gorm:"index"`
	PaymentKey  []byte `gorm:"index"`
	StakingKey  []byte `gorm:"index"`
	Cbor        []byte `gorm:"-"` // This is here for convenience but not represented in the metadata DB
}

func (*Utxo) TableName

func (u *Utxo) TableName() string

Jump to

Keyboard shortcuts

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