util

package
v0.0.0-...-ce8d5b4 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	RAFFLE_IS_CLOSED        = "the raffle is closed"
	PARTICIPANT_DUPLICATED  = "participant duplicated"
	CANNOT_ADD_TICKET_VOID  = "cannot add ticket void"
	CANNOT_ADD_MORE_TICKETS = "cannot add more tickets"
)

Variables

This section is empty.

Functions

func RandomString

func RandomString(n int) string

func StructToDocument

func StructToDocument(i interface{}) (doc *bson.D, err error)

Types

type Config

type Config struct {
	DBDriver            string        `mapstructure:"DB_DRIVER"`
	DBSource            string        `mapstructure:"DB_SOURCE"`
	DBUri               string        `mapstructure:"DB_URI"`
	ServerAddress       string        `mapstructure:"SERVER_ADDRESS"`
	TokenSymmetricKey   string        `mapstructure:"TOKEN_SYMMETRIC_KEY"`
	DbName              string        `mapstructure:"DB_NAME"`
	AccessTokenDuration time.Duration `mapstructure:"ACCESS_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