Versions in this module Expand all Collapse all v1 v1.0.0 Oct 23, 2023 Changes in this version + func DecodeAccountID(raw AccountID) (string, []byte, error) + func DecodePublicKey(raw PublicKey) (string, []byte, error) + func DecodeSorting(rawSort *string, columns map[string]string) (string, bool, error) + func GetOrDefaultStr(str string, def string) string + func GetOrDefaultStrPtr(str *string, def *string) *string + func GetOrDefaultUint64Ptr(value *uint64, def *uint64) *uint64 + func MustDBHash(in string) []byte + func NotNilStrPtr(str *string) bool + type AccountID string + func FormatAccountID(network string, accountID []byte) AccountID + func (id AccountID) String() string + type Approval struct + CreatedAt time.Time + ID int64 + RarimoTransaction []byte + TransferIndex []byte + type ApprovalQ interface + ApprovalsByTransferIndexCtx func(ctx context.Context, transferIndex []byte, isForUpdate bool) ([]Approval, error) + InsertBatchCtx func(ctx context.Context, approvals ...Approval) error + type Chain struct + ChainParams json.RawMessage + ID int + Icon *string + Name string + Rpc string + Type tokenmanager.NetworkType + type ChainsQ interface + Get func(chain string) *Chain + List func() []Chain + Page func(pageNum, limit int) []Chain + type Collection struct + CreatedAt time.Time + ID int64 + Index []byte + Metadata xo.Jsonb + UpdatedAt time.Time + type CollectionChainMapping struct + Address []byte + Collection int64 + CreatedAt time.Time + Decimals sql.NullInt64 + Network int + TokenType sql.NullInt64 + UpdatedAt time.Time + Wrapped sql.NullBool + type CollectionChainMappingQ interface + CollectionChainMappingByCollectionNetworkCtx func(ctx context.Context, collection int64, network int, isForUpdate bool) (*CollectionChainMapping, error) + DeleteByCollectionCtx func(ctx context.Context, collection int64) error + DeleteCtx func(ctx context.Context, ccm *CollectionChainMapping) error + InsertBatchCtx func(ctx context.Context, chainMappings ...CollectionChainMapping) error + InsertCtx func(ctx context.Context, ccm *CollectionChainMapping) error + UpsertCtx func(ctx context.Context, ccm *CollectionChainMapping) error + type CollectionQ interface + CollectionByIndexCtx func(ctx context.Context, index []byte, isForUpdate bool) (*Collection, error) + DeleteCtx func(ctx context.Context, c *Collection) error + InsertCtx func(ctx context.Context, c *Collection) error + type Confirmation struct + CreatedAt time.Time + ID int64 + RarimoTransaction []byte + TransferIndex []byte + type ConfirmationQ interface + ConfirmationsByTransferIndexCtx func(ctx context.Context, transferIndex []byte, isForUpdate bool) ([]Confirmation, error) + InsertBatchCtx func(ctx context.Context, confirmations ...Confirmation) error + type Cursor struct + ItemIndex uint64 + PageNumber uint64 + func DecodeCursor(cursor string) (*Cursor, error) + func NewCursor(page, itemIndex uint64) *Cursor + func (c Cursor) String() string + type GorpMigration struct + AppliedAt sql.NullTime + ID string + type GorpMigrationQ interface + type IndexConfig struct + TransfersIndexSuffix string + type Int256 struct + func (b *Int256) Scan(value interface{}) error + func (b *Int256) UnmarshalMsgpack(value []byte) error + func (b Int256) MarshalMsgpack() ([]byte, error) + func (b Int256) Value() (driver.Value, error) + type Item struct + Collection sql.NullInt64 + CreatedAt time.Time + ID int64 + Index []byte + Metadata xo.Jsonb + UpdatedAt time.Time + type ItemChainMapping struct + Address []byte + CreatedAt time.Time + Item int64 + Network int + TokenID []byte + UpdatedAt time.Time + type ItemChainMappingQ interface + DeleteByItemCtx func(ctx context.Context, item int64) error + DeleteCtx func(ctx context.Context, icm *ItemChainMapping) error + InsertBatchCtx func(ctx context.Context, chainMappings ...ItemChainMapping) error + InsertCtx func(ctx context.Context, icm *ItemChainMapping) error + ItemChainMappingByItemNetworkCtx func(ctx context.Context, item int64, network int, isForUpdate bool) (*ItemChainMapping, error) + ItemChainMappingsByNetworkCtx func(ctx context.Context, network int, isForUpdate bool) ([]ItemChainMapping, error) + type ItemQ interface + DeleteCtx func(ctx context.Context, i *Item) error + InsertCtx func(ctx context.Context, i *Item) error + ItemByIDCtx func(ctx context.Context, id int64, isForUpdate bool) (*Item, error) + ItemByIndexCtx func(ctx context.Context, index []byte, isForUpdate bool) (*Item, error) + UpdateCtx func(ctx context.Context, i *Item) error + type ItemsSelector struct + Collection *int64 + Network *string + type KeyValue struct + CreatedAt time.Time + Key string + UpdatedAt time.Time + Value string + type KeyValueQ interface + Get func(ctx context.Context, key string) (*KeyValue, error) + Remove func(ctx context.Context, key string) error + Upsert func(ctx context.Context, kv KeyValue) error + type Nft struct + Attributes []NftAttribute + CollectionName string + Description *string + ID string + ImageURL string + Name string + type NftAttribute struct + Trait string + Value string + type NftMetadata struct + AnimationUrl *string + Attributes []NftAttribute + Description *string + ExternalUrl *string + ImageURL string + MetadataUrl *string + Name string + func (m *NftMetadata) Merge(metadata *NftMetadata) + type PublicKey string + func FormatPublicKey(network string, publicKey []byte) PublicKey + func (pk PublicKey) String() string + type Rejection struct + CreatedAt time.Time + ID int64 + RarimoTransaction []byte + TransferIndex []byte + type RejectionQ interface + InsertBatchCtx func(ctx context.Context, rejections ...Rejection) error + RejectionsByTransferIndexCtx func(ctx context.Context, transferIndex []byte, isForUpdate bool) ([]Rejection, error) + type SeedQ interface + type Storage interface + ApprovalQ func() ApprovalQ + CollectionChainMappingQ func() CollectionChainMappingQ + CollectionQ func() CollectionQ + ConfirmationQ func() ConfirmationQ + ItemChainMappingQ func() ItemChainMappingQ + ItemQ func() ItemQ + RejectionQ func() RejectionQ + Transaction func(func() error) error + TransactionQ func() TransactionQ + TransferQ func() TransferQ + VoteQ func() VoteQ + type StringSlice []string + func (ss *StringSlice) Scan(src interface{}) error + func (ss StringSlice) Value() (driver.Value, error) + type Token struct + Chains []TokenChain + ID string + Icon *string + Name string + Symbol string + type TokenChain struct + ChainID string + ContractAddress string + TokenID string + TokenType tokenmanager.Type + Wrapped bool + type Transaction struct + BlockHeight sql.NullInt64 + CreatedAt time.Time + Hash []byte + Index sql.NullInt64 + RawTx []byte + TxResult xo.NullJsonb + TxTimestamp time.Time + type TransactionQ interface + InsertBatchCtx func(ctx context.Context, transactions ...Transaction) error + type Transfer struct + Amount Int256 + BundleData []byte + BundleSalt []byte + CreatedAt time.Time + Creator sql.NullString + EventID int64 + FromChain string + ID int64 + Index []byte + Origin string + RarimoTx []byte + RarimoTxTimestamp time.Time + Receiver string + Status int + ToChain string + TokenIndex string + Tx []byte + UpdatedAt time.Time + func (s Transfer) RarimoTxHash() string + type TransferQ interface + SelectCtx func(ctx context.Context, selector TransferSelector) ([]Transfer, error) + SetStatusByIndexCtx func(ctx context.Context, status int, indexes ...string) error + TransferByIndexCtx func(ctx context.Context, index []byte, isForUpdate bool) (*Transfer, error) + UpsertBatchCtx func(ctx context.Context, transfers ...Transfer) error + type TransferSelector struct + After *time.Time + Before *time.Time + ChainTx *string + Creator *string + DestinationChain *string + Origin *string + PageCursor uint64 + PageSize uint64 + RarimoTx *string + Receiver *string + Sort pgdb.Sorts + SourceChain *string + Status *int + TokenIndex *string + func (s TransferSelector) MustCacheKey() string + type Vote struct + Choice int + CreatedAt time.Time + ID int64 + RarimoTransaction []byte + TransferIndex []byte + type VoteQ interface + InsertBatchCtx func(ctx context.Context, votes ...Vote) error + VotesByTransferIndexCtx func(ctx context.Context, transferIndex []byte, isForUpdate bool) ([]Vote, error)