view

package
v1.3.24 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2022 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BondedToken

type BondedToken struct {
	Denom  string   `json:"denom"`
	Amount coin.Int `json:"amount"`
}

func NewBondedToken

func NewBondedToken(denom string, amount coin.Int) *BondedToken

type BondedTokens

type BondedTokens struct {
	OnThisChain         []BondedToken `json:"onThisChain"`
	OnCounterpartyChain []BondedToken `json:"onCounterpartyChain"`
}

OnThisChain: keep track of tokens from counterparty chain transferring to this chain OnCounterpartyChain: keep track of tokens from this chain transferring to counterparty chain

func NewEmptyBondedTokens

func NewEmptyBondedTokens() *BondedTokens

type ChainChannels

type ChainChannels struct {
	ChainID  string          `json:"chainId"`
	Channels []IBCChannelRow `json:"channels"`
}

type IBCChainID

type IBCChainID string

type IBCChannelRow

type IBCChannelRow struct {
	ChannelID                 string          `json:"channelId"`
	PortID                    string          `json:"portId"`
	ConnectionID              string          `json:"connectionId"`
	CounterpartyChannelID     string          `json:"counterpartyChannelId"`
	CounterpartyPortID        string          `json:"counterpartyPortId"`
	CounterpartyChainID       string          `json:"counterpartyChainId"`
	Status                    string          `json:"status"`
	PacketOrdering            string          `json:"packetOrdering"`
	LastInPacketSequence      int64           `json:"lastInPacketSequence"`
	LastOutPacketSequence     int64           `json:"lastOutPacketSequence"`
	TotalRelayInCount         int64           `json:"totalRelayInCount"`
	TotalRelayOutCount        int64           `json:"totalRelayOutCount"`
	TotalRelayOutSuccessCount int64           `json:"totalRelayOutSuccessCount"`
	TotalRelayOutSuccessRate  float64         `json:"totalRelayOutSuccessRate"`
	CreatedAtBlockTime        utctime.UTCTime `json:"createdAtBlockTime"`
	CreatedAtBlockHeight      int64           `json:"createdAtBlockHeight"`
	Verified                  bool            `json:"verified"`
	Description               string          `json:"description"`
	LastActivityBlockTime     utctime.UTCTime `json:"lastActivityBlockTime"`
	LastActivityBlockHeight   int64           `json:"lastActivityBlockHeight"`
	BondedTokens              BondedTokens    `json:"bondedTokens"`
}

type IBCChannelTraceRow

type IBCChannelTraceRow struct {
	ChannelID           string `json:"channelId"`
	BlockHeight         int64  `json:"blockHeight"`
	SourceChannel       string `json:"sourceChannel"`
	DestinationChannel  string `json:"destinationChannel"`
	Denom               string `json:"denom"`
	Amount              string `json:"amount"`
	Success             string `json:"success"`
	Error               string `json:"error"`
	MessageType         string `json:"messageType"`
	Message             string `json:"message"`
	UpdatedBondedTokens string `json:"updatedBondedTokens"`
}

type IBCChannelTraces

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

func NewIBCChannelTraces

func NewIBCChannelTraces(handle *rdb.Handle) *IBCChannelTraces

func (*IBCChannelTraces) Insert

func (ibcChannelTracesView *IBCChannelTraces) Insert(ibcChannelMessage *IBCChannelTraceRow) error

type IBCChannels

type IBCChannels interface {
	Insert(*IBCChannelRow) error
	UpdateFactualColumns(*IBCChannelRow) error
	Increment(string, string, int64) error
	UpdateSequence(string, string, uint64) error
	UpdateTotalRelayOutSuccessRate(string) error
	UpdateLastActivityTimeAndHeight(string, utctime.UTCTime, int64) error
	UpdateStatus(string, types.Status) error
	UpdateBondedTokens(string, *BondedTokens) error
	FindBondedTokensBy(string) (*BondedTokens, error)
	FindBy(string) (*IBCChannelRow, error)
	List(IBCChannelsListOrder, IBCChannelsListFilter, *pagination.Pagination) ([]IBCChannelRow, *pagination.PaginationResult, error)
	ListChannelsGroupByChainId(IBCChannelsListOrder, IBCChannelsListFilter, *pagination.Pagination) ([]ChainChannels, *pagination.PaginationResult, error)
}

func NewIBCChannelsView

func NewIBCChannelsView(handle *rdb.Handle) IBCChannels

func NewMockIBCChannelsView

func NewMockIBCChannelsView(_ *rdb.Handle) IBCChannels

type IBCChannelsListFilter

type IBCChannelsListFilter struct {
	MaybeStatus *types.Status
}

type IBCChannelsListOrder

type IBCChannelsListOrder struct {
	MaybeCreatedAtBlockTime    *view.ORDER
	MaybeLastActivityBlockTime *view.ORDER
}

type IBCChannelsView

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

Channels projection view implemented by relational database

func (*IBCChannelsView) FindBondedTokensBy

func (ibcChannelsView *IBCChannelsView) FindBondedTokensBy(channelID string) (*BondedTokens, error)

func (*IBCChannelsView) FindBy

func (ibcChannelsView *IBCChannelsView) FindBy(channelID string) (*IBCChannelRow, error)

func (*IBCChannelsView) Increment

func (ibcChannelsView *IBCChannelsView) Increment(channelID string, column string, increaseNumber int64) error

func (*IBCChannelsView) Insert

func (ibcChannelsView *IBCChannelsView) Insert(channel *IBCChannelRow) error

func (*IBCChannelsView) List

func (ibcChannelsView *IBCChannelsView) List(
	order IBCChannelsListOrder,
	filter IBCChannelsListFilter,
	pagination *pagination.Pagination,
) (
	[]IBCChannelRow,
	*pagination.PaginationResult,
	error,
)

func (*IBCChannelsView) ListChannelsGroupByChainId

func (ibcChannelsView *IBCChannelsView) ListChannelsGroupByChainId(
	order IBCChannelsListOrder,
	filter IBCChannelsListFilter,
	pagination *pagination.Pagination,
) (
	[]ChainChannels,
	*pagination.PaginationResult,
	error,
)

func (*IBCChannelsView) UpdateBondedTokens

func (ibcChannelsView *IBCChannelsView) UpdateBondedTokens(channelID string, bondedTokens *BondedTokens) error

func (*IBCChannelsView) UpdateFactualColumns

func (ibcChannelsView *IBCChannelsView) UpdateFactualColumns(channel *IBCChannelRow) error

func (*IBCChannelsView) UpdateLastActivityTimeAndHeight

func (ibcChannelsView *IBCChannelsView) UpdateLastActivityTimeAndHeight(channelID string, time utctime.UTCTime, height int64) error

func (*IBCChannelsView) UpdateSequence

func (ibcChannelsView *IBCChannelsView) UpdateSequence(channelID string, column string, sequence uint64) error

func (*IBCChannelsView) UpdateStatus

func (ibcChannelsView *IBCChannelsView) UpdateStatus(channelID string, status types.Status) error

func (*IBCChannelsView) UpdateTotalRelayOutSuccessRate

func (ibcChannelsView *IBCChannelsView) UpdateTotalRelayOutSuccessRate(channelID string) error

type IBCClientRow

type IBCClientRow struct {
	ClientID            string `json:"clientId"`
	CounterpartyChainID string `json:"counterpartyChainId"`
}

type IBCClients

type IBCClients interface {
	Insert(*IBCClientRow) error
	FindCounterpartyChainIDBy(string) (string, error)
}

func NewIBCClientsView

func NewIBCClientsView(handle *rdb.Handle) IBCClients

func NewMockIBCClientsView

func NewMockIBCClientsView(_ *rdb.Handle) IBCClients

type IBCClientsView

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

func (*IBCClientsView) FindCounterpartyChainIDBy

func (ibcClientsView *IBCClientsView) FindCounterpartyChainIDBy(clientID string) (string, error)

func (*IBCClientsView) Insert

func (ibcClientsView *IBCClientsView) Insert(ibcClient *IBCClientRow) error

type IBCConnectionRow

type IBCConnectionRow struct {
	ConnectionID             string `json:"connectionId"`
	ClientID                 string `json:"clientId"`
	CounterpartyConnectionID string `json:"counterpartyConnectionId"`
	CounterpartyClientID     string `json:"counterpartyClientId"`
	CounterpartyChainID      string `json:"counterpartyChainId"`
}

type IBCConnections

type IBCConnections interface {
	Insert(*IBCConnectionRow) error
	Update(*IBCConnectionRow) error
	FindCounterpartyChainIDBy(string) (string, error)
}

func NewIBCConnectionsView

func NewIBCConnectionsView(handle *rdb.Handle) IBCConnections

func NewMockIBCConnectionsView

func NewMockIBCConnectionsView(_ *rdb.Handle) IBCConnections

type IBCConnectionsView

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

func (*IBCConnectionsView) FindCounterpartyChainIDBy

func (ibcConnectionsView *IBCConnectionsView) FindCounterpartyChainIDBy(connectionID string) (string, error)

func (*IBCConnectionsView) Insert

func (ibcConnectionsView *IBCConnectionsView) Insert(ibcConnection *IBCConnectionRow) error

func (*IBCConnectionsView) Update

func (ibcConnectionsView *IBCConnectionsView) Update(ibcConnection *IBCConnectionRow) error

type IBCDenomHashMapping

type IBCDenomHashMapping interface {
	IfDenomExist(string) (bool, error)
	Insert(*IBCDenomHashMappingRow) error
	ListAll() (*[]IBCDenomHashMappingRow, error)
}

func NewIBCDenomHashMappingView

func NewIBCDenomHashMappingView(handle *rdb.Handle) IBCDenomHashMapping

func NewMockIBCDenomHashMapping

func NewMockIBCDenomHashMapping(_ *rdb.Handle) IBCDenomHashMapping

type IBCDenomHashMappingRow

type IBCDenomHashMappingRow struct {
	Denom string `json:"denom"`
	// The hash should be a sha256 hex encoded string
	Hash string `json:"hash"`
}

type IBCDenomHashMappingView

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

func (*IBCDenomHashMappingView) IfDenomExist

func (ibcDenomHashMappingView *IBCDenomHashMappingView) IfDenomExist(denom string) (bool, error)

func (*IBCDenomHashMappingView) Insert

func (ibcDenomHashMappingView *IBCDenomHashMappingView) Insert(ibcDenomHash *IBCDenomHashMappingRow) error

func (*IBCDenomHashMappingView) ListAll

func (ibcDenomHashMappingView *IBCDenomHashMappingView) ListAll() (*[]IBCDenomHashMappingRow, error)

type MockIBCChannelsView

type MockIBCChannelsView struct {
	mock.Mock
}

func (*MockIBCChannelsView) FindBondedTokensBy

func (ibcChannelsView *MockIBCChannelsView) FindBondedTokensBy(channelID string) (*BondedTokens, error)

func (*MockIBCChannelsView) FindBy

func (ibcChannelsView *MockIBCChannelsView) FindBy(channelID string) (*IBCChannelRow, error)

func (*MockIBCChannelsView) Increment

func (ibcChannelsView *MockIBCChannelsView) Increment(channelID string, column string, increaseNumber int64) error

func (*MockIBCChannelsView) Insert

func (ibcChannelsView *MockIBCChannelsView) Insert(channel *IBCChannelRow) error

func (*MockIBCChannelsView) List

func (*MockIBCChannelsView) ListChannelsGroupByChainId

func (ibcChannelsView *MockIBCChannelsView) ListChannelsGroupByChainId(
	order IBCChannelsListOrder,
	filter IBCChannelsListFilter,
	paginate *pagination.Pagination,
) (
	[]ChainChannels,
	*pagination.PaginationResult,
	error,
)

func (*MockIBCChannelsView) UpdateBondedTokens

func (ibcChannelsView *MockIBCChannelsView) UpdateBondedTokens(channelID string, bondedTokens *BondedTokens) error

func (*MockIBCChannelsView) UpdateFactualColumns

func (ibcChannelsView *MockIBCChannelsView) UpdateFactualColumns(channel *IBCChannelRow) error

func (*MockIBCChannelsView) UpdateLastActivityTimeAndHeight

func (ibcChannelsView *MockIBCChannelsView) UpdateLastActivityTimeAndHeight(channelID string, time utctime.UTCTime, height int64) error

func (*MockIBCChannelsView) UpdateSequence

func (ibcChannelsView *MockIBCChannelsView) UpdateSequence(channelID string, column string, sequence uint64) error

func (*MockIBCChannelsView) UpdateStatus

func (ibcChannelsView *MockIBCChannelsView) UpdateStatus(channelID string, status types.Status) error

func (*MockIBCChannelsView) UpdateTotalRelayOutSuccessRate

func (ibcChannelsView *MockIBCChannelsView) UpdateTotalRelayOutSuccessRate(channelID string) error

type MockIBCClientsView

type MockIBCClientsView struct {
	mock.Mock
}

func (*MockIBCClientsView) FindCounterpartyChainIDBy

func (ibcClientsView *MockIBCClientsView) FindCounterpartyChainIDBy(clientID string) (string, error)

func (*MockIBCClientsView) Insert

func (ibcClientsView *MockIBCClientsView) Insert(ibcClient *IBCClientRow) error

type MockIBCConnectionsView

type MockIBCConnectionsView struct {
	mock.Mock
}

func (*MockIBCConnectionsView) FindCounterpartyChainIDBy

func (ibcConnectionsView *MockIBCConnectionsView) FindCounterpartyChainIDBy(connectionID string) (string, error)

func (*MockIBCConnectionsView) Insert

func (ibcConnectionsView *MockIBCConnectionsView) Insert(ibcConnection *IBCConnectionRow) error

func (*MockIBCConnectionsView) Update

func (ibcConnectionsView *MockIBCConnectionsView) Update(ibcConnection *IBCConnectionRow) error

type MockIBCDenomHashMappingView

type MockIBCDenomHashMappingView struct {
	mock.Mock
}

func (*MockIBCDenomHashMappingView) IfDenomExist

func (ibcDenomHashMappingView *MockIBCDenomHashMappingView) IfDenomExist(denom string) (bool, error)

func (*MockIBCDenomHashMappingView) Insert

func (ibcDenomHashMappingView *MockIBCDenomHashMappingView) Insert(ibcDenomHash *IBCDenomHashMappingRow) error

func (*MockIBCDenomHashMappingView) ListAll

func (ibcDenomHashMappingView *MockIBCDenomHashMappingView) ListAll() (*[]IBCDenomHashMappingRow, error)

Jump to

Keyboard shortcuts

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