util

package
v0.3.0 Latest Latest
Warning

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

Go to latest
Published: Oct 12, 2024 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultFailedSqlTxInitMsg                    string = "An error occurred while initiating an SQL transaction."
	DefaultFailedSqlQueryMsg                     string = "An error occurred while executing a SQL query."
	DefaultFailedScanningToPostgresqlDataTypeMsg string = "An error occurred while scanning the value into a PostgreSQL data type."
	DefaultFailedFetchingXMRDaemonMsg            string = "An error occurred while fetching."
)
View Source
const (
	SEND_TIMEOUT time.Duration = 10 * time.Second
)

Variables

This section is empty.

Functions

func DbCoinToPbCoin

func DbCoinToPbCoin(coin db.CoinType) (pb_v1.CoinType, error)

func DbInvoiceStatusToPbInvoiceStatus

func DbInvoiceStatusToPbInvoiceStatus(status db.InvoiceStatusType) (pb_v1.InvoiceStatusType, error)

func DbInvoiceToPbInvoice

func DbInvoiceToPbInvoice(invoice *db.Invoice) *pb_v1.Invoice

func InitDbQueriesWithTx

func InitDbQueriesWithTx(ctx context.Context, dbConnPool *pgxpool.Pool) (*db.Queries, pgx.Tx, error)

func PbCoinToDbCoin

func PbCoinToDbCoin(coin pb_v1.CoinType) (db.CoinType, error)

func PbNewInvoiceToProcessorNewInvoice

func PbNewInvoiceToProcessorNewInvoice(req *pb_v1.CreateInvoiceRequest) *dto.NewInvoiceRequest

func PgUUIDToString

func PgUUIDToString(uuid pgtype.UUID) string

func StringToPgUUID

func StringToPgUUID(uuidStr string) (*pgtype.UUID, error)

Types

type SyncMapTypeSafe

type SyncMapTypeSafe[K any, V any] struct {
	// contains filtered or unexported fields
}

func (*SyncMapTypeSafe[K, V]) Delete

func (m *SyncMapTypeSafe[K, V]) Delete(key K)

func (*SyncMapTypeSafe[K, V]) Load

func (m *SyncMapTypeSafe[K, V]) Load(key K) (value V, ok bool)

func (*SyncMapTypeSafe[K, V]) LoadAndDelete

func (m *SyncMapTypeSafe[K, V]) LoadAndDelete(key K) (value V, loaded bool)

func (*SyncMapTypeSafe[K, V]) LoadOrStore

func (m *SyncMapTypeSafe[K, V]) LoadOrStore(key K, value V) (actual V, loaded bool)

func (*SyncMapTypeSafe[K, V]) Range

func (m *SyncMapTypeSafe[K, V]) Range(f func(key K, value V) bool)

func (*SyncMapTypeSafe[K, V]) Store

func (m *SyncMapTypeSafe[K, V]) Store(key K, value V)

Jump to

Keyboard shortcuts

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