queries

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddressLog

type AddressLog struct {
	Address               string
	InboxID               []byte
	AssociationSequenceID sql.NullInt64
	RevocationSequenceID  sql.NullInt64
}

type BlockchainMessage added in v0.2.0

type BlockchainMessage struct {
	BlockNumber          uint64
	BlockHash            []byte
	OriginatorNodeID     int32
	OriginatorSequenceID int64
	IsCanonical          bool
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type GatewayEnvelope

type GatewayEnvelope struct {
	GatewayTime          time.Time
	OriginatorNodeID     int32
	OriginatorSequenceID int64
	Topic                []byte
	OriginatorEnvelope   []byte
}

type GetAddressLogsRow

type GetAddressLogsRow struct {
	Address               string
	InboxID               string
	AssociationSequenceID sql.NullInt64
}

type GetBlocksInRangeParams added in v0.2.0

type GetBlocksInRangeParams struct {
	StartBlock uint64
	EndBlock   uint64
}

type GetBlocksInRangeRow added in v0.2.0

type GetBlocksInRangeRow struct {
	BlockNumber uint64
	BlockHash   []byte
}

type GetLatestBlockRow added in v0.2.0

type GetLatestBlockRow struct {
	BlockNumber int64
	BlockHash   []byte
}

type GetLatestCursorRow added in v0.2.0

type GetLatestCursorRow struct {
	OriginatorNodeID int32
	MaxSequenceID    int64
}

type InsertAddressLogParams

type InsertAddressLogParams struct {
	Address               string
	InboxID               string
	AssociationSequenceID sql.NullInt64
}

type InsertBlockchainMessageParams added in v0.2.0

type InsertBlockchainMessageParams struct {
	BlockNumber          uint64
	BlockHash            []byte
	OriginatorNodeID     int32
	OriginatorSequenceID int64
	IsCanonical          bool
}

type InsertGatewayEnvelopeParams

type InsertGatewayEnvelopeParams struct {
	OriginatorNodeID     int32
	OriginatorSequenceID int64
	Topic                []byte
	OriginatorEnvelope   []byte
}

type InsertNodeInfoParams

type InsertNodeInfoParams struct {
	NodeID    int32
	PublicKey []byte
}

type InsertStagedOriginatorEnvelopeParams

type InsertStagedOriginatorEnvelopeParams struct {
	Topic         []byte
	PayerEnvelope []byte
}

type LatestBlock added in v0.1.1

type LatestBlock struct {
	ContractAddress string
	BlockNumber     int64
	BlockHash       []byte
}

type NodeInfo

type NodeInfo struct {
	NodeID      int32
	PublicKey   []byte
	SingletonID int16
}

type Queries

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

func New

func New(db DBTX) *Queries

func (*Queries) DeleteStagedOriginatorEnvelope

func (q *Queries) DeleteStagedOriginatorEnvelope(ctx context.Context, id int64) (int64, error)

func (*Queries) GetAddressLogs

func (q *Queries) GetAddressLogs(ctx context.Context, addresses []string) ([]GetAddressLogsRow, error)

func (*Queries) GetBlocksInRange added in v0.2.0

func (q *Queries) GetBlocksInRange(ctx context.Context, arg GetBlocksInRangeParams) ([]GetBlocksInRangeRow, error)

Returns blocks in ascending order (oldest to newest) StartBlock should be the lower bound (older block) EndBlock should be the upper bound (newer block) Example: GetBlocksInRange(1000, 2000), returns 1000, 1001, 1002, ..., 2000

func (*Queries) GetLatestBlock added in v0.1.1

func (q *Queries) GetLatestBlock(ctx context.Context, contractAddress string) (GetLatestBlockRow, error)

func (*Queries) GetLatestCursor added in v0.2.0

func (q *Queries) GetLatestCursor(ctx context.Context) ([]GetLatestCursorRow, error)

func (*Queries) GetLatestSequenceId

func (q *Queries) GetLatestSequenceId(ctx context.Context, originatorNodeID int32) (int64, error)

func (*Queries) InsertAddressLog

func (q *Queries) InsertAddressLog(ctx context.Context, arg InsertAddressLogParams) (int64, error)

func (*Queries) InsertBlockchainMessage added in v0.2.0

func (q *Queries) InsertBlockchainMessage(ctx context.Context, arg InsertBlockchainMessageParams) error

func (*Queries) InsertGatewayEnvelope

func (q *Queries) InsertGatewayEnvelope(ctx context.Context, arg InsertGatewayEnvelopeParams) (int64, error)

func (*Queries) InsertNodeInfo

func (q *Queries) InsertNodeInfo(ctx context.Context, arg InsertNodeInfoParams) (int64, error)

func (*Queries) InsertStagedOriginatorEnvelope

func (q *Queries) InsertStagedOriginatorEnvelope(ctx context.Context, arg InsertStagedOriginatorEnvelopeParams) (StagedOriginatorEnvelope, error)

func (*Queries) RevokeAddressFromLog

func (q *Queries) RevokeAddressFromLog(ctx context.Context, arg RevokeAddressFromLogParams) (int64, error)

func (*Queries) SelectGatewayEnvelopes

func (q *Queries) SelectGatewayEnvelopes(ctx context.Context, arg SelectGatewayEnvelopesParams) ([]GatewayEnvelope, error)

func (*Queries) SelectNodeInfo

func (q *Queries) SelectNodeInfo(ctx context.Context) (NodeInfo, error)

func (*Queries) SelectStagedOriginatorEnvelopes

func (q *Queries) SelectStagedOriginatorEnvelopes(ctx context.Context, arg SelectStagedOriginatorEnvelopesParams) ([]StagedOriginatorEnvelope, error)

func (*Queries) SelectVectorClock

func (q *Queries) SelectVectorClock(ctx context.Context) ([]SelectVectorClockRow, error)

func (*Queries) SetLatestBlock added in v0.1.1

func (q *Queries) SetLatestBlock(ctx context.Context, arg SetLatestBlockParams) error

func (*Queries) UpdateBlocksCanonicalityInRange added in v0.2.0

func (q *Queries) UpdateBlocksCanonicalityInRange(ctx context.Context, arg UpdateBlocksCanonicalityInRangeParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type RevokeAddressFromLogParams

type RevokeAddressFromLogParams struct {
	RevocationSequenceID sql.NullInt64
	Address              string
	InboxID              string
}

type SelectGatewayEnvelopesParams

type SelectGatewayEnvelopesParams struct {
	CursorNodeIds     []int32
	CursorSequenceIds []int64
	Topics            [][]byte
	OriginatorNodeIds []int32
	RowLimit          int32
}

type SelectStagedOriginatorEnvelopesParams

type SelectStagedOriginatorEnvelopesParams struct {
	LastSeenID int64
	NumRows    int32
}

type SelectVectorClockRow

type SelectVectorClockRow struct {
	OriginatorNodeID     int32
	OriginatorSequenceID int64
	OriginatorEnvelope   []byte
}

type SetLatestBlockParams added in v0.1.1

type SetLatestBlockParams struct {
	ContractAddress string
	BlockNumber     int64
	BlockHash       []byte
}

type StagedOriginatorEnvelope

type StagedOriginatorEnvelope struct {
	ID             int64
	OriginatorTime time.Time
	Topic          []byte
	PayerEnvelope  []byte
}

type UpdateBlocksCanonicalityInRangeParams added in v0.2.0

type UpdateBlocksCanonicalityInRangeParams struct {
	StartBlockNumber uint64
	EndBlockNumber   uint64
}

Jump to

Keyboard shortcuts

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