view

package
v1.7.49 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Block

type Block struct {
	Height                int64                       `json:"blockHeight" fake:"{+int64}"`
	Hash                  string                      `json:"blockHash" fake:"{blockhash}"`
	Time                  utctime.UTCTime             `json:"blockTime" fake:"{utctime}"`
	AppHash               string                      `json:"appHash" fake:"{apphash}"`
	TransactionCount      int                         `json:"transactionCount" fake:"{number:0,2147483647}"`
	CommittedCouncilNodes []BlockCommittedCouncilNode `json:"committedCouncilNodes" fakesize:"3"`
}

type BlockCommittedCouncilNode

type BlockCommittedCouncilNode struct {
	Address    string          `json:"address" fake:"{validatoraddress}"`
	Time       utctime.UTCTime `json:"time" fake:"{utctime}"`
	Signature  string          `json:"signature" fake:"{commitsignature}"`
	IsProposer bool            `json:"isProposer" fake:"{bool}"`
}

type BlockIdentity

type BlockIdentity struct {
	MaybeHeight *int64
	MaybeHash   *string
}

type Blocks

type Blocks struct {
	// contains filtered or unexported fields
}

Block projection view implemented by relational database

func NewBlocks

func NewBlocks(handle *rdb.Handle) *Blocks

func (*Blocks) Count

func (blocksView *Blocks) Count() (int64, error)

func (*Blocks) FindBy

func (blocksView *Blocks) FindBy(identity *BlockIdentity) (*Block, error)

func (*Blocks) Insert

func (blocksView *Blocks) Insert(block *Block) error

func (*Blocks) List

func (blocksView *Blocks) List(order BlocksListOrder, pagination *pagination.Pagination) ([]Block, *pagination.PaginationResult, error)

func (*Blocks) Search

func (blocksView *Blocks) Search(
	keyword string,
) ([]Block, error)

type BlocksListOrder

type BlocksListOrder struct {
	Height view.ORDER
}

type RdbBlockCommittedCouncilNode

type RdbBlockCommittedCouncilNode struct {
	Address    string `json:"address"`
	Time       int64  `json:"time"`
	Signature  string `json:"signature"`
	IsProposer bool   `json:"isProposer"`
}

func (*RdbBlockCommittedCouncilNode) ToRaw

Jump to

Keyboard shortcuts

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