view

package
v1.3.13 Latest Latest
Warning

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

Go to latest
Published: Mar 28, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AccountIdentity

type AccountIdentity struct {
	Address string
}

type AccountRow

type AccountRow struct {
	Address        string     `json:"address"`
	Type           string     `json:"type"`
	MaybeName      *string    `json:"name"`
	MaybePubkey    *string    `json:"pubkey"`
	AccountNumber  string     `json:"accountNumber"`
	SequenceNumber string     `json:"sequenceNumber"`
	Balance        coin.Coins `json:"balance"`
}

type Accounts

func NewAccountsView

func NewAccountsView(handle *rdb.Handle) Accounts

func NewMockAccountsView

func NewMockAccountsView(_ *rdb.Handle) Accounts

type AccountsListOrder

type AccountsListOrder struct {
	AccountAddress view.ORDER
}

type AccountsView

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

func (*AccountsView) FindBy

func (accountsView *AccountsView) FindBy(identity *AccountIdentity) (*AccountRow, error)

func (*AccountsView) List

func (accountsView *AccountsView) List(
	order AccountsListOrder,
	pagination *pagination.Pagination,
) ([]AccountRow, *pagination.PaginationResult, error)

func (*AccountsView) Upsert

func (accountsView *AccountsView) Upsert(account *AccountRow) error

type MockAccountsView

type MockAccountsView struct {
	mock.Mock
}

func (*MockAccountsView) FindBy

func (accountsView *MockAccountsView) FindBy(identity *AccountIdentity) (*AccountRow, error)

func (*MockAccountsView) List

func (accountsView *MockAccountsView) List(
	order AccountsListOrder,
	paginate *pagination.Pagination,
) ([]AccountRow, *pagination.PaginationResult, error)

func (*MockAccountsView) Upsert

func (accountsView *MockAccountsView) Upsert(account *AccountRow) error

Jump to

Keyboard shortcuts

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