Documentation ¶
Index ¶
- func ComparePassword(hashPassword []byte, rawPassword []byte) error
- func FloatToStr(aval float64) string
- func HashPassword(password string, cost int) string
- func InArray(val interface{}, array interface{}) (exists bool, index int)
- func Int64ToStr(aval int64) string
- func JoinInt64Array(lns []int64, sep string) string
- func NewFuncMap() map[string]interface{}
- func ParseAndExecTemplateFromString(s string, data interface{}) (string, error)
- func ParseInt(str string, base int, bitSize int) (i int64, flag bool)
- func ParseTime(val string) (time.Time, error)
- func Passkey() string
- func StrToDate(aval string) (time.Time, error)
- func StrToFloat(aval string) float64
- func StrToInt(aval string) int
- func StrToInt64(aval string) int64
- func StrToTime(aval string) (time.Time, error)
- func StrToTimeStamp(aval string) (time.Time, error)
- func StringInSlice(a string, list []string) bool
- func ToSnakeCase(str string) string
- func ValidateStruct(r interface{}) (map[string]string, error)
- type Logger
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ComparePassword ¶
ComparePassword bcrypt compare with given hash password and raw password
func FloatToStr ¶
FloatToStr formats float number for text representation. TODO: add formatting options as "#,##0.00"
func HashPassword ¶
HashPassword bcrypt hash generator with given password string and cost
func Int64ToStr ¶
Int64ToStr is shorthand for strconv.FormatInt with base 10
func JoinInt64Array ¶
JoinInt64Array int64 array join
func ParseAndExecTemplateFromString ¶
ParseAndExecTemplateFromString parses string, creates template and exeutes, returns resulting string
func Passkey ¶
func Passkey() string
Passkey generates a string passkey with an absolute length of 192.
func StrToFloat ¶
StrToFloat is shorhand for strconv.ParseFşoat with bitSize 64, returns 0 if parsing error occurs.
func StrToInt64 ¶
StrToInt64 is shorthand for strconv.ParseInt with base 10, bitSize 64, returns 0 if parsing error occurs.
func StrToTimeStamp ¶
StrToTimeStamp string to timestamp
func StringInSlice ¶
StringInSlice string slice search
func ValidateStruct ¶
ValidateStruct struct validator