Documentation ¶
Index ¶
- func AddTranslationV2(key string)
- func AutoTradingColorCode(code string) string
- func BalanceFormat(value float64, d int) (s string)
- func BytesToString(b []byte) string
- func CompareDateTime(dateTimeStart time.Time, operand string, dateTimeEnd time.Time) bool
- func Contains(arr []string, str string) bool
- func ConvertTimeToUnix(value time.Time) string
- func CutOffDecimal(number float64, decimals uint, decPoint, thousandsSep string) string
- func CutOffDecimalBK(number float64, decimals uint, decPoint, thousandsSep string) string
- func CutOffDecimalBK2(number float64, decimals uint, decPoint, thousandsSep string) string
- func CutOffDecimalv2(number float64, decimals uint, decPoint, thousandsSep string, ...) string
- func CutOffStringsDecimal(number string, decimals uint, decPoint byte) string
- func DetrailZeroFloat(value float64, d int) (s float64)
- func Explode(str, delimiter string) []string
- func FNV32a(text string) uint32
- func Float64InSlice(a float64, list []float64) bool
- func FloatEquality(a, b float64) bool
- func GenCheckSum(memId string, walletId string, docNo string, transactionType string, ...) (string, error)
- func GetBinanceMarketPrice(WalletType string) (float64, string)
- func GetCurrentTime() string
- func GetDaysInCurrentMonth() []time.Time
- func GetEncryptedID(code string, id int) string
- func GetLatestMonths(n int) []map[string]time.Time
- func GetLatestWeeks(n int) []map[string]time.Time
- func GetLatestYears(n int) []map[string]time.Time
- func GetMonthStartAndEndDatesWithinDateRange(dateStart, dateEnd time.Time) []map[string]time.Time
- func GetStatusColorCodeByStatusCode(statusCode string) string
- func GetStringInBetween(str string, start string, end string) (result string)
- func GetWeekStartAndEndDatesWithinDateRange(dateStart, dateEnd time.Time) []map[string]time.Time
- func GetYearStartAndEndDatesWithinDateRange(dateStart, dateEnd time.Time) []map[string]time.Time
- func IntInSlice(a int, list []int) bool
- func IsArray(m map[string]interface{}) bool
- func IsMultipleOf(value, multipleOf float64) bool
- func IsNumeric(s string) bool
- func MaskLeft(s string, num int) string
- func MonthStartEndDate(date time.Time) (monthStart, monthEnd time.Time)
- func NumDecPlaces(v float64) int
- func NumberFormat(value float64, d int) (f float64)
- func NumberFormat2Dec(s string) float64
- func NumberFormatInt(s string) int
- func NumberFormatInt64(s string) int64
- func NumberFormatPhp(number float64, decimals uint, decPoint, thousandsSep string) string
- func Paginate(pageNum int, pageSize int, sliceLength int) (int, int)
- func ProcessNumberToDesirePart2String(neg bool, str string, dec int, decPoint string, thousandsSep string) string
- func ProcessNumberToDesireString(number string, dec int) string
- func RandomInt(min, max int) int
- func SpaceStringsBuilder(str string) string
- func StringInSlice(a string, list []string) bool
- func StringToSliceInt(stringList string, separator string) []int
- func Substr(str string, start uint, length int) string
- func Textify(value float64) (s string)
- func TrailZeroFloat(value float64, d int) (s float64)
- func TransDiamondName(diamondName, langCode string) string
- func TransRemark(word string, langCode string) string
- func Translate(word string, langCode string) string
- func TranslateV2(word string, langCode string, params map[string]string) string
- func TruncateToDay(t time.Time) time.Time
- func ValueToBool(value string) (bool, error)
- func ValueToDuration(value string) (time.Duration, error)
- func ValueToFloat(value string) (float64, error)
- func ValueToInt(value string) (int, error)
- func WeekEndDate(date time.Time) time.Time
- func WeekStartDate(date time.Time) time.Time
- func YearStartEndDate(date time.Time) (yearStart, yearEnd time.Time)
- type FMarketPriceStruc
- type SMarketPriceStruc
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AutoTradingColorCode ¶
func BalanceFormat ¶
helpers.BalanceFormat(helpers.NumberFormat2Dec("123123.800"), 8)
func BytesToString ¶
func CompareDateTime ¶
func ConvertTimeToUnix ¶
func CutOffDecimal ¶
func CutOffDecimalBK ¶
func CutOffDecimalBK
func CutOffDecimalBK2 ¶
func CutOffDecimalv2 ¶
func CutOffStringsDecimal ¶
func DetrailZeroFloat ¶
func Float64InSlice ¶
Float64InSlice verify if int in slice
func FloatEquality ¶
func GenCheckSum ¶
func GetBinanceMarketPrice ¶
get market price from binance
func GetCurrentTime ¶
func GetCurrentTime() string
func GetDaysInCurrentMonth ¶
func GetStringInBetween ¶
GetStringInBetween Returns empty string if no start string found
func NumDecPlaces ¶
func NumberFormat ¶
slice decimal without rounding off, d must always equal or greater then zero
func NumberFormat2Dec ¶
func NumberFormatInt ¶
func NumberFormatInt64 ¶
func NumberFormatPhp ¶
func NumberFormatPhp. this is work like php number_format
func SpaceStringsBuilder ¶
func StringInSlice ¶
StringInSlice verify if string in slice
func StringToSliceInt ¶
StringToSliceInt convert string into slice of int. example 9,10 into []int{9,10}
func TrailZeroFloat ¶
func TransDiamondName ¶
TransDiamondName translate diamond name dynamically
func TransRemark ¶
func TranslateV2 ¶
TranslateV2 version 2: support replace value
func ValueToBool ¶
ValueToBool convert value to boolean
func ValueToDuration ¶
ValueToDuration convert value to duration
func ValueToFloat ¶
ValueToFloat convert value to float