Documentation ¶
Index ¶
- Variables
- func CalculateStartDate(then time.Time, monday bool, tuesday bool, wednesday bool, thursday bool, ...) (time.Time, bool)
- func CheckJsonData(jsondata map[string]interface{}, mapGenerateID ...[]string) map[string]interface{}
- func ContainInSlice(slice []string, val string) bool
- func ConvertOperators(data interface{}) interface{}
- func ConvertStringToInt(input string) int
- func ConvertStructToJson(s interface{}) []byte
- func ConvertToSlice(s string) []string
- func FetchTime(input string) (hr string, min string)
- func FindNextDate(then time.Time, monday bool, tuesday bool, wednesday bool, thursday bool, ...) time.Time
- func FormatDateStartGen(input string) string
- func FormatDateStartNotT(input string) string
- func FormatDateTimeTH(raw string) string
- func FormatSortDate(intput string) time.Time
- func GenerateID(prefix string) string
- func GenerateUUID() string
- func GetDataFromReflectValue(value reflect.Value, dataType string) interface{}
- func GetDateFromString(intput string) (year int, month int, day int, hour int, min int)
- func GetEnv(key string) string
- func GetEnvBool(key string) bool
- func GetMonthNameTH(month int) string
- func GetStructField(v *interface{}, field string) reflect.Value
- func GetUrl(ipAddress string, apiGroup string, apiEndpoint string) string
- func GetViperJson() *viper.Viper
- func GetYaml(key string) string
- func GetYamlBool(key string) bool
- func GetYamlDuration(key string) time.Duration
- func GetYamlInt(key string) int
- func MapMinuteHour(input string) (string, string)
- func MapMonth(monthStr string) string
- func MapOperators(str string) string
- func NewBoolean(state bool) *bool
- func ParseFloat64ToInt64(input float64) int64
- func RandomCode(length int) string
- func ReverseFormatDate(input string) string
- func SetViperJson(v *viper.Viper)
- func SetViperYaml(v *viper.Viper)
- func SpilitCodeForLastIndex(input string) string
- func SpilitDate(input string) (year string, month string, day string)
- func SpilitOnlyYMD(input string) (day string, month string, year string)
- func SpilitTime(input string) (hour string, min string)
- func StringWithCharset(length int, charset string) string
- func ToString(input interface{}) string
- type StrSlice
Constants ¶
This section is empty.
Variables ¶
View Source
var ViperJson *viper.Viper
View Source
var ViperYaml *viper.Viper
Functions ¶
func CalculateStartDate ¶
func CheckJsonData ¶
func ContainInSlice ¶
func ConvertOperators ¶
func ConvertOperators(data interface{}) interface{}
ConvertOperators is to convert Query Operators
func ConvertStringToInt ¶
func ConvertStructToJson ¶
func ConvertStructToJson(s interface{}) []byte
https://stackoverflow.com/questions/25349694/go-encoding-json-from-relfect-value
func ConvertToSlice ¶
convertToSlice is to convert string to array
func FindNextDate ¶
func FormatDateStartGen ¶
/input 2022-07-01T08:44:18.127Z / 01/07/2022
func FormatDateStartNotT ¶
/input 2022-07-26 16:39:48.5215856 +0700 +07 / 01/07/2022
func GenerateID ¶
GenerateID function is for Generate Document id
func GenerateUUID ¶
func GenerateUUID() string
func GetDataFromReflectValue ¶
func GetDateFromString ¶
input formate 2022-03-17 08:00
func GetEnvBool ¶
func GetMonthNameTH ¶
func GetStructField ¶
func GetViperJson ¶
func GetYamlBool ¶
func GetYamlDuration ¶
func GetYamlInt ¶
func MapMinuteHour ¶
0 = 0.00 15 = 0.25 30 = 0.50 45 = 0.75 60 = 1
func NewBoolean ¶
func ParseFloat64ToInt64 ¶
func RandomCode ¶
func ReverseFormatDate ¶
func SetViperJson ¶
func SetViperYaml ¶
func SpilitDate ¶
01/07/2022 input format1 2022-08-20T08:44:18.127Z input format2
func SpilitOnlyYMD ¶
01-02-2006 15:04:05 input
func StringWithCharset ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.