Documentation ¶
Overview ¶
Package commons assemble all useful functions used in other packages
Index ¶
- Variables
- func BuildDSN() string
- func GetMD5HashWithSum(text string) string
- func GetPagination(page int, start int, end int, rangeLimit int) (startLimit int, EndLimit int)
- func GetRedisURI() string
- func RandomInt(min int, max int) int
- func RandomValueFromArray(array []string) string
- func RedisEnabled() (b bool)
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // SqlDriver var retrieve OS env var SqlDriver = strings.TrimSpace(os.Getenv("SQL_DRIVER")) )
Functions ¶
func BuildDSN ¶
func BuildDSN() string
BuildDSN permit to create string url to connect to the sql instance
func GetMD5HashWithSum ¶
GetMD5HashWithSum function is explicit
func GetPagination ¶
GetPagination function is explicit
func RandomValueFromArray ¶
RandomValueFromArray function is explicit
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.