view

package
v1.6.12 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2022 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockValidatorsView

type MockValidatorsView struct {
	testify_mock.Mock
}

func (*MockValidatorsView) Count

func (validatorsView *MockValidatorsView) Count() (
	int64,
	error,
)

func (*MockValidatorsView) FindLastBy

func (validatorsView *MockValidatorsView) FindLastBy(
	identity ValidatorIdentity,
) (
	*ValidatorRow,
	error,
)

func (*MockValidatorsView) Insert

func (validatorsView *MockValidatorsView) Insert(row *ValidatorRow) error

func (*MockValidatorsView) ListAll

func (validatorsView *MockValidatorsView) ListAll() (
	[]ValidatorRow,
	error,
)

func (*MockValidatorsView) Update

func (validatorsView *MockValidatorsView) Update(row *ValidatorRow) error

func (*MockValidatorsView) Upsert

func (validatorsView *MockValidatorsView) Upsert(row *ValidatorRow) error

type ValidatorIdentity

type ValidatorIdentity struct {
	MaybeConsensusNodeAddress     *string
	MaybeOperatorAddress          *string
	MaybeInititalDelegatorAddress *string
}

type ValidatorRow

type ValidatorRow struct {
	MaybeId                 *int64 `json:"-"`
	ConsensusNodeAddress    string `json:"consensusNodeAddress"`
	OperatorAddress         string `json:"operatorAddress"`
	InitialDelegatorAddress string `json:"initialDelegatorAddress"`
	TendermintPubkey        string `json:"tendermintPubkey"`
	TendermintAddress       string `json:"tendermintAddress"`
	Moniker                 string `json:"moniker"`
}

type Validators

type Validators interface {
	Upsert(validator *ValidatorRow) error
	Insert(validator *ValidatorRow) error
	Update(validator *ValidatorRow) error
	ListAll() ([]ValidatorRow, error)
	FindLastBy(identity ValidatorIdentity) (*ValidatorRow, error)
	Count() (int64, error)
}

func NewMockValidatorsView

func NewMockValidatorsView() Validators

func NewValidatorsView

func NewValidatorsView(handle *rdb.Handle, tableName string) Validators

type ValidatorsView

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

A generic validator view

func (*ValidatorsView) Count

func (validatorsView *ValidatorsView) Count() (int64, error)

func (*ValidatorsView) FindLastBy

func (validatorsView *ValidatorsView) FindLastBy(identity ValidatorIdentity) (*ValidatorRow, error)

func (*ValidatorsView) Insert

func (validatorsView *ValidatorsView) Insert(validator *ValidatorRow) error

func (*ValidatorsView) ListAll

func (validatorsView *ValidatorsView) ListAll() ([]ValidatorRow, error)

func (*ValidatorsView) Update

func (validatorsView *ValidatorsView) Update(validator *ValidatorRow) error

func (*ValidatorsView) Upsert

func (validatorsView *ValidatorsView) Upsert(validator *ValidatorRow) error

Jump to

Keyboard shortcuts

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