Documentation ¶
Index ¶
- Constants
- func AddDurationInString(timeStart time.Time, extendDuration string) time.Time
- func AddSysLog(memberID int, currentData, updatedData map[string]interface{}, ...) string
- func AlphaNumericCertainCharactersOnly(s string, character []string) bool
- func AlphaNumericOnly(s string) bool
- func Bcrypt(str string) (string, error)
- func CallCreateNewPushNotificationGroupApi(arrData CreateNewPushNotificationGroupStruct) error
- func CallSendPushNotificationInGroupApi(arrData CallSendPushNotificationInGroupApiStruct) error
- func CallSendPushNotificationIndApi(arrData CallSendPushNotificationIndApiStruct) error
- func CallSubscribePushNotificationToGroupApi(arrData CallSubscribePushNotificationToGroupApiStruct) error
- func CallUnsubscribePushNotificationFromGroupApi(arrData CallUnsubscribePushNotificationFromGroupApiStruct) error
- func CheckBcryptPassword(hash string, password string) error
- func CheckImageType(mime string) bool
- func CheckMd5SecondaryPin(secondaryPinMd5 string, secondaryPin string) error
- func CheckMigratedAccPassword(hashed string, password string, debug bool) error
- func CheckVersioNumberFormat(version string) (err error)
- func ConvertFormat(format string) string
- func DateRangeValidate(daterange []string) error
- func EncodeMD5(value string) string
- func FirstNameChecking(s string) string
- func GenerateRandomString(length int, charSet string) string
- func GetCurrentDateTimeT() time.Time
- func GetCurrentTime(format string) string
- func GetCurrentTimeV2(format string) (string, error)
- func GetHashAlgo() []string
- func GetLatestExchangePriceMovementByTokenType(tokenType string) (float64, error)
- func GetLatestPriceMovementByTokenType(tokenType string) (float64, error)
- func GetMemberLogData(arrTable []string, memberID int) (string, map[string]interface{})
- func GetTimeZone() *time.Location
- func HashInput(data map[string]interface{}, hash string) string
- func IntArrayToString(a []int, delim string) string
- func IsValidETHAddress(v string) bool
- func IsValidTRXAddress(v string) bool
- func LogErrorLog(data1 interface{}, data2 interface{}, data3 interface{}, ...)
- func LogErrorLogV2(data1 interface{}, data2 interface{}, data3 interface{}, ...)
- func NoSpace(s string) bool
- func PasswordChecking(s string) bool
- func ProcessMemberPushNotificationGroup(tx *gorm.DB, action string, arrData ProcessMemberPushNotificationGroupStruct)
- func ProcessPushNotificationDataV1(arrData ProcessPushNotificationDataV1Struct, ...)
- func SHA256(data string) string
- func SecondaryPinChecking(s string) bool
- func SendSlack(text string) error
- func SendTelegramMsgViaBot(arrData TelegramMsgStruct)
- func SplitData(data []interface{}, size int) [][]interface{}
- func SplitVersionNumber(version string) (major int, minor int, build int, err error)
- func StrToDateTime(str, format string) (time.Time, error)
- func StrToUnixTime(str string) (int64, error)
- func TemplateReplace(text string, data interface{}) (string, error)
- func TimeFormat(time time.Time, format string) string
- func UsernameChecking(s string) string
- func ValidateDateTimeFormat(dateTime string, format string) (string, bool)
- type APIResponse
- func MultiPartPost(url string, header map[string]string, body map[string]string, ...) (*APIResponse, error)
- func MultiPartPostV2(url string, header map[string]string, body map[string]string, ...) (*APIResponse, error)
- func PostFormRequestApi(url string, header map[string]string, body map[string]string, ...) (*APIResponse, error)
- func RequestAPI(method, url string, header map[string]string, body map[string]interface{}, ...) (*APIResponse, error)
- func RequestAPIV2(method, url string, header map[string]string, body map[string]interface{}, ...) (*APIResponse, error)
- func RequestBinanceAPI(method, url string, header map[string]string, body map[string]interface{}, ...) (*APIResponse, error)
- type CallSendMailApiStruct
- type CallSendPushNotificationInGroupApiStruct
- type CallSendPushNotificationIndApiStruct
- type CallSubscribePushNotificationToGroupApiStruct
- type CallUnsubscribePushNotificationFromGroupApiStruct
- type CreateNewPushNotificationGroupStruct
- type ExtraSettingStruct
- type FileStruct
- type HrMinSec
- type Pagination
- type PriceMovementIndByTokenTypeRst
- type PriceMovementIndByTokenTypeStruct
- type ProcessMemberPushNotificationGroupStruct
- type ProcessPushNotificationDataV1Struct
- type PushNotificationContentStruct
- type SecondaryPin
- type TelegramMsgStruct
Constants ¶
const ( HHT = "03" HH = "15" MM = "04" SS = "05" Z = "MST" ZZZ = "MST" )
ccccc
Variables ¶
This section is empty.
Functions ¶
func AddDurationInString ¶
func AddDurationInString
func AddSysLog ¶
func AddSysLog(memberID int, currentData, updatedData map[string]interface{}, logType, event string, c *gin.Context) string
AddSysLog retrieve server data and add to sys log
func AlphaNumericCertainCharactersOnly ¶
AlphaNumericCertainCharactersOnly func
func CallCreateNewPushNotificationGroupApi ¶
func CallCreateNewPushNotificationGroupApi(arrData CreateNewPushNotificationGroupStruct) error
CallCreateNewPushNotificationGroupApi func
func CallSendPushNotificationInGroupApi ¶
func CallSendPushNotificationInGroupApi(arrData CallSendPushNotificationInGroupApiStruct) error
CallSendPushNotificationIndApi func
func CallSendPushNotificationIndApi ¶
func CallSendPushNotificationIndApi(arrData CallSendPushNotificationIndApiStruct) error
CallSendPushNotificationIndApi func
func CallSubscribePushNotificationToGroupApi ¶
func CallSubscribePushNotificationToGroupApi(arrData CallSubscribePushNotificationToGroupApiStruct) error
CallSubscribePushNotificationToGroupApi func
func CallUnsubscribePushNotificationFromGroupApi ¶
func CallUnsubscribePushNotificationFromGroupApi(arrData CallUnsubscribePushNotificationFromGroupApiStruct) error
CallUnsubscribePushNotificationFromGroupApi func
func CheckBcryptPassword ¶
CheckBcryptPassword func check bcrypt hashed password
func CheckMd5SecondaryPin ¶
CheckMd5SecondaryPin func check md5 hashed secondary pin
func CheckMigratedAccPassword ¶
CheckMigratedAccPassword func
func CheckVersioNumberFormat ¶
CheckVersioNumberFormat func
func GenerateRandomString ¶
GenerateRandomString func
func GetHashAlgo ¶
func GetHashAlgo() []string
func GetMemberLogData ¶
GetMemberLogData get member log data
func IsValidETHAddress ¶
func IsValidTRXAddress ¶
func LogErrorLog ¶
func LogErrorLog(data1 interface{}, data2 interface{}, data3 interface{}, callTelegramStatus bool)
func LogErrorLog. this included call telegram function
func LogErrorLogV2 ¶
func LogErrorLogV2(data1 interface{}, data2 interface{}, data3 interface{}, callTelegramStatus bool, groupName string)
func LogErrorLogV2. this included call telegram function + diff group
func ProcessMemberPushNotificationGroup ¶
func ProcessMemberPushNotificationGroup(tx *gorm.DB, action string, arrData ProcessMemberPushNotificationGroupStruct)
func ProcessMemberPushNotificationGroup
func ProcessPushNotificationDataV1 ¶
func ProcessPushNotificationDataV1(arrData ProcessPushNotificationDataV1Struct, translateTitle, translateMsg, saveSysNotification bool)
func SendTelegramMsgViaBot ¶
func SendTelegramMsgViaBot(arrData TelegramMsgStruct)
func SendTelegramMsgViaBot
func SplitData ¶
func SplitData(data []interface{}, size int) [][]interface{}
SplitData Separate data into several size
func SplitVersionNumber ¶
SplitVersionNumber split version number to 3 int
func TemplateReplace ¶
TemplateReplace func
Types ¶
type APIResponse ¶
APIResponse struct
func MultiPartPost ¶
func MultiPartPost(url string, header map[string]string, body map[string]string, file map[string]FileStruct) (*APIResponse, error)
MultiPartPost func
func MultiPartPostV2 ¶
func MultiPartPostV2(url string, header map[string]string, body map[string]string, file map[string]FileStruct, extraSetting ExtraSettingStruct) (*APIResponse, error)
MultiPartPostV2 func
func PostFormRequestApi ¶
func PostFormRequestApi(url string, header map[string]string, body map[string]string, resStruct interface{}) (*APIResponse, error)
PostFormRequestApi func
func RequestAPI ¶
func RequestAPI(method, url string, header map[string]string, body map[string]interface{}, resStruct interface{}) (*APIResponse, error)
RequestAPI func
func RequestAPIV2 ¶
func RequestAPIV2(method, url string, header map[string]string, body map[string]interface{}, resStruct interface{}, extraSetting ExtraSettingStruct) (*APIResponse, error)
RequestAPI func
func RequestBinanceAPI ¶
type CallSendMailApiStruct ¶
type CallSendMailApiStruct struct { Subject string Message string Type string FromMail string FromName string ToEmail []string ToName []string CCEmail []string // optional CCName []string // optional BccEmail []string // optional }
CallSendMailApi struct
func (CallSendMailApiStruct) CallSendMailApi ¶
func (s CallSendMailApiStruct) CallSendMailApi() error
type ExtraSettingStruct ¶
type ExtraSettingStruct struct {
InsecureSkipVerify bool
}
type FileStruct ¶
FileStruct MultiPartPost file type
type HrMinSec ¶
func ConvertSecToHrMinSec ¶
ConvertSecToHrMinSec func
type Pagination ¶
type Pagination struct { Page int64 DataArr []interface{} HeaderArr interface{} }
func (*Pagination) PaginationInterfaceV1 ¶
func (p *Pagination) PaginationInterfaceV1() interface{}
func (*Pagination) PaginationInterfaceV2 ¶
func (p *Pagination) PaginationInterfaceV2() interface{}
type PriceMovementIndByTokenTypeRst ¶
type PriceMovementIndByTokenTypeRst struct { // ID int `json:"id"` TokenPrice float64 `json:"token_price"` // BLatest int `json:"b_latest"` CreatedAt time.Time `json:"created_at"` }
func GetPriceMovementIndByTokenTypeFn ¶
func GetPriceMovementIndByTokenTypeFn(arrData PriceMovementIndByTokenTypeStruct) ([]PriceMovementIndByTokenTypeRst, error)
GetPriceMovementIndByTokenTypeFn
type SecondaryPin ¶
type SecondaryPin struct { MemId int SecondaryPin string MemberSecondaryPin string LangCode string }
func (*SecondaryPin) CheckSecondaryPin ¶
func (s *SecondaryPin) CheckSecondaryPin() error
check hashed secondary pin--- form input secondary pin, current secondary pin
type TelegramMsgStruct ¶
func TelegramMsgStruct