db

package
v1.1.6 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2022 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChainPrefix

type ChainPrefix = string

type Db

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

Db represents the application interface for accessing the database

func NewDb

func NewDb(ctx context.Context) Db

func (Db) GetFundingReceiptByUsernameAndChainPrefix

func (db Db) GetFundingReceiptByUsernameAndChainPrefix(ctx context.Context, username string, chainPrefix string) (*FundingReceipt, error)

func (Db) PruneExpiredReceipts

func (db Db) PruneExpiredReceipts(ctx context.Context, beforeFundingTime time.Time) (int, error)

func (Db) SaveFundingReceipt

func (db Db) SaveFundingReceipt(ctx context.Context, newReceipt FundingReceipt) error

type FundingReceipt

type FundingReceipt struct {
	ChainPrefix ChainPrefix       `firestore:"chainPrefix"`
	Username    Username          `firestore:"username"`
	FundedAt    time.Time         `firestore:"fundedAt"`
	Amount      cosmostypes.Coins `firestore:"amount"`
}

type FundingReceipts

type FundingReceipts []FundingReceipt

type Username

type Username = string

Jump to

Keyboard shortcuts

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