Documentation
¶
Index ¶
- func BytesIntoInterface(data []byte, v interface{}) error
- func CalcDistanceGeo(lat float64, long float64, lat2 float64, long2 float64) uint
- func CheckFolder(path string) error
- func CheckPasswordHash(password, hash string) bool
- func ComparePointerTime(time1 *time.Time, time2 *time.Time) bool
- func CompareSignatureKey(data string, signatureKey string, typeModule string) bool
- func ContainsList(str string, s []string) bool
- func ConvertImageToBase64(folder string, filename string) string
- func ConvertStructToInterface(unchangedValue interface{}, changedValue interface{}) ([]string, *map[string]interface{})
- func DecryptAES(encryptedString string) (string, error)
- func DownloadFileURL(URL, folder string, fileName string) (string, error)
- func EmailTemplate(htmlTemplate string, emailData map[string]interface{}) string
- func EncryptAES(stringToEncrypt string) (string, error)
- func FcmMessage(message map[string]interface{}) bool
- func FileRemove(path string) error
- func FindURLImageTarget(targets string) bool
- func GenerateRandomString(length int) string
- func GenerateReferralCode() string
- func GenerateStringWithCharSet(length int) string
- func GetDifferentValueStruct(original interface{}, new interface{}) map[string]interface{}
- func GetDiscountPercentage(original float64, discounted float64) uint
- func GetEnv(key string, defaultValue string) string
- func GetLastStartSessionDay() time.Time
- func HashIDDecode(key string) (uint, bool)
- func HashIDEncode(id uint) string
- func HashPassword(password string) (string, error)
- func InterfacetoBytes(v interface{}) ([]byte, error)
- func IsValidUUID(uuid string) bool
- func JoinStrings(str []string) string
- func MakeDirs(path string) error
- func ParsingSpecialStringAlphanumeric(text string) string
- func ParsingSpecialStringForS3(text string) string
- func PlateNumberValidator(num string) (string, error)
- func PointerBool(value *bool) bool
- func PointerFloat64(value *float64) float64
- func PointerInt(value *int) int
- func PointerString(str *string) string
- func PointerUint(value *uint) uint
- func PointerUintToPointerBool(value *uint) *bool
- func QueryBuilder(query map[string]string) *dto.Filter
- func QueryParser(query map[string][]string) map[string]string
- func RandInt(min int, max int) int
- func RequestBody(context *gin.Context, order interface{}) error
- func Reverse(str string) (result string)
- func SetBool(value bool) *bool
- func SetFCMTopic(registrationID string, topic string, fcmType string) bool
- func SetFloat64(value float64) *float64
- func SetInt(value int) *int
- func SetString(value string) *string
- func SetUint(value uint) *uint
- func Slugify(str string) string
- func StrToUint64(value string) uint64
- func StringPick(str string, min float64, max float64) string
- func StringShuffle(str string) string
- func StringToInt(str string) int
- func StringToInt64(str string) int64
- func TimeTrack(start time.Time, name string)
- func ToJSONDOB(dob string) string
- func ToJSONFloat64(data *float64) *float64
- func ToJSONImage(pathImg string) string
- func ToJSONUnix(date *time.Time) interface{}
- func ToJSONVideo(pathVideo string) string
- func ToString(value interface{}) string
- func UnixToDate(unixString string) *time.Time
- func UploadFile(gcsfolder, filepath, filename string) (*string, error)
- func UploadImage(base64image string, folder string, filename string) (*string, error)
- func ZeroValuesHandler(request interface{}) map[string]interface{}
- type MailgunTemplate
- type SendGrid
- type SendGridInterface
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BytesIntoInterface ¶
BytesIntoInterface ...
func CalcDistanceGeo ¶
CalcDistanceGeo calculate distance 2 coordinate lat long @params: latitude ,Longitude,latitude2 ,Longitude2
func ComparePointerTime ¶
ComparePinterTime Input 2 data from *time.Time and the comparison is if a < b return true else false
func CompareSignatureKey ¶
CompareSignatureKey ...
func ContainsList ¶
ContainsList checks if a string is present in a slice
func ConvertImageToBase64 ¶
ConvertImageToBase64 convert local image to base64 string
func ConvertStructToInterface ¶
func ConvertStructToInterface(unchangedValue interface{}, changedValue interface{}) ([]string, *map[string]interface{})
ConvertStructToInterface ...
func DownloadFileURL ¶
DownloadFileURL ...
func EmailTemplate ¶
EmailTemplate ...
func FindURLImageTarget ¶
FindURLImageTarget check key for slice
func GenerateRandomString ¶
GenerateRandomString params @length: int return string
func GenerateStringWithCharSet ¶
GenerateStringWithCharSet params @Length: int return string
func GetDifferentValueStruct ¶
func GetDifferentValueStruct(original interface{}, new interface{}) map[string]interface{}
GetDifferentValueStruct get map[string]interface{} if value of different field value compare 2 structs and return different field value only @note 2 structs must be same field and type @params original interface{},new interface{} @return map[string]interface{}
func GetDiscountPercentage ¶
GetDiscountPercentage ..
func GetLastStartSessionDay ¶
GetLastStartSessionDay get date of monday session
func IsValidUUID ¶
IsValidUUID params @summary check if UUID is valid with regex @uuid: string return bool
func JoinStrings ¶
JoinStrings params @summary join string with array seperator [","] @str: []string return string
func ParsingSpecialStringAlphanumeric ¶
ParsingSpecialStringAlphanumeric func @text: string return string
func ParsingSpecialStringForS3 ¶
ParsingSpecialStringForS3 func @text: string return string
func PlateNumberValidator ¶
func PointerBool ¶
func PointerInt ¶
func SetFCMTopic ¶
SetFCMTopic ...
func ToJSONFloat64 ¶
ToJSONFloat64 check and convert to unix
func UnixToDate ¶
func UploadFile ¶
func UploadImage ¶
UploadImage ... return path, error
func ZeroValuesHandler ¶
func ZeroValuesHandler(request interface{}) map[string]interface{}
ZeroValuesHandler get map[string]interface{} if value of different field value compare 2 structs and return different field value only @note 2 structs must be same field and type @params original interface{},new interface{} @return map[string]interface{}
Types ¶
type MailgunTemplate ¶
type MailgunTemplate struct { Sender string Subject string Body string Recipient string HTMLString string }
MailgunTemplate ...