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: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DENOMS_TABLE_NAME = "view_nft_denoms"
View Source
const DENOMS_TOTAL_TABLE_NAME = "view_nft_denoms_total"
View Source
const MESSAGES_TABLE_NAME = "view_nft_messages"
View Source
const TOKENS_TABLE_NAME = "view_nft_tokens"

nolint:gosec

View Source
const TOKENS_TOTAL_TABLE_NAME = "view_nft_tokens_total"

nolint:gosec

View Source
const TOKEN_TRANSFERS_TABLE_NAME = "view_nft_token_transfers"

nolint:gosec

Variables

This section is empty.

Functions

This section is empty.

Types

type DenomListFilter

type DenomListFilter struct {
	MaybeCreator *string
}

type DenomListOrder

type DenomListOrder struct {
	CreatedAt view.ORDER
}

type DenomRow

type DenomRow struct {
	DenomId              string          `json:"denomId"`
	Name                 string          `json:"denomName"`
	Schema               string          `json:"denomSchema"`
	Creator              string          `json:"denomCreator"`
	CreatedAt            utctime.UTCTime `json:"denomCreatedAt"`
	CreatedAtBlockHeight int64           `json:"denomCreatedAtBlockHeight"`
}

type Denoms

type Denoms interface {
	Insert(denomRow *DenomRow) error
	FindById(denomId string) (*DenomRow, error)
	FindByName(denomName string) (*DenomRow, error)
	List(
		filter DenomListFilter,
		order DenomListOrder,
		pagination *pagination_interface.Pagination,
	) ([]DenomRow, *pagination_interface.PaginationResult, error)
}

func NewDenomsView

func NewDenomsView(handle *rdb.Handle) Denoms

type DenomsTotal

type DenomsTotal interface {
	Increment(identity string, total int64) error
	FindBy(identity string) (int64, error)
}

func NewDenomsTotalView

func NewDenomsTotalView(rdbHandle *rdb.Handle) DenomsTotal

type DenomsTotalView

type DenomsTotalView struct {
	*view.Total
}

type DenomsView

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

func (*DenomsView) FindById

func (denomsView *DenomsView) FindById(denomId string) (*DenomRow, error)

func (*DenomsView) FindByName

func (denomsView *DenomsView) FindByName(denomName string) (*DenomRow, error)

func (*DenomsView) Insert

func (denomsView *DenomsView) Insert(denomRow *DenomRow) error

func (*DenomsView) List

type MessageRow

type MessageRow struct {
	DenomId         string          `json:"denomId"`
	MaybeTokenId    *string         `json:"tokenId"`
	MaybeDrop       *string         `json:"drop"`
	BlockHeight     int64           `json:"blockHeight"`
	BlockHash       string          `json:"blockHash"`
	BlockTime       utctime.UTCTime `json:"blockTime"`
	TransactionHash string          `json:"transactionHash"`
	Success         bool            `json:"success"`
	MessageIndex    int             `json:"messageIndex"`
	MessageType     string          `json:"messageType"`
	Data            interface{}     `json:"data"`
}

type Messages

type Messages interface {
	Insert(messageRow *MessageRow) error
	List(
		filter MessagesListFilter,
		order MessagesListOrder,
		pagination *pagination_interface.Pagination,
	) ([]MessageRow, *pagination_interface.PaginationResult, error)
	DeleteAllByDenomTokenIds(denomId string, tokenId string) (int64, error)
}

func NewMessagesView

func NewMessagesView(handle *rdb.Handle) Messages

type MessagesListFilter

type MessagesListFilter struct {
	MaybeDenomId  *string
	MaybeTokenId  *string
	MaybeDrop     *string
	MaybeMsgTypes []string
}

type MessagesListOrder

type MessagesListOrder struct {
	Id view.ORDER
}

type MessagesTotal

type MessagesTotal interface {
	IncrementAll(identities []string, total int64) error
	SumBy(identities []string) (int64, error)
}

func NewMessagesTotalView

func NewMessagesTotalView(rdbHandle *rdb.Handle) MessagesTotal

type MessagesTotalView

type MessagesTotalView struct {
	*view.Total
}

type MessagesView

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

func (*MessagesView) DeleteAllByDenomTokenIds

func (nftMessagesView *MessagesView) DeleteAllByDenomTokenIds(denomId string, tokenId string) (int64, error)

func (*MessagesView) Insert

func (nftMessagesView *MessagesView) Insert(messageRow *MessageRow) error

func (*MessagesView) List

type MockDenomsTotalView

type MockDenomsTotalView struct {
	testify_mock.Mock
}

func (*MockDenomsTotalView) FindBy

func (totalView *MockDenomsTotalView) FindBy(identity string) (int64, error)

func (*MockDenomsTotalView) Increment

func (totalView *MockDenomsTotalView) Increment(identity string, total int64) error

type MockDenomsView

type MockDenomsView struct {
	testify_mock.Mock
}

func (*MockDenomsView) FindById

func (denomView *MockDenomsView) FindById(denomId string) (*DenomRow, error)

func (*MockDenomsView) FindByName

func (denomView *MockDenomsView) FindByName(denomName string) (*DenomRow, error)

func (*MockDenomsView) Insert

func (denomView *MockDenomsView) Insert(row *DenomRow) error

func (*MockDenomsView) List

type MockMessagesTotalView

type MockMessagesTotalView struct {
	testify_mock.Mock
}

func (*MockMessagesTotalView) IncrementAll

func (totalView *MockMessagesTotalView) IncrementAll(identities []string, total int64) error

func (*MockMessagesTotalView) SumBy

func (totalView *MockMessagesTotalView) SumBy(identities []string) (int64, error)

type MockMessagesView

type MockMessagesView struct {
	testify_mock.Mock
}

func (*MockMessagesView) DeleteAllByDenomTokenIds

func (messagesView *MockMessagesView) DeleteAllByDenomTokenIds(denomId string, tokenId string) (int64, error)

func (*MockMessagesView) Insert

func (messagesView *MockMessagesView) Insert(row *MessageRow) error

func (*MockMessagesView) List

type MockTokensTotalView

type MockTokensTotalView struct {
	testify_mock.Mock
}

func (*MockTokensTotalView) DecrementAll

func (totalView *MockTokensTotalView) DecrementAll(identities []string, total int64) error

func (*MockTokensTotalView) FindBy

func (totalView *MockTokensTotalView) FindBy(identity string) (int64, error)

func (*MockTokensTotalView) IncrementAll

func (totalView *MockTokensTotalView) IncrementAll(identities []string, total int64) error

type MockTokensView

type MockTokensView struct {
	testify_mock.Mock
}

func (*MockTokensView) Delete

func (tokensView *MockTokensView) Delete(denomId string, tokenId string) (int64, error)

func (*MockTokensView) FindById

func (tokensView *MockTokensView) FindById(denomId string, tokenId string) (*TokenRowWithDenomname, error)

func (*MockTokensView) Insert

func (tokensView *MockTokensView) Insert(row *TokenRow) error

func (*MockTokensView) List

func (*MockTokensView) ListDrops

func (*MockTokensView) Update

func (tokensView *MockTokensView) Update(row TokenRow) error

type TokenListFilter

type TokenListFilter struct {
	MaybeDenomId *string
	MaybeDrop    *string
	MaybeMinter  *string
	MaybeOwner   *string
}

type TokenListOrder

type TokenListOrder struct {
	MintedAt          view.ORDER
	LastEditedAt      view.ORDER
	LastTransferredAt view.ORDER
}

type TokenRow

type TokenRow struct {
	DenomId                      string          `json:"denomId"`
	TokenId                      string          `json:"tokenId"`
	MaybeDrop                    *string         `json:"drop"`
	Name                         string          `json:"tokenName"`
	URI                          string          `json:"tokenURI"`
	Data                         string          `json:"tokenData"`
	Minter                       string          `json:"tokenMinter"`
	Owner                        string          `json:"tokenOwner"`
	MintedAt                     utctime.UTCTime `json:"tokenMintedAt"`
	MintedAtBlockHeight          int64           `json:"tokenMintedAtBlockHeight"`
	LastEditedAt                 utctime.UTCTime `json:"tokenLastEditedAt"`
	LastEditedAtBlockHeight      int64           `json:"tokenLastEditedAtBlockHeight"`
	LastTransferredAt            utctime.UTCTime `json:"tokenLastTransferredAt"`
	LastTransferredAtBlockHeight int64           `json:"tokenLastTransferredAtBlockHeight"`
}

type TokenRowWithDenomname

type TokenRowWithDenomname struct {
	TokenRow

	DenomName   string `json:"denomName"`
	DenomSchema string `json:"denomSchema"`
}

type TokenTransferListFilter

type TokenTransferListFilter struct {
	MaybeDenomId     *string
	MaybeTokenId     *string
	MaybeDrop        *string
	MaybeBlockHeight *string
	MaybeSender      *string
	MaybeRecipient   *string
	MaybeAccount     *string // Sender OR Recipient
}

type TokenTransferListOrder

type TokenTransferListOrder struct {
	Id view.ORDER
}

type TokenTransferRow

type TokenTransferRow struct {
	DenomId         string          `json:"denomId"`
	TokenId         string          `json:"tokenId"`
	BlockHeight     int64           `json:"blockHeight"`
	TransactionHash string          `json:"transactionHash"`
	Sender          string          `json:"sender"`
	Recipient       string          `json:"recipient"`
	TransferredAt   utctime.UTCTime `json:"transferredAt"`
}

type TokenTransferRowWithDenomAndTokenDetails

type TokenTransferRowWithDenomAndTokenDetails struct {
	TokenTransferRow

	DenomName   string `json:"denomName"`
	DenomSchema string `json:"denomSchema"`
	TokenName   string `json:"tokenName"`
	Drop        string `json:"drop"`
	TokenURI    string `json:"tokenURI"`
	TokenData   string `json:"tokenData"`
	TokenMinter string `json:"tokenMinter"`
}

type TokenTransfers

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

func NewTokenTransfers

func NewTokenTransfers(handle *rdb.Handle) *TokenTransfers

func (*TokenTransfers) Insert

func (tokenTransfersView *TokenTransfers) Insert(
	tokenTransferRow TokenTransferRow,
) error

type Tokens

type Tokens interface {
	Insert(tokenRow *TokenRow) error
	Delete(denomId string, tokenId string) (int64, error)
	FindById(denomId string, tokenId string) (*TokenRowWithDenomname, error)
	Update(tokenRow TokenRow) error
	List(
		filter TokenListFilter,
		order TokenListOrder,
		pagination *pagination_interface.Pagination,
	) ([]TokenRowWithDenomname, *pagination_interface.PaginationResult, error)
	ListDrops(
		pagination *pagination_interface.Pagination,
	) ([]string, *pagination_interface.PaginationResult, error)
}

func NewTokensView

func NewTokensView(handle *rdb.Handle) Tokens

type TokensTotal

type TokensTotal interface {
	IncrementAll(identities []string, total int64) error
	DecrementAll(identities []string, total int64) error
	FindBy(identity string) (int64, error)
}

func NewTokensTotalView

func NewTokensTotalView(rdbHandle *rdb.Handle) TokensTotal

type TokensTotalView

type TokensTotalView struct {
	*view.Total
}

type TokensView

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

func (*TokensView) Delete

func (tokensView *TokensView) Delete(denomId string, tokenId string) (int64, error)

func (*TokensView) FindById

func (tokensView *TokensView) FindById(
	denomId string, tokenId string,
) (*TokenRowWithDenomname, error)

func (*TokensView) Insert

func (tokensView *TokensView) Insert(tokenRow *TokenRow) error

func (*TokensView) List

func (*TokensView) ListDrops

func (tokensView *TokensView) ListDrops(
	pagination *pagination_interface.Pagination,
) ([]string, *pagination_interface.PaginationResult, error)

func (*TokensView) Update

func (tokensView *TokensView) Update(tokenRow TokenRow) error

Jump to

Keyboard shortcuts

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