queries

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2024 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 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 InsertAddressLogParams

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

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
}

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) GetLatestBlock added in v0.1.1

func (q *Queries) GetLatestBlock(ctx context.Context, contractAddress string) (int64, 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) 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) 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
}

type SetLatestBlockParams added in v0.1.1

type SetLatestBlockParams struct {
	ContractAddress string
	BlockNumber     int64
}

type StagedOriginatorEnvelope

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

Jump to

Keyboard shortcuts

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