Documentation ¶
Index ¶
- Variables
- func ChiURLParamToFloat32(r *http.Request, key string, def float32) (res float32)
- func ChiURLParamToFloat64(r *http.Request, key string, def float64) (res float64)
- func ChiURLParamToInt(r *http.Request, key string, def int) (res int)
- func ChiURLParamToInt64(r *http.Request, key string, def int64) (res int64)
- func ChiURLParamToString(r *http.Request, key string) string
- func GenerateBookingCode(orderAt time.Time, email, username, phone string, charlen int) (res string)
- func GenerateID(prefix ...string) (res string)
- func GenerateObjectID(prefix ...string) (res string)
- func GenerateProductCode(names ...string) (res string)
- func GenerateProductCodeWithCode(code bool, names ...string) (res string)
- func GenerateRandom(min, max int) int
- func GenerateRandomString(letters string, charlen int) (res string)
- func GenerateSessionID(email, username, phone string) (res string)
- func GenerateTranscationID(generateAt time.Time, email, username, phone string, charlen int) (res string)
- func GenerateULID(prefix ...string) (res string)
- func GenerateUUID(prefix ...string) (res string)
- func GetAlphanumeric(s string) (res string)
- func IsArrayStringExist(ars []string, s string) (b bool)
- func IsEmailValid(email string) bool
- func IsPhoneCodeValid(phoneCode string) bool
- func IsPhoneValid(phone string) bool
- func LoadTimeLocation(loc string) (l *time.Location)
- func MaxFloat64(s ...float64) (r float64)
- func MaxInt(s ...int) (r int)
- func MaxInt64(s ...int64) (r int64)
- func MinFloat64(s ...float64) (r float64)
- func MinInt(s ...int) (r int)
- func MinInt64(s ...int64) (r int64)
- func MustLoadTimeWithLocation(t time.Time, loc *time.Location) time.Time
- func MustParseTime(from, layout string) (res time.Time)
- func MustParseTimeWithLocation(from, layout string, loc *time.Location) time.Time
- func QueryString(r *http.Request, key string) string
- func QueryStringToBool(r *http.Request, key string) bool
- func QueryStringToFloat64(r *http.Request, key string, def float64) float64
- func QueryStringToFloat64Ptr(r *http.Request, key string) *float64
- func QueryStringToInt(r *http.Request, key string, def int) int
- func QueryStringToInt64(r *http.Request, key string, def int64) int64
- func QueryStringToInts(r *http.Request, key string, def int) (res []int)
- func QueryStringToPointerBool(r *http.Request, key string) *bool
- func QueryStringToTime(r *http.Request, key string) time.Time
- func QueryStringToTimeWithFromat(r *http.Request, key, format string) (t time.Time)
- func QueryStrings(r *http.Request, key string) []string
- func RegisterDeleteEndpoint(logger *logrus.Logger, r chi.Router, handler http.HandlerFunc, ...)
- func RegisterGetEndpoint(logger *logrus.Logger, r chi.Router, handler http.HandlerFunc, ...)
- func RegisterPatchEndpoint(logger *logrus.Logger, r chi.Router, handler http.HandlerFunc, ...)
- func RegisterPostEndpoint(logger *logrus.Logger, r chi.Router, handler http.HandlerFunc, ...)
- func RegisterPutEndpoint(logger *logrus.Logger, r chi.Router, handler http.HandlerFunc, ...)
- func SearchInArrayString(ars []string, s string) (pos int)
- func StringOr(ss ...string) string
- func ToCursorString(encryption appencryption.Encryptor, mapCursor map[string]bson.M) (lastCursor string, err error)
- func ToFloat32(src string, def float32) (res float32)
- func ToFloat64(src string, def float64) (res float64)
- func ToInt(from string, deflt int) int
- func ToInt64(from string, def int64) (res int64)
- func ToIntFromBool(b bool, t, f int) int
- func ToIntWithMax(from string, deflt, max int) int
- func ToIntWithMin(from string, deflt, min int) int
- func ToIntWithMinMax(from string, deflt, min, max int) int
- func ToMapCursor(mapCursor map[string]bson.M) (mongoFilter bson.M)
- func ToMongoSort(sorts []string) (mongoSort bson.D)
- func ToTimeInt(t time.Time) int64
- func ToTimeIntWithLocation(t time.Time, loc *time.Location) int64
- func ToTimeString(t time.Time) string
- func ToTimeStringWithLocation(t time.Time, loc *time.Location) string
Constants ¶
This section is empty.
Variables ¶
View Source
var ( TimeLocationUTC *time.Location = time.UTC TimeLocationJakarta *time.Location = LoadTimeLocation("Asia/Jakarta") )
Functions ¶
func ChiURLParamToFloat32 ¶
func ChiURLParamToFloat64 ¶
func ChiURLParamToInt64 ¶
func GenerateBookingCode ¶
func GenerateID ¶
func GenerateObjectID ¶
func GenerateProductCode ¶
func GenerateRandom ¶
func GenerateRandomString ¶
func GenerateSessionID ¶
func GenerateTranscationID ¶
func GenerateULID ¶
func GenerateUUID ¶
func GetAlphanumeric ¶
func IsArrayStringExist ¶
func IsEmailValid ¶
func IsPhoneCodeValid ¶
func IsPhoneValid ¶
func LoadTimeLocation ¶
func MaxFloat64 ¶
func MinFloat64 ¶
func MustParseTime ¶
func QueryString ¶
QueryStringToString definition
func QueryStringToBool ¶
QueryStringToFloat64 definition
func QueryStringToFloat64 ¶
QueryStringToFloat64 definition
func QueryStringToFloat64Ptr ¶
QueryStringToFloat64 definition
func QueryStringToInt ¶
QueryStringToInt definition
func QueryStringToInt64 ¶
QueryStringToInt definition
func QueryStringToPointerBool ¶
QueryStringToFloat64 definition
func RegisterDeleteEndpoint ¶
func RegisterGetEndpoint ¶
func RegisterPatchEndpoint ¶
func RegisterPostEndpoint ¶
func RegisterPutEndpoint ¶
func SearchInArrayString ¶
func ToCursorString ¶
func ToIntFromBool ¶
func ToIntWithMax ¶
func ToIntWithMin ¶
func ToIntWithMinMax ¶
func ToMongoSort ¶
func ToTimeString ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.