persistence

package
v0.0.16 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2024 License: GPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BasicMetrics

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

func NewBasicMetrics

func NewBasicMetrics(namespace, driverName string, enabled bool) *BasicMetrics

func (*BasicMetrics) ObserveOperation

func (m *BasicMetrics) ObserveOperation(operation Operation)

func (*BasicMetrics) ObserveOperationError

func (m *BasicMetrics) ObserveOperationError(operation Operation)

type BeaconBadBlob added in v0.0.16

type BeaconBadBlob struct {
	gorm.Model
	ID   string `gorm:"primaryKey"`
	Node string `gorm:"index"`
	// We have to use int64 here as SQLite doesn't support uint64. This sucks
	// but slot 9223372036854775808 is probably around the heat death
	// of the universe so we should be OK.
	Slot                 int64 `gorm:"where:deleted_at IS NULL"`
	Epoch                int64
	BlockRoot            string
	FetchedAt            time.Time `gorm:"index"`
	BeaconImplementation string
	NodeVersion          string `gorm:"not null;default:''"`
	Location             string `gorm:"not null;default:''"`
	Network              string `gorm:"not null;default:''"`
	Index                int64
}

type BeaconBadBlobFilter added in v0.0.16

type BeaconBadBlobFilter struct {
	ID                   *string
	Node                 *string
	Before               *time.Time
	After                *time.Time
	Slot                 *uint64
	Epoch                *uint64
	BlockRoot            *string
	NodeVersion          *string
	Location             *string
	Network              *string
	BeaconImplementation *string
	Index                *uint64
}

func (*BeaconBadBlobFilter) AddAfter added in v0.0.16

func (f *BeaconBadBlobFilter) AddAfter(after time.Time)

func (*BeaconBadBlobFilter) AddBeaconImplementation added in v0.0.16

func (f *BeaconBadBlobFilter) AddBeaconImplementation(beaconImplementation string)

func (*BeaconBadBlobFilter) AddBefore added in v0.0.16

func (f *BeaconBadBlobFilter) AddBefore(before time.Time)

func (*BeaconBadBlobFilter) AddBlockRoot added in v0.0.16

func (f *BeaconBadBlobFilter) AddBlockRoot(blockRoot string)

func (*BeaconBadBlobFilter) AddEpoch added in v0.0.16

func (f *BeaconBadBlobFilter) AddEpoch(epoch uint64)

func (*BeaconBadBlobFilter) AddID added in v0.0.16

func (f *BeaconBadBlobFilter) AddID(id string)

func (*BeaconBadBlobFilter) AddIndex added in v0.0.16

func (f *BeaconBadBlobFilter) AddIndex(index uint64)

func (*BeaconBadBlobFilter) AddLocation added in v0.0.16

func (f *BeaconBadBlobFilter) AddLocation(location string)

func (*BeaconBadBlobFilter) AddNetwork added in v0.0.16

func (f *BeaconBadBlobFilter) AddNetwork(network string)

func (*BeaconBadBlobFilter) AddNode added in v0.0.16

func (f *BeaconBadBlobFilter) AddNode(node string)

func (*BeaconBadBlobFilter) AddNodeVersion added in v0.0.16

func (f *BeaconBadBlobFilter) AddNodeVersion(nodeVersion string)

func (*BeaconBadBlobFilter) AddSlot added in v0.0.16

func (f *BeaconBadBlobFilter) AddSlot(slot uint64)

func (*BeaconBadBlobFilter) ApplyToQuery added in v0.0.16

func (f *BeaconBadBlobFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)

func (*BeaconBadBlobFilter) Validate added in v0.0.16

func (f *BeaconBadBlobFilter) Validate() error

type BeaconBadBlock added in v0.0.16

type BeaconBadBlock struct {
	gorm.Model
	ID   string `gorm:"primaryKey"`
	Node string `gorm:"index"`
	// We have to use int64 here as SQLite doesn't support uint64. This sucks
	// but slot 9223372036854775808 is probably around the heat death
	// of the universe so we should be OK.
	Slot                 int64 `gorm:"where:deleted_at IS NULL"`
	Epoch                int64
	BlockRoot            string
	FetchedAt            time.Time `gorm:"index"`
	BeaconImplementation string
	NodeVersion          string `gorm:"not null;default:''"`
	Location             string `gorm:"not null;default:''"`
	Network              string `gorm:"not null;default:''"`
}

type BeaconBadBlockFilter added in v0.0.16

type BeaconBadBlockFilter struct {
	ID                   *string
	Node                 *string
	Before               *time.Time
	After                *time.Time
	Slot                 *uint64
	Epoch                *uint64
	BlockRoot            *string
	NodeVersion          *string
	Location             *string
	Network              *string
	BeaconImplementation *string
}

func (*BeaconBadBlockFilter) AddAfter added in v0.0.16

func (f *BeaconBadBlockFilter) AddAfter(after time.Time)

func (*BeaconBadBlockFilter) AddBeaconImplementation added in v0.0.16

func (f *BeaconBadBlockFilter) AddBeaconImplementation(beaconImplementation string)

func (*BeaconBadBlockFilter) AddBefore added in v0.0.16

func (f *BeaconBadBlockFilter) AddBefore(before time.Time)

func (*BeaconBadBlockFilter) AddBlockRoot added in v0.0.16

func (f *BeaconBadBlockFilter) AddBlockRoot(blockRoot string)

func (*BeaconBadBlockFilter) AddEpoch added in v0.0.16

func (f *BeaconBadBlockFilter) AddEpoch(epoch uint64)

func (*BeaconBadBlockFilter) AddID added in v0.0.16

func (f *BeaconBadBlockFilter) AddID(id string)

func (*BeaconBadBlockFilter) AddLocation added in v0.0.16

func (f *BeaconBadBlockFilter) AddLocation(location string)

func (*BeaconBadBlockFilter) AddNetwork added in v0.0.16

func (f *BeaconBadBlockFilter) AddNetwork(network string)

func (*BeaconBadBlockFilter) AddNode added in v0.0.16

func (f *BeaconBadBlockFilter) AddNode(node string)

func (*BeaconBadBlockFilter) AddNodeVersion added in v0.0.16

func (f *BeaconBadBlockFilter) AddNodeVersion(nodeVersion string)

func (*BeaconBadBlockFilter) AddSlot added in v0.0.16

func (f *BeaconBadBlockFilter) AddSlot(slot uint64)

func (*BeaconBadBlockFilter) ApplyToQuery added in v0.0.16

func (f *BeaconBadBlockFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)

func (*BeaconBadBlockFilter) Validate added in v0.0.16

func (f *BeaconBadBlockFilter) Validate() error

type BeaconBlock added in v0.0.16

type BeaconBlock struct {
	gorm.Model
	ID   string `gorm:"primaryKey"`
	Node string `gorm:"index"`
	// We have to use int64 here as SQLite doesn't support uint64. This sucks
	// but slot 9223372036854775808 is probably around the heat death
	// of the universe so we should be OK.
	Slot                 int64 `gorm:"where:deleted_at IS NULL"`
	Epoch                int64
	BlockRoot            string
	FetchedAt            time.Time `gorm:"index"`
	BeaconImplementation string
	NodeVersion          string `gorm:"not null;default:''"`
	Location             string `gorm:"not null;default:''"`
	Network              string `gorm:"not null;default:''"`
}

type BeaconBlockFilter added in v0.0.16

type BeaconBlockFilter struct {
	ID                   *string
	Node                 *string
	Before               *time.Time
	After                *time.Time
	Slot                 *uint64
	Epoch                *uint64
	BlockRoot            *string
	NodeVersion          *string
	Location             *string
	Network              *string
	BeaconImplementation *string
}

func (*BeaconBlockFilter) AddAfter added in v0.0.16

func (f *BeaconBlockFilter) AddAfter(after time.Time)

func (*BeaconBlockFilter) AddBeaconImplementation added in v0.0.16

func (f *BeaconBlockFilter) AddBeaconImplementation(beaconImplementation string)

func (*BeaconBlockFilter) AddBefore added in v0.0.16

func (f *BeaconBlockFilter) AddBefore(before time.Time)

func (*BeaconBlockFilter) AddBlockRoot added in v0.0.16

func (f *BeaconBlockFilter) AddBlockRoot(blockRoot string)

func (*BeaconBlockFilter) AddEpoch added in v0.0.16

func (f *BeaconBlockFilter) AddEpoch(epoch uint64)

func (*BeaconBlockFilter) AddID added in v0.0.16

func (f *BeaconBlockFilter) AddID(id string)

func (*BeaconBlockFilter) AddLocation added in v0.0.16

func (f *BeaconBlockFilter) AddLocation(location string)

func (*BeaconBlockFilter) AddNetwork added in v0.0.16

func (f *BeaconBlockFilter) AddNetwork(network string)

func (*BeaconBlockFilter) AddNode added in v0.0.16

func (f *BeaconBlockFilter) AddNode(node string)

func (*BeaconBlockFilter) AddNodeVersion added in v0.0.16

func (f *BeaconBlockFilter) AddNodeVersion(nodeVersion string)

func (*BeaconBlockFilter) AddSlot added in v0.0.16

func (f *BeaconBlockFilter) AddSlot(slot uint64)

func (*BeaconBlockFilter) ApplyToQuery added in v0.0.16

func (f *BeaconBlockFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)

func (*BeaconBlockFilter) Validate added in v0.0.16

func (f *BeaconBlockFilter) Validate() error

type BeaconState

type BeaconState struct {
	gorm.Model
	ID   string `gorm:"primaryKey"`
	Node string `gorm:"index"`
	// We have to use int64 here as SQLite doesn't support uint64. This sucks
	// but slot 9223372036854775808 is probably around the heat death
	// of the universe so we should be OK.
	Slot                 int64 `gorm:"index:idx_slot,where:deleted_at IS NULL"`
	Epoch                int64
	StateRoot            string
	FetchedAt            time.Time `gorm:"index"`
	BeaconImplementation string
	NodeVersion          string `gorm:"not null;default:''"`
	Location             string `gorm:"not null;default:''"`
	Network              string `gorm:"not null;default:''"`
}

type BeaconStateFilter

type BeaconStateFilter struct {
	ID                   *string
	Node                 *string
	Before               *time.Time
	After                *time.Time
	Slot                 *uint64
	Epoch                *uint64
	StateRoot            *string
	NodeVersion          *string
	Location             *string
	Network              *string
	BeaconImplementation *string
}

func (*BeaconStateFilter) AddAfter

func (f *BeaconStateFilter) AddAfter(after time.Time)

func (*BeaconStateFilter) AddBeaconImplementation

func (f *BeaconStateFilter) AddBeaconImplementation(beaconImplementation string)

func (*BeaconStateFilter) AddBefore

func (f *BeaconStateFilter) AddBefore(before time.Time)

func (*BeaconStateFilter) AddEpoch

func (f *BeaconStateFilter) AddEpoch(epoch uint64)

func (*BeaconStateFilter) AddID

func (f *BeaconStateFilter) AddID(id string)

func (*BeaconStateFilter) AddLocation

func (f *BeaconStateFilter) AddLocation(location string)

func (*BeaconStateFilter) AddNetwork

func (f *BeaconStateFilter) AddNetwork(network string)

func (*BeaconStateFilter) AddNode

func (f *BeaconStateFilter) AddNode(node string)

func (*BeaconStateFilter) AddNodeVersion

func (f *BeaconStateFilter) AddNodeVersion(nodeVersion string)

func (*BeaconStateFilter) AddSlot

func (f *BeaconStateFilter) AddSlot(slot uint64)

func (*BeaconStateFilter) AddStateRoot

func (f *BeaconStateFilter) AddStateRoot(stateRoot string)

func (*BeaconStateFilter) ApplyToQuery

func (f *BeaconStateFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)

func (*BeaconStateFilter) Validate

func (f *BeaconStateFilter) Validate() error

type Config

type Config struct {
	DSN        string `yaml:"dsn"`
	DriverName string `yaml:"driver_name"`
}

func (*Config) Validate

func (c *Config) Validate() error

type DistinctBeaconBadBlobValueResults added in v0.0.16

type DistinctBeaconBadBlobValueResults struct {
	Node                 []string
	Slot                 []uint64
	Epoch                []uint64
	BlockRoot            []string
	NodeVersion          []string
	Location             []string
	Network              []string
	BeaconImplementation []string
	Index                []uint64
}

type DistinctBeaconBadBlockValueResults added in v0.0.16

type DistinctBeaconBadBlockValueResults struct {
	Node                 []string
	Slot                 []uint64
	Epoch                []uint64
	BlockRoot            []string
	NodeVersion          []string
	Location             []string
	Network              []string
	BeaconImplementation []string
}

type DistinctBeaconBlockValueResults added in v0.0.16

type DistinctBeaconBlockValueResults struct {
	Node                 []string
	Slot                 []uint64
	Epoch                []uint64
	BlockRoot            []string
	NodeVersion          []string
	Location             []string
	Network              []string
	BeaconImplementation []string
}

type DistinctBeaconStateValueResults

type DistinctBeaconStateValueResults struct {
	Node                 []string
	Slot                 []uint64
	Epoch                []uint64
	StateRoot            []string
	NodeVersion          []string
	Location             []string
	Network              []string
	BeaconImplementation []string
}

type DistinctExecutionBadBlockValueResults

type DistinctExecutionBadBlockValueResults struct {
	Node                    []string
	BlockHash               []string
	BlockNumber             []int64
	Location                []string
	Network                 []string
	ExecutionImplementation []string
	NodeVersion             []string
	BlockExtraData          []string
}

type DistinctExecutionBlockTraceValueResults

type DistinctExecutionBlockTraceValueResults struct {
	Node                    []string
	BlockHash               []string
	BlockNumber             []int64
	Location                []string
	Network                 []string
	ExecutionImplementation []string
	NodeVersion             []string
}

type ExecutionBadBlock

type ExecutionBadBlock struct {
	gorm.Model
	ID                      string    `gorm:"primaryKey"`
	Node                    string    `gorm:"index"`
	FetchedAt               time.Time `gorm:"index"`
	ExecutionImplementation string
	NodeVersion             string `gorm:"not null;default:''"`
	Location                string `gorm:"not null;default:''"`
	Network                 string `gorm:"not null;default:''"`
	BlockHash               string `gorm:"not null;default:''"`
	BlockNumber             sql.NullInt64
	BlockExtraData          sql.NullString
}

type ExecutionBadBlockFilter

type ExecutionBadBlockFilter struct {
	ID                      *string
	Node                    *string
	Before                  *time.Time
	After                   *time.Time
	NodeVersion             *string
	Location                *string
	Network                 *string
	ExecutionImplementation *string
	BlockHash               *string
	BlockNumber             *int64
	BlockExtraData          *string
}

func (*ExecutionBadBlockFilter) AddAfter

func (f *ExecutionBadBlockFilter) AddAfter(after time.Time)

func (*ExecutionBadBlockFilter) AddBefore

func (f *ExecutionBadBlockFilter) AddBefore(before time.Time)

func (*ExecutionBadBlockFilter) AddBlockExtraData

func (f *ExecutionBadBlockFilter) AddBlockExtraData(data string)

func (*ExecutionBadBlockFilter) AddBlockHash

func (f *ExecutionBadBlockFilter) AddBlockHash(hash string)

func (*ExecutionBadBlockFilter) AddBlockNumber

func (f *ExecutionBadBlockFilter) AddBlockNumber(number int64)

func (*ExecutionBadBlockFilter) AddExecutionImplementation

func (f *ExecutionBadBlockFilter) AddExecutionImplementation(impl string)

func (*ExecutionBadBlockFilter) AddID

func (f *ExecutionBadBlockFilter) AddID(id string)

func (*ExecutionBadBlockFilter) AddLocation

func (f *ExecutionBadBlockFilter) AddLocation(location string)

func (*ExecutionBadBlockFilter) AddNetwork

func (f *ExecutionBadBlockFilter) AddNetwork(network string)

func (*ExecutionBadBlockFilter) AddNode

func (f *ExecutionBadBlockFilter) AddNode(node string)

func (*ExecutionBadBlockFilter) AddNodeVersion

func (f *ExecutionBadBlockFilter) AddNodeVersion(nodeVersion string)

func (*ExecutionBadBlockFilter) ApplyToQuery

func (f *ExecutionBadBlockFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)

func (*ExecutionBadBlockFilter) Validate

func (f *ExecutionBadBlockFilter) Validate() error

type ExecutionBlockTrace

type ExecutionBlockTrace struct {
	gorm.Model
	ID                      string    `gorm:"primaryKey"`
	Node                    string    `gorm:"index"`
	FetchedAt               time.Time `gorm:"index"`
	ExecutionImplementation string
	NodeVersion             string `gorm:"not null;default:''"`
	Location                string `gorm:"not null;default:''"`
	Network                 string `gorm:"not null;default:''"`
	BlockHash               string `gorm:"not null;default:''"`
	BlockNumber             int64
}

type ExecutionBlockTraceFilter

type ExecutionBlockTraceFilter struct {
	ID                      *string
	Node                    *string
	Before                  *time.Time
	After                   *time.Time
	NodeVersion             *string
	Location                *string
	Network                 *string
	ExecutionImplementation *string
	BlockHash               *string
	BlockNumber             *int64
}

func (*ExecutionBlockTraceFilter) AddAfter

func (f *ExecutionBlockTraceFilter) AddAfter(after time.Time)

func (*ExecutionBlockTraceFilter) AddBefore

func (f *ExecutionBlockTraceFilter) AddBefore(before time.Time)

func (*ExecutionBlockTraceFilter) AddBlockHash

func (f *ExecutionBlockTraceFilter) AddBlockHash(hash string)

func (*ExecutionBlockTraceFilter) AddBlockNumber

func (f *ExecutionBlockTraceFilter) AddBlockNumber(number int64)

func (*ExecutionBlockTraceFilter) AddExecutionImplementation

func (f *ExecutionBlockTraceFilter) AddExecutionImplementation(impl string)

func (*ExecutionBlockTraceFilter) AddID

func (f *ExecutionBlockTraceFilter) AddID(id string)

func (*ExecutionBlockTraceFilter) AddLocation

func (f *ExecutionBlockTraceFilter) AddLocation(location string)

func (*ExecutionBlockTraceFilter) AddNetwork

func (f *ExecutionBlockTraceFilter) AddNetwork(network string)

func (*ExecutionBlockTraceFilter) AddNode

func (f *ExecutionBlockTraceFilter) AddNode(node string)

func (*ExecutionBlockTraceFilter) AddNodeVersion

func (f *ExecutionBlockTraceFilter) AddNodeVersion(nodeVersion string)

func (*ExecutionBlockTraceFilter) ApplyToQuery

func (f *ExecutionBlockTraceFilter) ApplyToQuery(query *gorm.DB) (*gorm.DB, error)

func (*ExecutionBlockTraceFilter) Validate

func (f *ExecutionBlockTraceFilter) Validate() error

type Indexer

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

func NewIndexer

func NewIndexer(namespace string, log logrus.FieldLogger, config Config, opts *Options) (*Indexer, error)

func NewMockIndexer added in v0.0.15

func NewMockIndexer() (*Indexer, sqlmock.Sqlmock, error)

func (*Indexer) CountBeaconBadBlob added in v0.0.16

func (i *Indexer) CountBeaconBadBlob(ctx context.Context, filter *BeaconBadBlobFilter) (int64, error)

func (*Indexer) CountBeaconBadBlock added in v0.0.16

func (i *Indexer) CountBeaconBadBlock(ctx context.Context, filter *BeaconBadBlockFilter) (int64, error)

func (*Indexer) CountBeaconBlock added in v0.0.16

func (i *Indexer) CountBeaconBlock(ctx context.Context, filter *BeaconBlockFilter) (int64, error)

func (*Indexer) CountBeaconState

func (i *Indexer) CountBeaconState(ctx context.Context, filter *BeaconStateFilter) (int64, error)

func (*Indexer) CountExecutionBadBlock

func (i *Indexer) CountExecutionBadBlock(ctx context.Context, filter *ExecutionBadBlockFilter) (int64, error)

func (*Indexer) CountExecutionBlockTrace

func (i *Indexer) CountExecutionBlockTrace(ctx context.Context, filter *ExecutionBlockTraceFilter) (int64, error)

func (*Indexer) DeleteBeaconBadBlob added in v0.0.16

func (i *Indexer) DeleteBeaconBadBlob(ctx context.Context, id string) error

func (*Indexer) DeleteBeaconBadBlock added in v0.0.16

func (i *Indexer) DeleteBeaconBadBlock(ctx context.Context, id string) error

func (*Indexer) DeleteBeaconBlock added in v0.0.16

func (i *Indexer) DeleteBeaconBlock(ctx context.Context, id string) error

func (*Indexer) DeleteBeaconState

func (i *Indexer) DeleteBeaconState(ctx context.Context, id string) error

func (*Indexer) DeleteExecutionBadBlock

func (i *Indexer) DeleteExecutionBadBlock(ctx context.Context, id string) error

func (*Indexer) DeleteExecutionBlockTrace

func (i *Indexer) DeleteExecutionBlockTrace(ctx context.Context, id string) error

func (*Indexer) DistinctBeaconBadBlobValues added in v0.0.16

func (i *Indexer) DistinctBeaconBadBlobValues(ctx context.Context, fields []string) (*DistinctBeaconBadBlobValueResults, error)

func (*Indexer) DistinctBeaconBadBlockValues added in v0.0.16

func (i *Indexer) DistinctBeaconBadBlockValues(ctx context.Context, fields []string) (*DistinctBeaconBadBlockValueResults, error)

func (*Indexer) DistinctBeaconBlockValues added in v0.0.16

func (i *Indexer) DistinctBeaconBlockValues(ctx context.Context, fields []string) (*DistinctBeaconBlockValueResults, error)

func (*Indexer) DistinctBeaconStateValues

func (i *Indexer) DistinctBeaconStateValues(ctx context.Context, fields []string) (*DistinctBeaconStateValueResults, error)

func (*Indexer) DistinctExecutionBadBlockValues

func (i *Indexer) DistinctExecutionBadBlockValues(ctx context.Context, fields []string) (*DistinctExecutionBadBlockValueResults, error)

func (*Indexer) DistinctExecutionBlockTraceValues

func (i *Indexer) DistinctExecutionBlockTraceValues(ctx context.Context, fields []string) (*DistinctExecutionBlockTraceValueResults, error)

func (*Indexer) InsertBeaconBadBlob added in v0.0.16

func (i *Indexer) InsertBeaconBadBlob(ctx context.Context, blob *BeaconBadBlob) error

func (*Indexer) InsertBeaconBadBlock added in v0.0.16

func (i *Indexer) InsertBeaconBadBlock(ctx context.Context, block *BeaconBadBlock) error

func (*Indexer) InsertBeaconBlock added in v0.0.16

func (i *Indexer) InsertBeaconBlock(ctx context.Context, block *BeaconBlock) error

func (*Indexer) InsertBeaconState

func (i *Indexer) InsertBeaconState(ctx context.Context, state *BeaconState) error

func (*Indexer) InsertExecutionBadBlock

func (i *Indexer) InsertExecutionBadBlock(ctx context.Context, trace *ExecutionBadBlock) error

func (*Indexer) InsertExecutionBlockTrace

func (i *Indexer) InsertExecutionBlockTrace(ctx context.Context, trace *ExecutionBlockTrace) error

func (*Indexer) ListBeaconBadBlob added in v0.0.16

func (i *Indexer) ListBeaconBadBlob(ctx context.Context, filter *BeaconBadBlobFilter, page *PaginationCursor) ([]*BeaconBadBlob, error)

func (*Indexer) ListBeaconBadBlock added in v0.0.16

func (i *Indexer) ListBeaconBadBlock(ctx context.Context, filter *BeaconBadBlockFilter, page *PaginationCursor) ([]*BeaconBadBlock, error)

func (*Indexer) ListBeaconBlock added in v0.0.16

func (i *Indexer) ListBeaconBlock(ctx context.Context, filter *BeaconBlockFilter, page *PaginationCursor) ([]*BeaconBlock, error)

func (*Indexer) ListBeaconState

func (i *Indexer) ListBeaconState(ctx context.Context, filter *BeaconStateFilter, page *PaginationCursor) ([]*BeaconState, error)

func (*Indexer) ListExecutionBadBlock

func (i *Indexer) ListExecutionBadBlock(ctx context.Context, filter *ExecutionBadBlockFilter, page *PaginationCursor) ([]*ExecutionBadBlock, error)

func (*Indexer) ListExecutionBlockTrace

func (i *Indexer) ListExecutionBlockTrace(ctx context.Context, filter *ExecutionBlockTraceFilter, page *PaginationCursor) ([]*ExecutionBlockTrace, error)

func (*Indexer) RemoveBeaconBadBlob added in v0.0.16

func (i *Indexer) RemoveBeaconBadBlob(ctx context.Context, id string) error

func (*Indexer) RemoveBeaconBadBlock added in v0.0.16

func (i *Indexer) RemoveBeaconBadBlock(ctx context.Context, id string) error

func (*Indexer) RemoveBeaconBlock added in v0.0.16

func (i *Indexer) RemoveBeaconBlock(ctx context.Context, id string) error

func (*Indexer) RemoveBeaconState

func (i *Indexer) RemoveBeaconState(ctx context.Context, id string) error

func (*Indexer) Start

func (i *Indexer) Start(ctx context.Context) error

func (*Indexer) Stop

func (i *Indexer) Stop(ctx context.Context) error

func (*Indexer) UpdateBeaconBadBlob added in v0.0.16

func (i *Indexer) UpdateBeaconBadBlob(ctx context.Context, blob *BeaconBadBlob) error

func (*Indexer) UpdateBeaconBadBlock added in v0.0.16

func (i *Indexer) UpdateBeaconBadBlock(ctx context.Context, block *BeaconBadBlock) error

func (*Indexer) UpdateBeaconBlock added in v0.0.16

func (i *Indexer) UpdateBeaconBlock(ctx context.Context, block *BeaconBlock) error

func (*Indexer) UpdateBeaconState

func (i *Indexer) UpdateBeaconState(ctx context.Context, state *BeaconState) error

type Operation

type Operation string
const (
	OperationDistinctValues Operation = "distinct_values"

	OperationInsertBeaconState Operation = "insert_beacon_state_metadata"
	OperationDeleteBeaconState Operation = "delete_beacon_state_metadata"
	OperationCountBeaconState  Operation = "count_beacon_state_metadata"
	OperationListBeaconState   Operation = "list_beacon_state_metadata"
	OperationUpdateBeaconState Operation = "update_beacon_state_metadata"

	OperationInsertBeaconBlock Operation = "insert_beacon_block_metadata"
	OperationDeleteBeaconBlock Operation = "delete_beacon_block_metadata"
	OperationCountBeaconBlock  Operation = "count_beacon_block_metadata"
	OperationListBeaconBlock   Operation = "list_beacon_block_metadata"
	OperationUpdateBeaconBlock Operation = "update_beacon_block_metadata"

	OperationInsertBeaconBadBlock Operation = "insert_beacon_bad_block_metadata"
	OperationDeleteBeaconBadBlock Operation = "delete_beacon_bad_block_metadata"
	OperationCountBeaconBadBlock  Operation = "count_beacon_bad_block_metadata"
	OperationListBeaconBadBlock   Operation = "list_beacon_bad_block_metadata"
	OperationUpdateBeaconBadBlock Operation = "update_beacon_bad_block_metadata"

	OperationInsertBeaconBadBlob Operation = "insert_beacon_bad_blob_metadata"
	OperationDeleteBeaconBadBlob Operation = "delete_beacon_bad_blob_metadata"
	OperationCountBeaconBadBlob  Operation = "count_beacon_bad_blob_metadata"
	OperationListBeaconBadBlob   Operation = "list_beacon_bad_blob_metadata"
	OperationUpdateBeaconBadBlob Operation = "update_beacon_bad_blob_metadata"

	OperationInsertExecutionBlockTrace Operation = "insert_execution_block_trace"
	OperationDeleteExecutionBlockTrace Operation = "delete_execution_block_trace"
	OperationCountExecutionBlockTrace  Operation = "count_execution_block_trace"
	OperationListExecutionBlockTrace   Operation = "list_execution_block_trace"
	OperationUpdateExecutionBlockTrace Operation = "update_execution_block_trace"

	OperationInsertExecutionBadBlock Operation = "insert_execution_bad_block"
	OperationDeleteExecutionBadBlock Operation = "delete_execution_bad_block"
	OperationCountExecutionBadBlock  Operation = "count_execution_bad_block"
	OperationListExecutionBadBlock   Operation = "list_execution_bad_block"
	OperationUpdateExecutionBadBlock Operation = "update_execution_bad_block"
)

type Options added in v0.0.15

type Options struct {
	MetricsEnabled bool
}

func DefaultOptions added in v0.0.15

func DefaultOptions() *Options

func (*Options) SetMetricsEnabled added in v0.0.15

func (o *Options) SetMetricsEnabled(enabled bool) *Options

func (*Options) Validate added in v0.0.15

func (o *Options) Validate() error

func (*Options) WithMetricsDisabled added in v0.0.15

func (o *Options) WithMetricsDisabled() *Options

func (*Options) WithMetricsEnabled added in v0.0.15

func (o *Options) WithMetricsEnabled() *Options

type PaginationCursor

type PaginationCursor struct {
	// The cursor to start from.
	Offset int `json:"offset"`
	// The number of items to return.
	Limit int `json:"limit"`
	// OrderBy is the column to order by.
	OrderBy string `json:"order_by"`
}

func (*PaginationCursor) ApplyOffsetLimit

func (p *PaginationCursor) ApplyOffsetLimit(query *gorm.DB) *gorm.DB

func (*PaginationCursor) ApplyOrderBy

func (p *PaginationCursor) ApplyOrderBy(query *gorm.DB) *gorm.DB

func (*PaginationCursor) Validate

func (p *PaginationCursor) Validate() error

Jump to

Keyboard shortcuts

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