Documentation ¶
Index ¶
- func BigIntToNumeric(bigInt *big.Int) pgtype.Numeric
- func Int64ToNullable(i int64) sql.NullInt64
- func MoneyToNegNumeric(m money.Money) pgtype.Numeric
- func MoneyToNumeric(m money.Money) pgtype.Numeric
- func NullTimeToPointer(t sql.NullTime) *time.Time
- func NullableInt64ToPointer(i sql.NullInt64) *int64
- func NullableStringToPointer(s sql.NullString) *string
- func NumericToBigInt(num pgtype.Numeric) (*big.Int, error)
- func NumericToMoney(num pgtype.Numeric, moneyType money.Type, ticker string, decimals int64) (money.Money, error)
- func PointerInt64ToNullable(i *int64) sql.NullInt64
- func PointerStringToNullable(s *string) sql.NullString
- func StringToNullable(s string) sql.NullString
- func TimeToNullable(t time.Time) sql.NullTime
- type ApiToken
- type Balance
- type BalanceAuditLog
- type CalculateCustomerPaymentsParams
- type CancelTransactionParams
- type CreateAPITokenParams
- type CreateBalanceParams
- type CreateCustomerParams
- type CreateJobLogParams
- type CreateMerchantAddressParams
- type CreateMerchantParams
- type CreatePaymentLinkParams
- type CreatePaymentParams
- type CreateRegistryItemParams
- type CreateTransactionParams
- type CreateUserParams
- type CreateWalletLockParams
- type CreateWalletParams
- type Customer
- type DBTX
- type DeleteMerchantAddressParams
- type DeletePaymentLinkByPublicIDParams
- type EagerLoadTransactionsByPaymentIDParams
- type GetAPITokenParams
- type GetAvailableWalletParams
- type GetBalanceByFilterParams
- type GetBalanceByFilterWithLockParams
- type GetBalanceByIDParams
- type GetBalanceByUUIDParams
- type GetBatchCustomersParams
- type GetBatchExpiredPaymentsParams
- type GetCustomerByEmailParams
- type GetCustomerByIDParams
- type GetCustomerByUUIDParams
- type GetMerchantAddressByAddressParams
- type GetMerchantAddressByIDParams
- type GetMerchantAddressByUUIDParams
- type GetMerchantByIDParams
- type GetMerchantByUUIDAndCreatorIDParams
- type GetMerchantByUUIDParams
- type GetPaymentByIDParams
- type GetPaymentByMerchantIDAndOrderUUIDParams
- type GetPaymentByMerchantIDsParams
- type GetPaymentLinkByIDParams
- type GetPaymentLinkByPublicIDParams
- type GetPaymentsByTypeParams
- type GetRecentCustomerPaymentsParams
- type GetRegistryItemByKeyParams
- type GetTransactionByHashAndNetworkIDParams
- type GetTransactionByIDParams
- type GetTransactionsByFilterParams
- type GetWalletLockParams
- type InsertBalanceAuditLogParams
- type JobLog
- type ListAPITokensByEntityParams
- type ListBalancesParams
- type ListJobLogsByIDParams
- type ListMerchantsByCreatorIDParams
- type ListPaymentLinksParams
- type Merchant
- type MerchantAddress
- type PaginateCustomersAscParams
- type PaginateCustomersDescParams
- type PaginatePaymentsAscParams
- type PaginatePaymentsDescParams
- type PaginateWalletsByIDParams
- type Payment
- type PaymentLink
- type Querier
- type Queries
- func (q *Queries) AdvisoryTransactionLock(ctx context.Context, pgAdvisoryXactLock int64) error
- func (q *Queries) AdvisoryTransactionUnlock(ctx context.Context, pgAdvisoryXactLock int64) error
- func (q *Queries) AdvisoryTxLock(ctx context.Context, pgAdvisoryXactLock int64) error
- func (q *Queries) CalculateCustomerPayments(ctx context.Context, arg CalculateCustomerPaymentsParams) (int64, error)
- func (q *Queries) CancelTransaction(ctx context.Context, arg CancelTransactionParams) error
- func (q *Queries) CheckSystemWalletExistsByAddress(ctx context.Context, address string) (Wallet, error)
- func (q *Queries) CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (ApiToken, error)
- func (q *Queries) CreateBalance(ctx context.Context, arg CreateBalanceParams) (Balance, error)
- func (q *Queries) CreateCustomer(ctx context.Context, arg CreateCustomerParams) (Customer, error)
- func (q *Queries) CreateJobLog(ctx context.Context, arg CreateJobLogParams) error
- func (q *Queries) CreateMerchant(ctx context.Context, arg CreateMerchantParams) (Merchant, error)
- func (q *Queries) CreateMerchantAddress(ctx context.Context, arg CreateMerchantAddressParams) (MerchantAddress, error)
- func (q *Queries) CreatePayment(ctx context.Context, arg CreatePaymentParams) (Payment, error)
- func (q *Queries) CreatePaymentLink(ctx context.Context, arg CreatePaymentLinkParams) (PaymentLink, error)
- func (q *Queries) CreateRegistryItem(ctx context.Context, arg CreateRegistryItemParams) (Registry, error)
- func (q *Queries) CreateTransaction(ctx context.Context, arg CreateTransactionParams) (Transaction, error)
- func (q *Queries) CreateUser(ctx context.Context, arg CreateUserParams) (User, error)
- func (q *Queries) CreateWallet(ctx context.Context, arg CreateWalletParams) (Wallet, error)
- func (q *Queries) CreateWalletLock(ctx context.Context, arg CreateWalletLockParams) (WalletLock, error)
- func (q *Queries) DeleteAPITokenByID(ctx context.Context, id int64) error
- func (q *Queries) DeleteAPITokenByToken(ctx context.Context, token string) error
- func (q *Queries) DeleteMerchantAddress(ctx context.Context, arg DeleteMerchantAddressParams) error
- func (q *Queries) DeletePaymentLinkByPublicID(ctx context.Context, arg DeletePaymentLinkByPublicIDParams) error
- func (q *Queries) DeleteUser(ctx context.Context, id int64) error
- func (q *Queries) EagerLoadTransactionsByPaymentID(ctx context.Context, arg EagerLoadTransactionsByPaymentIDParams) ([]Transaction, error)
- func (q *Queries) GetAPIToken(ctx context.Context, arg GetAPITokenParams) (ApiToken, error)
- func (q *Queries) GetAPITokenByUUID(ctx context.Context, uuid uuid.UUID) (ApiToken, error)
- func (q *Queries) GetAvailableWallet(ctx context.Context, arg GetAvailableWalletParams) (Wallet, error)
- func (q *Queries) GetBalanceByFilter(ctx context.Context, arg GetBalanceByFilterParams) (Balance, error)
- func (q *Queries) GetBalanceByFilterWithLock(ctx context.Context, arg GetBalanceByFilterWithLockParams) (Balance, error)
- func (q *Queries) GetBalanceByID(ctx context.Context, arg GetBalanceByIDParams) (Balance, error)
- func (q *Queries) GetBalanceByIDWithLock(ctx context.Context, id int64) (Balance, error)
- func (q *Queries) GetBalanceByUUID(ctx context.Context, arg GetBalanceByUUIDParams) (Balance, error)
- func (q *Queries) GetBatchCustomers(ctx context.Context, arg GetBatchCustomersParams) ([]Customer, error)
- func (q *Queries) GetBatchExpiredPayments(ctx context.Context, arg GetBatchExpiredPaymentsParams) ([]Payment, error)
- func (q *Queries) GetCustomerByEmail(ctx context.Context, arg GetCustomerByEmailParams) (Customer, error)
- func (q *Queries) GetCustomerByID(ctx context.Context, arg GetCustomerByIDParams) (Customer, error)
- func (q *Queries) GetCustomerByUUID(ctx context.Context, arg GetCustomerByUUIDParams) (Customer, error)
- func (q *Queries) GetLatestTransactionByPaymentID(ctx context.Context, entityID sql.NullInt64) (Transaction, error)
- func (q *Queries) GetMerchantAddressByAddress(ctx context.Context, arg GetMerchantAddressByAddressParams) (MerchantAddress, error)
- func (q *Queries) GetMerchantAddressByID(ctx context.Context, arg GetMerchantAddressByIDParams) (MerchantAddress, error)
- func (q *Queries) GetMerchantAddressByUUID(ctx context.Context, arg GetMerchantAddressByUUIDParams) (MerchantAddress, error)
- func (q *Queries) GetMerchantByID(ctx context.Context, arg GetMerchantByIDParams) (Merchant, error)
- func (q *Queries) GetMerchantByUUID(ctx context.Context, arg GetMerchantByUUIDParams) (Merchant, error)
- func (q *Queries) GetMerchantByUUIDAndCreatorID(ctx context.Context, arg GetMerchantByUUIDAndCreatorIDParams) (Merchant, error)
- func (q *Queries) GetPaymentByID(ctx context.Context, arg GetPaymentByIDParams) (Payment, error)
- func (q *Queries) GetPaymentByMerchantIDAndOrderUUID(ctx context.Context, arg GetPaymentByMerchantIDAndOrderUUIDParams) (Payment, error)
- func (q *Queries) GetPaymentByMerchantIDs(ctx context.Context, arg GetPaymentByMerchantIDsParams) (Payment, error)
- func (q *Queries) GetPaymentByPublicID(ctx context.Context, publicID uuid.UUID) (Payment, error)
- func (q *Queries) GetPaymentLinkByID(ctx context.Context, arg GetPaymentLinkByIDParams) (PaymentLink, error)
- func (q *Queries) GetPaymentLinkByPublicID(ctx context.Context, arg GetPaymentLinkByPublicIDParams) (PaymentLink, error)
- func (q *Queries) GetPaymentLinkBySlug(ctx context.Context, slug string) (PaymentLink, error)
- func (q *Queries) GetPaymentsByType(ctx context.Context, arg GetPaymentsByTypeParams) ([]Payment, error)
- func (q *Queries) GetRecentCustomerPayments(ctx context.Context, arg GetRecentCustomerPaymentsParams) ([]Payment, error)
- func (q *Queries) GetRegistryItemByKey(ctx context.Context, arg GetRegistryItemByKeyParams) (Registry, error)
- func (q *Queries) GetTransactionByHashAndNetworkID(ctx context.Context, arg GetTransactionByHashAndNetworkIDParams) (Transaction, error)
- func (q *Queries) GetTransactionByID(ctx context.Context, arg GetTransactionByIDParams) (Transaction, error)
- func (q *Queries) GetTransactionsByFilter(ctx context.Context, arg GetTransactionsByFilterParams) ([]Transaction, error)
- func (q *Queries) GetUserByEmail(ctx context.Context, email string) (User, error)
- func (q *Queries) GetUserByGoogleID(ctx context.Context, googleID sql.NullString) (User, error)
- func (q *Queries) GetUserByID(ctx context.Context, id int64) (User, error)
- func (q *Queries) GetWalletByID(ctx context.Context, id int64) (Wallet, error)
- func (q *Queries) GetWalletByUUID(ctx context.Context, uuid uuid.UUID) (Wallet, error)
- func (q *Queries) GetWalletForUpdateByID(ctx context.Context, id int64) (Wallet, error)
- func (q *Queries) GetWalletLock(ctx context.Context, arg GetWalletLockParams) (WalletLock, error)
- func (q *Queries) InsertBalanceAuditLog(ctx context.Context, arg InsertBalanceAuditLogParams) error
- func (q *Queries) ListAPITokensByEntity(ctx context.Context, arg ListAPITokensByEntityParams) ([]ApiToken, error)
- func (q *Queries) ListBalances(ctx context.Context, arg ListBalancesParams) ([]Balance, error)
- func (q *Queries) ListJobLogsByID(ctx context.Context, arg ListJobLogsByIDParams) ([]JobLog, error)
- func (q *Queries) ListMerchantAddresses(ctx context.Context, merchantID int64) ([]MerchantAddress, error)
- func (q *Queries) ListMerchantsByCreatorID(ctx context.Context, arg ListMerchantsByCreatorIDParams) ([]Merchant, error)
- func (q *Queries) ListPaymentLinks(ctx context.Context, arg ListPaymentLinksParams) ([]PaymentLink, error)
- func (q *Queries) ListUsers(ctx context.Context) ([]User, error)
- func (q *Queries) PaginateCustomersAsc(ctx context.Context, arg PaginateCustomersAscParams) ([]Customer, error)
- func (q *Queries) PaginateCustomersDesc(ctx context.Context, arg PaginateCustomersDescParams) ([]Customer, error)
- func (q *Queries) PaginatePaymentsAsc(ctx context.Context, arg PaginatePaymentsAscParams) ([]Payment, error)
- func (q *Queries) PaginatePaymentsDesc(ctx context.Context, arg PaginatePaymentsDescParams) ([]Payment, error)
- func (q *Queries) PaginateWalletsByID(ctx context.Context, arg PaginateWalletsByIDParams) ([]Wallet, error)
- func (q *Queries) ReleaseWalletLock(ctx context.Context, id int64) error
- func (q *Queries) SetTransactionHash(ctx context.Context, arg SetTransactionHashParams) error
- func (q *Queries) SoftDeleteMerchantByUUID(ctx context.Context, uuid uuid.UUID) error
- func (q *Queries) UpdateBalanceByID(ctx context.Context, arg UpdateBalanceByIDParams) (Balance, error)
- func (q *Queries) UpdateMerchant(ctx context.Context, arg UpdateMerchantParams) (Merchant, error)
- func (q *Queries) UpdateMerchantAddress(ctx context.Context, arg UpdateMerchantAddressParams) (MerchantAddress, error)
- func (q *Queries) UpdateMerchantSettings(ctx context.Context, arg UpdateMerchantSettingsParams) error
- func (q *Queries) UpdatePayment(ctx context.Context, arg UpdatePaymentParams) (Payment, error)
- func (q *Queries) UpdatePaymentCustomerID(ctx context.Context, arg UpdatePaymentCustomerIDParams) error
- func (q *Queries) UpdatePaymentWebhookInfo(ctx context.Context, arg UpdatePaymentWebhookInfoParams) error
- func (q *Queries) UpdateRegistryItem(ctx context.Context, arg UpdateRegistryItemParams) (Registry, error)
- func (q *Queries) UpdateTransaction(ctx context.Context, arg UpdateTransactionParams) (Transaction, error)
- func (q *Queries) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error)
- func (q *Queries) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) (User, error)
- func (q *Queries) UpdateWalletMainnetTransactionCounters(ctx context.Context, arg UpdateWalletMainnetTransactionCountersParams) error
- func (q *Queries) UpdateWalletTatumFields(ctx context.Context, arg UpdateWalletTatumFieldsParams) (Wallet, error)
- func (q *Queries) UpdateWalletTestnetTransactionCounters(ctx context.Context, arg UpdateWalletTestnetTransactionCountersParams) error
- func (q *Queries) WithTx(tx pgx.Tx) *Queries
- type Registry
- type SetTransactionHashParams
- type Storage
- type Store
- type Transaction
- type TxCallback
- type UpdateBalanceByIDParams
- type UpdateMerchantAddressParams
- type UpdateMerchantParams
- type UpdateMerchantSettingsParams
- type UpdatePaymentCustomerIDParams
- type UpdatePaymentParams
- type UpdatePaymentWebhookInfoParams
- type UpdateRegistryItemParams
- type UpdateTransactionParams
- type UpdateUserParams
- type UpdateUserPasswordParams
- type UpdateWalletMainnetTransactionCountersParams
- type UpdateWalletTatumFieldsParams
- type UpdateWalletTestnetTransactionCountersParams
- type User
- type Wallet
- type WalletLock
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Int64ToNullable ¶
func NullableInt64ToPointer ¶
func NullableStringToPointer ¶
func NullableStringToPointer(s sql.NullString) *string
func NumericToMoney ¶
func PointerInt64ToNullable ¶
func PointerStringToNullable ¶
func PointerStringToNullable(s *string) sql.NullString
func StringToNullable ¶
func StringToNullable(s string) sql.NullString
Types ¶
type BalanceAuditLog ¶
type CancelTransactionParams ¶
type CreateAPITokenParams ¶
type CreateBalanceParams ¶
type CreateCustomerParams ¶
type CreateJobLogParams ¶
type CreateMerchantParams ¶
type CreatePaymentLinkParams ¶
type CreatePaymentParams ¶
type CreatePaymentParams struct { PublicID uuid.UUID CreatedAt time.Time UpdatedAt time.Time Type string Status string MerchantID int64 MerchantOrderUuid uuid.UUID MerchantOrderID sql.NullString ExpiresAt sql.NullTime Price pgtype.Numeric Decimals int32 Currency string Description sql.NullString RedirectUrl string Metadata pgtype.JSONB IsTest bool }
type CreateTransactionParams ¶
type CreateTransactionParams struct { MerchantID int64 CreatedAt time.Time UpdatedAt time.Time Status string Type string EntityID sql.NullInt64 SenderWalletID sql.NullInt64 SenderAddress sql.NullString RecipientWalletID sql.NullInt64 RecipientAddress string TransactionHash sql.NullString Blockchain string NetworkID sql.NullString CurrencyType string Currency string Decimals int32 NetworkDecimals int32 Amount pgtype.Numeric FactAmount pgtype.Numeric NetworkFee pgtype.Numeric ServiceFee pgtype.Numeric UsdAmount pgtype.Numeric Metadata pgtype.JSONB IsTest bool }
type CreateUserParams ¶
type CreateWalletLockParams ¶
type CreateWalletParams ¶
type GetAPITokenParams ¶
type GetAvailableWalletParams ¶
type GetAvailableWalletParams struct { Blockchain string Type sql.NullString Currency string NetworkID string }
type GetBalanceByIDParams ¶
type GetBalanceByUUIDParams ¶
type GetBatchCustomersParams ¶
type GetCustomerByEmailParams ¶
type GetCustomerByEmailParams struct { Email sql.NullString MerchantID int64 }
type GetCustomerByIDParams ¶
type GetCustomerByUUIDParams ¶
type GetMerchantByIDParams ¶
type GetMerchantByUUIDParams ¶
type GetPaymentByIDParams ¶
type GetPaymentsByTypeParams ¶
type GetTransactionByHashAndNetworkIDParams ¶
type GetTransactionByHashAndNetworkIDParams struct { TransactionHash sql.NullString NetworkID sql.NullString }
type GetTransactionsByFilterParams ¶
type GetTransactionsByFilterParams struct { RecipientWalletID sql.NullInt64 NetworkID sql.NullString Currency string Limit int32 FilterByRecipientWalletID bool FilterByNetworkID bool FilterByCurrency bool FilterByTypes bool Types []string FilterByStatuses bool Statuses []string FilterEmptyHash bool }
type GetWalletLockParams ¶
type ListBalancesParams ¶
type ListJobLogsByIDParams ¶
type ListJobLogsByIDParams struct { JobID sql.NullString Limit int32 }
type ListPaymentLinksParams ¶
type MerchantAddress ¶
type Payment ¶
type Payment struct { ID int64 PublicID uuid.UUID CreatedAt time.Time UpdatedAt time.Time Type string Status string MerchantID int64 MerchantOrderUuid uuid.UUID MerchantOrderID sql.NullString ExpiresAt sql.NullTime Price pgtype.Numeric Decimals int32 Currency string Description sql.NullString RedirectUrl string CustomerID sql.NullInt64 IsTest bool WebhookSentAt sql.NullTime Metadata pgtype.JSONB }
type PaymentLink ¶
type Querier ¶
type Querier interface { AdvisoryTxLock(ctx context.Context, pgAdvisoryXactLock int64) error CalculateCustomerPayments(ctx context.Context, arg CalculateCustomerPaymentsParams) (int64, error) CancelTransaction(ctx context.Context, arg CancelTransactionParams) error CheckSystemWalletExistsByAddress(ctx context.Context, address string) (Wallet, error) CreateAPIToken(ctx context.Context, arg CreateAPITokenParams) (ApiToken, error) CreateBalance(ctx context.Context, arg CreateBalanceParams) (Balance, error) CreateCustomer(ctx context.Context, arg CreateCustomerParams) (Customer, error) CreateJobLog(ctx context.Context, arg CreateJobLogParams) error CreateMerchant(ctx context.Context, arg CreateMerchantParams) (Merchant, error) CreateMerchantAddress(ctx context.Context, arg CreateMerchantAddressParams) (MerchantAddress, error) CreatePayment(ctx context.Context, arg CreatePaymentParams) (Payment, error) CreatePaymentLink(ctx context.Context, arg CreatePaymentLinkParams) (PaymentLink, error) CreateRegistryItem(ctx context.Context, arg CreateRegistryItemParams) (Registry, error) CreateTransaction(ctx context.Context, arg CreateTransactionParams) (Transaction, error) CreateUser(ctx context.Context, arg CreateUserParams) (User, error) CreateWallet(ctx context.Context, arg CreateWalletParams) (Wallet, error) CreateWalletLock(ctx context.Context, arg CreateWalletLockParams) (WalletLock, error) DeleteAPITokenByID(ctx context.Context, id int64) error DeleteAPITokenByToken(ctx context.Context, token string) error DeleteMerchantAddress(ctx context.Context, arg DeleteMerchantAddressParams) error DeletePaymentLinkByPublicID(ctx context.Context, arg DeletePaymentLinkByPublicIDParams) error DeleteUser(ctx context.Context, id int64) error EagerLoadTransactionsByPaymentID(ctx context.Context, arg EagerLoadTransactionsByPaymentIDParams) ([]Transaction, error) GetAPIToken(ctx context.Context, arg GetAPITokenParams) (ApiToken, error) GetAPITokenByUUID(ctx context.Context, uuid uuid.UUID) (ApiToken, error) GetAvailableWallet(ctx context.Context, arg GetAvailableWalletParams) (Wallet, error) GetBalanceByFilter(ctx context.Context, arg GetBalanceByFilterParams) (Balance, error) GetBalanceByFilterWithLock(ctx context.Context, arg GetBalanceByFilterWithLockParams) (Balance, error) GetBalanceByID(ctx context.Context, arg GetBalanceByIDParams) (Balance, error) GetBalanceByIDWithLock(ctx context.Context, id int64) (Balance, error) GetBalanceByUUID(ctx context.Context, arg GetBalanceByUUIDParams) (Balance, error) GetBatchCustomers(ctx context.Context, arg GetBatchCustomersParams) ([]Customer, error) GetBatchExpiredPayments(ctx context.Context, arg GetBatchExpiredPaymentsParams) ([]Payment, error) GetCustomerByEmail(ctx context.Context, arg GetCustomerByEmailParams) (Customer, error) GetCustomerByID(ctx context.Context, arg GetCustomerByIDParams) (Customer, error) GetCustomerByUUID(ctx context.Context, arg GetCustomerByUUIDParams) (Customer, error) GetLatestTransactionByPaymentID(ctx context.Context, entityID sql.NullInt64) (Transaction, error) GetMerchantAddressByAddress(ctx context.Context, arg GetMerchantAddressByAddressParams) (MerchantAddress, error) GetMerchantAddressByID(ctx context.Context, arg GetMerchantAddressByIDParams) (MerchantAddress, error) GetMerchantAddressByUUID(ctx context.Context, arg GetMerchantAddressByUUIDParams) (MerchantAddress, error) GetMerchantByID(ctx context.Context, arg GetMerchantByIDParams) (Merchant, error) GetMerchantByUUID(ctx context.Context, arg GetMerchantByUUIDParams) (Merchant, error) GetMerchantByUUIDAndCreatorID(ctx context.Context, arg GetMerchantByUUIDAndCreatorIDParams) (Merchant, error) GetPaymentByID(ctx context.Context, arg GetPaymentByIDParams) (Payment, error) GetPaymentByMerchantIDAndOrderUUID(ctx context.Context, arg GetPaymentByMerchantIDAndOrderUUIDParams) (Payment, error) GetPaymentByMerchantIDs(ctx context.Context, arg GetPaymentByMerchantIDsParams) (Payment, error) GetPaymentByPublicID(ctx context.Context, publicID uuid.UUID) (Payment, error) GetPaymentLinkByID(ctx context.Context, arg GetPaymentLinkByIDParams) (PaymentLink, error) GetPaymentLinkByPublicID(ctx context.Context, arg GetPaymentLinkByPublicIDParams) (PaymentLink, error) GetPaymentLinkBySlug(ctx context.Context, slug string) (PaymentLink, error) GetPaymentsByType(ctx context.Context, arg GetPaymentsByTypeParams) ([]Payment, error) GetRecentCustomerPayments(ctx context.Context, arg GetRecentCustomerPaymentsParams) ([]Payment, error) GetRegistryItemByKey(ctx context.Context, arg GetRegistryItemByKeyParams) (Registry, error) GetTransactionByHashAndNetworkID(ctx context.Context, arg GetTransactionByHashAndNetworkIDParams) (Transaction, error) GetTransactionByID(ctx context.Context, arg GetTransactionByIDParams) (Transaction, error) GetTransactionsByFilter(ctx context.Context, arg GetTransactionsByFilterParams) ([]Transaction, error) GetUserByEmail(ctx context.Context, email string) (User, error) GetUserByGoogleID(ctx context.Context, googleID sql.NullString) (User, error) GetUserByID(ctx context.Context, id int64) (User, error) GetWalletByID(ctx context.Context, id int64) (Wallet, error) GetWalletByUUID(ctx context.Context, uuid uuid.UUID) (Wallet, error) GetWalletForUpdateByID(ctx context.Context, id int64) (Wallet, error) GetWalletLock(ctx context.Context, arg GetWalletLockParams) (WalletLock, error) InsertBalanceAuditLog(ctx context.Context, arg InsertBalanceAuditLogParams) error ListAPITokensByEntity(ctx context.Context, arg ListAPITokensByEntityParams) ([]ApiToken, error) ListBalances(ctx context.Context, arg ListBalancesParams) ([]Balance, error) ListJobLogsByID(ctx context.Context, arg ListJobLogsByIDParams) ([]JobLog, error) ListMerchantAddresses(ctx context.Context, merchantID int64) ([]MerchantAddress, error) ListMerchantsByCreatorID(ctx context.Context, arg ListMerchantsByCreatorIDParams) ([]Merchant, error) ListPaymentLinks(ctx context.Context, arg ListPaymentLinksParams) ([]PaymentLink, error) ListUsers(ctx context.Context) ([]User, error) PaginateCustomersAsc(ctx context.Context, arg PaginateCustomersAscParams) ([]Customer, error) PaginateCustomersDesc(ctx context.Context, arg PaginateCustomersDescParams) ([]Customer, error) PaginatePaymentsAsc(ctx context.Context, arg PaginatePaymentsAscParams) ([]Payment, error) PaginatePaymentsDesc(ctx context.Context, arg PaginatePaymentsDescParams) ([]Payment, error) PaginateWalletsByID(ctx context.Context, arg PaginateWalletsByIDParams) ([]Wallet, error) ReleaseWalletLock(ctx context.Context, id int64) error SetTransactionHash(ctx context.Context, arg SetTransactionHashParams) error SoftDeleteMerchantByUUID(ctx context.Context, uuid uuid.UUID) error UpdateBalanceByID(ctx context.Context, arg UpdateBalanceByIDParams) (Balance, error) UpdateMerchant(ctx context.Context, arg UpdateMerchantParams) (Merchant, error) UpdateMerchantAddress(ctx context.Context, arg UpdateMerchantAddressParams) (MerchantAddress, error) UpdateMerchantSettings(ctx context.Context, arg UpdateMerchantSettingsParams) error UpdatePayment(ctx context.Context, arg UpdatePaymentParams) (Payment, error) UpdatePaymentCustomerID(ctx context.Context, arg UpdatePaymentCustomerIDParams) error UpdatePaymentWebhookInfo(ctx context.Context, arg UpdatePaymentWebhookInfoParams) error UpdateRegistryItem(ctx context.Context, arg UpdateRegistryItemParams) (Registry, error) UpdateTransaction(ctx context.Context, arg UpdateTransactionParams) (Transaction, error) UpdateUser(ctx context.Context, arg UpdateUserParams) (User, error) UpdateUserPassword(ctx context.Context, arg UpdateUserPasswordParams) (User, error) UpdateWalletMainnetTransactionCounters(ctx context.Context, arg UpdateWalletMainnetTransactionCountersParams) error UpdateWalletTatumFields(ctx context.Context, arg UpdateWalletTatumFieldsParams) (Wallet, error) UpdateWalletTestnetTransactionCounters(ctx context.Context, arg UpdateWalletTestnetTransactionCountersParams) error }
type Queries ¶
type Queries struct {
// contains filtered or unexported fields
}
func (*Queries) AdvisoryTransactionLock ¶
func (*Queries) AdvisoryTransactionUnlock ¶
func (*Queries) AdvisoryTxLock ¶
func (*Queries) CalculateCustomerPayments ¶
func (*Queries) CancelTransaction ¶
func (q *Queries) CancelTransaction(ctx context.Context, arg CancelTransactionParams) error
func (*Queries) CheckSystemWalletExistsByAddress ¶
func (*Queries) CreateAPIToken ¶
func (*Queries) CreateBalance ¶
func (*Queries) CreateCustomer ¶
func (*Queries) CreateJobLog ¶
func (q *Queries) CreateJobLog(ctx context.Context, arg CreateJobLogParams) error
func (*Queries) CreateMerchant ¶
func (*Queries) CreateMerchantAddress ¶
func (q *Queries) CreateMerchantAddress(ctx context.Context, arg CreateMerchantAddressParams) (MerchantAddress, error)
func (*Queries) CreatePayment ¶
func (*Queries) CreatePaymentLink ¶
func (q *Queries) CreatePaymentLink(ctx context.Context, arg CreatePaymentLinkParams) (PaymentLink, error)
func (*Queries) CreateRegistryItem ¶
func (*Queries) CreateTransaction ¶
func (q *Queries) CreateTransaction(ctx context.Context, arg CreateTransactionParams) (Transaction, error)
func (*Queries) CreateUser ¶
func (*Queries) CreateWallet ¶
func (*Queries) CreateWalletLock ¶
func (q *Queries) CreateWalletLock(ctx context.Context, arg CreateWalletLockParams) (WalletLock, error)
func (*Queries) DeleteAPITokenByID ¶
func (*Queries) DeleteAPITokenByToken ¶
func (*Queries) DeleteMerchantAddress ¶
func (q *Queries) DeleteMerchantAddress(ctx context.Context, arg DeleteMerchantAddressParams) error
func (*Queries) DeletePaymentLinkByPublicID ¶
func (q *Queries) DeletePaymentLinkByPublicID(ctx context.Context, arg DeletePaymentLinkByPublicIDParams) error
func (*Queries) EagerLoadTransactionsByPaymentID ¶
func (q *Queries) EagerLoadTransactionsByPaymentID(ctx context.Context, arg EagerLoadTransactionsByPaymentIDParams) ([]Transaction, error)
func (*Queries) GetAPIToken ¶
func (*Queries) GetAPITokenByUUID ¶
func (*Queries) GetAvailableWallet ¶
func (*Queries) GetBalanceByFilter ¶
func (*Queries) GetBalanceByFilterWithLock ¶
func (*Queries) GetBalanceByID ¶
func (*Queries) GetBalanceByIDWithLock ¶
func (*Queries) GetBalanceByUUID ¶
func (*Queries) GetBatchCustomers ¶
func (*Queries) GetBatchExpiredPayments ¶
func (*Queries) GetCustomerByEmail ¶
func (*Queries) GetCustomerByID ¶
func (*Queries) GetCustomerByUUID ¶
func (*Queries) GetLatestTransactionByPaymentID ¶
func (*Queries) GetMerchantAddressByAddress ¶
func (q *Queries) GetMerchantAddressByAddress(ctx context.Context, arg GetMerchantAddressByAddressParams) (MerchantAddress, error)
func (*Queries) GetMerchantAddressByID ¶
func (q *Queries) GetMerchantAddressByID(ctx context.Context, arg GetMerchantAddressByIDParams) (MerchantAddress, error)
func (*Queries) GetMerchantAddressByUUID ¶
func (q *Queries) GetMerchantAddressByUUID(ctx context.Context, arg GetMerchantAddressByUUIDParams) (MerchantAddress, error)
func (*Queries) GetMerchantByID ¶
func (*Queries) GetMerchantByUUID ¶
func (*Queries) GetMerchantByUUIDAndCreatorID ¶
func (*Queries) GetPaymentByID ¶
func (*Queries) GetPaymentByMerchantIDAndOrderUUID ¶
func (*Queries) GetPaymentByMerchantIDs ¶
func (*Queries) GetPaymentByPublicID ¶
func (*Queries) GetPaymentLinkByID ¶
func (q *Queries) GetPaymentLinkByID(ctx context.Context, arg GetPaymentLinkByIDParams) (PaymentLink, error)
func (*Queries) GetPaymentLinkByPublicID ¶
func (q *Queries) GetPaymentLinkByPublicID(ctx context.Context, arg GetPaymentLinkByPublicIDParams) (PaymentLink, error)
func (*Queries) GetPaymentLinkBySlug ¶
func (*Queries) GetPaymentsByType ¶
func (*Queries) GetRecentCustomerPayments ¶
func (*Queries) GetRegistryItemByKey ¶
func (*Queries) GetTransactionByHashAndNetworkID ¶
func (q *Queries) GetTransactionByHashAndNetworkID(ctx context.Context, arg GetTransactionByHashAndNetworkIDParams) (Transaction, error)
func (*Queries) GetTransactionByID ¶
func (q *Queries) GetTransactionByID(ctx context.Context, arg GetTransactionByIDParams) (Transaction, error)
func (*Queries) GetTransactionsByFilter ¶
func (q *Queries) GetTransactionsByFilter(ctx context.Context, arg GetTransactionsByFilterParams) ([]Transaction, error)
func (*Queries) GetUserByEmail ¶
func (*Queries) GetUserByGoogleID ¶
func (*Queries) GetUserByID ¶
func (*Queries) GetWalletByID ¶
func (*Queries) GetWalletByUUID ¶
func (*Queries) GetWalletForUpdateByID ¶
func (*Queries) GetWalletLock ¶
func (q *Queries) GetWalletLock(ctx context.Context, arg GetWalletLockParams) (WalletLock, error)
func (*Queries) InsertBalanceAuditLog ¶
func (q *Queries) InsertBalanceAuditLog(ctx context.Context, arg InsertBalanceAuditLogParams) error
func (*Queries) ListAPITokensByEntity ¶
func (*Queries) ListBalances ¶
func (*Queries) ListJobLogsByID ¶
func (*Queries) ListMerchantAddresses ¶
func (*Queries) ListMerchantsByCreatorID ¶
func (*Queries) ListPaymentLinks ¶
func (q *Queries) ListPaymentLinks(ctx context.Context, arg ListPaymentLinksParams) ([]PaymentLink, error)
func (*Queries) PaginateCustomersAsc ¶
func (*Queries) PaginateCustomersDesc ¶
func (*Queries) PaginatePaymentsAsc ¶
func (*Queries) PaginatePaymentsDesc ¶
func (*Queries) PaginateWalletsByID ¶
func (*Queries) ReleaseWalletLock ¶
func (*Queries) SetTransactionHash ¶
func (q *Queries) SetTransactionHash(ctx context.Context, arg SetTransactionHashParams) error
func (*Queries) SoftDeleteMerchantByUUID ¶
func (*Queries) UpdateBalanceByID ¶
func (*Queries) UpdateMerchant ¶
func (*Queries) UpdateMerchantAddress ¶
func (q *Queries) UpdateMerchantAddress(ctx context.Context, arg UpdateMerchantAddressParams) (MerchantAddress, error)
func (*Queries) UpdateMerchantSettings ¶
func (q *Queries) UpdateMerchantSettings(ctx context.Context, arg UpdateMerchantSettingsParams) error
func (*Queries) UpdatePayment ¶
func (*Queries) UpdatePaymentCustomerID ¶
func (q *Queries) UpdatePaymentCustomerID(ctx context.Context, arg UpdatePaymentCustomerIDParams) error
func (*Queries) UpdatePaymentWebhookInfo ¶
func (q *Queries) UpdatePaymentWebhookInfo(ctx context.Context, arg UpdatePaymentWebhookInfoParams) error
func (*Queries) UpdateRegistryItem ¶
func (*Queries) UpdateTransaction ¶
func (q *Queries) UpdateTransaction(ctx context.Context, arg UpdateTransactionParams) (Transaction, error)
func (*Queries) UpdateUser ¶
func (*Queries) UpdateUserPassword ¶
func (*Queries) UpdateWalletMainnetTransactionCounters ¶
func (q *Queries) UpdateWalletMainnetTransactionCounters(ctx context.Context, arg UpdateWalletMainnetTransactionCountersParams) error
func (*Queries) UpdateWalletTatumFields ¶
func (*Queries) UpdateWalletTestnetTransactionCounters ¶
func (q *Queries) UpdateWalletTestnetTransactionCounters(ctx context.Context, arg UpdateWalletTestnetTransactionCountersParams) error
type Storage ¶
type Storage interface { Querier RunTransaction(ctx context.Context, callback TxCallback) error }
type Store ¶
type Store struct { Queries // contains filtered or unexported fields }
Store combines features of a repo and db connection (e.g. transaction support)
func (*Store) RunTransaction ¶
func (s *Store) RunTransaction(ctx context.Context, callback TxCallback) error
type Transaction ¶
type Transaction struct { ID int64 CreatedAt time.Time UpdatedAt time.Time MerchantID int64 Status string Type string EntityID sql.NullInt64 RecipientWalletID sql.NullInt64 SenderAddress sql.NullString RecipientAddress string TransactionHash sql.NullString Blockchain string CurrencyType string Currency string Decimals int32 Amount pgtype.Numeric FactAmount pgtype.Numeric NetworkFee pgtype.Numeric ServiceFee pgtype.Numeric UsdAmount pgtype.Numeric Metadata pgtype.JSONB NetworkID sql.NullString IsTest bool NetworkDecimals int32 SenderWalletID sql.NullInt64 }
type UpdateBalanceByIDParams ¶
type UpdateMerchantParams ¶
type UpdatePaymentParams ¶
type UpdateTransactionParams ¶
type UpdateUserParams ¶
type UpdateUserPasswordParams ¶
type UpdateUserPasswordParams struct { ID int64 Password sql.NullString UpdatedAt time.Time }
type UpdateWalletTatumFieldsParams ¶
type UpdateWalletTatumFieldsParams struct { TatumMainnetSubscriptionID sql.NullString TatumTestnetSubscriptionID sql.NullString ID int64 }
type Wallet ¶
type Wallet struct { ID int64 CreatedAt time.Time Uuid uuid.UUID Address string Blockchain string TatumMainnetSubscriptionID sql.NullString TatumTestnetSubscriptionID sql.NullString Type sql.NullString ConfirmedMainnetTransactions int64 PendingMainnetTransactions int64 PendingTestnetTransactions int64 ConfirmedTestnetTransactions int64 }
Source Files ¶
Click to show internal directories.
Click to hide internal directories.