Versions in this module Expand all Collapse all v0 v0.1.0 Apr 15, 2023 Changes in this version + type CreatePaymentParams struct + Amount int64 + DestinationMint string + DestinationWallet string + ExpiresAt sql.NullTime + ExternalID sql.NullString + Message sql.NullString + Status PaymentStatus + type CreateTransactionParams struct + AccruedBonusAmount int64 + Amount int64 + ApplyBonus sql.NullBool + DestinationMint string + DestinationWallet string + DiscountAmount int64 + Memo sql.NullString + Message sql.NullString + PaymentID uuid.UUID + Reference string + SourceMint string + SourceWallet string + Status TransactionStatus + TotalAmount int64 + type DBTX interface + ExecContext func(context.Context, string, ...interface{}) (sql.Result, error) + PrepareContext func(context.Context, string) (*sql.Stmt, error) + QueryContext func(context.Context, string, ...interface{}) (*sql.Rows, error) + QueryRowContext func(context.Context, string, ...interface{}) *sql.Row + type DeleteTokenParams struct + Credential string + TokenType string + type GetTokenParams struct + AccessTokenID uuid.UUID + Credential string + RefreshTokenID uuid.UUID + TokenType string + type GetTransactionByPaymentIDSourceWalletAndMintParams struct + PaymentID uuid.UUID + SourceMint string + SourceWallet string + type NullPaymentStatus struct + PaymentStatus PaymentStatus + Valid bool + func (ns *NullPaymentStatus) Scan(value interface{}) error + func (ns NullPaymentStatus) Value() (driver.Value, error) + type NullTransactionStatus struct + TransactionStatus TransactionStatus + Valid bool + func (ns *NullTransactionStatus) Scan(value interface{}) error + func (ns NullTransactionStatus) Value() (driver.Value, error) + type Payment struct + Amount int64 + CreatedAt time.Time + DestinationMint string + DestinationWallet string + ExpiresAt sql.NullTime + ExternalID sql.NullString + ID uuid.UUID + Message sql.NullString + Status PaymentStatus + UpdatedAt sql.NullTime + type PaymentStatus string + const PaymentStatusCanceled + const PaymentStatusCompleted + const PaymentStatusExpired + const PaymentStatusFailed + const PaymentStatusNew + const PaymentStatusPending + func (e *PaymentStatus) Scan(src interface{}) error + type Queries struct + func New(db DBTX) *Queries + func Prepare(ctx context.Context, db DBTX) (*Queries, error) + func (q *Queries) Close() error + func (q *Queries) CreatePayment(ctx context.Context, arg CreatePaymentParams) (Payment, error) + func (q *Queries) CreateTransaction(ctx context.Context, arg CreateTransactionParams) (Transaction, error) + func (q *Queries) DeleteExpiredTokens(ctx context.Context) error + func (q *Queries) DeleteToken(ctx context.Context, arg DeleteTokenParams) error + func (q *Queries) DeleteTokensByCredential(ctx context.Context, credential string) error + func (q *Queries) GetPayment(ctx context.Context, id uuid.UUID) (Payment, error) + func (q *Queries) GetPaymentByExternalID(ctx context.Context, externalID string) (Payment, error) + func (q *Queries) GetPendingTransactions(ctx context.Context) ([]Transaction, error) + func (q *Queries) GetToken(ctx context.Context, arg GetTokenParams) (Token, error) + func (q *Queries) GetTransaction(ctx context.Context, id uuid.UUID) (Transaction, error) + func (q *Queries) GetTransactionByPaymentIDSourceWalletAndMint(ctx context.Context, arg GetTransactionByPaymentIDSourceWalletAndMintParams) (Transaction, error) + func (q *Queries) GetTransactionByReference(ctx context.Context, reference string) (Transaction, error) + func (q *Queries) GetTransactionsByPaymentID(ctx context.Context, paymentID uuid.UUID) ([]Transaction, error) + func (q *Queries) MarkPaymentsExpired(ctx context.Context) error + func (q *Queries) MarkTransactionsAsExpired(ctx context.Context) error + func (q *Queries) StoreToken(ctx context.Context, arg StoreTokenParams) (Token, error) + func (q *Queries) UpdatePaymentStatus(ctx context.Context, arg UpdatePaymentStatusParams) (Payment, error) + func (q *Queries) UpdateTransactionByReference(ctx context.Context, arg UpdateTransactionByReferenceParams) (Transaction, error) + func (q *Queries) WithTx(tx *sql.Tx) *Queries + type StoreTokenParams struct + AccessExpiresAt time.Time + AccessTokenID uuid.UUID + Credential string + RefreshExpiresAt time.Time + RefreshTokenID uuid.UUID + TokenType string + type Token struct + AccessExpiresAt time.Time + AccessTokenID uuid.UUID + CreatedAt time.Time + Credential string + RefreshExpiresAt time.Time + RefreshTokenID uuid.UUID + TokenType string + UpdatedAt sql.NullTime + type Transaction struct + AccruedBonusAmount int64 + Amount int64 + ApplyBonus sql.NullBool + CreatedAt time.Time + DestinationMint string + DestinationWallet string + DiscountAmount int64 + ID uuid.UUID + Memo sql.NullString + Message sql.NullString + PaymentID uuid.UUID + Reference string + SourceMint string + SourceWallet string + Status TransactionStatus + TotalAmount int64 + TxSignature sql.NullString + UpdatedAt sql.NullTime + type TransactionStatus string + const TransactionStatusCompleted + const TransactionStatusExpired + const TransactionStatusFailed + const TransactionStatusPending + func (e *TransactionStatus) Scan(src interface{}) error + type UpdatePaymentStatusParams struct + ID uuid.UUID + Status PaymentStatus + type UpdateTransactionByReferenceParams struct + Reference string + Status TransactionStatus + TxSignature sql.NullString