util

package
v0.0.0-...-17f2f0b Latest Latest
Warning

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

Go to latest
Published: Jan 5, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DepositorRole = "depositor"
	AdminRole     = "admin"
)

Variables

This section is empty.

Functions

func CheckPassword

func CheckPassword(password string, hashedPassword string) error

func HashPassword

func HashPassword(password string) (string, error)

func RandomAdmStatus

func RandomAdmStatus() string

Random Admin status for the client

func RandomCurrency

func RandomCurrency() string

RandomCurrency generates a random currency code

func RandomEmail

func RandomEmail() string

RandomEmail generates a random email

func RandomInt

func RandomInt(min, max int64) int64

RandomInt generates a random integer between min and max

func RandomKycStatus

func RandomKycStatus() string

Random KYC status for the client

func RandomMoney

func RandomMoney() int64

RandomMoney generates a random amount of money

func RandomName

func RandomName() string

RandomOwner generates a random owner name

func RandomString

func RandomString(n int) string

RandomString generates a random string of length n

func RandomSurname

func RandomSurname() string

func RandomUUID

func RandomUUID() uuid.UUID

Random UUID

Types

type Config

type Config struct {
	DBSource             string        `mapstructure:"DB_SOURCE"`
	HttpServerAddress    string        `mapstructure:"HTTP_SERVER_ADDRESS"`
	GrpcServerAddress    string        `mapstructure:"GRPC_SERVER_ADDRESS"`
	TokenSymmetricKey    string        `mapstructure:"TOKEN_SYMMETRIC_KEY"`
	AccessTokenDuration  time.Duration `mapstructure:"ACCESS_TOKEN_DURATION"`
	RefreshTokenDuration time.Duration `mapstructure:"REFRESH_TOKEN_DURATION"`
}

func LoadConfig

func LoadConfig(path string) (config Config, err error)

Jump to

Keyboard shortcuts

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