Versions in this module Expand all Collapse all v1 v1.0.0 Nov 7, 2021 Changes in this version + const MaxLimit + const SymbolComma + const SymbolSingleQuotation + func ADtoROC(adStr, format string) (TW_Date string, err error) + func CheckParam(param map[string]interface{}, target map[string][]string) (bool, map[string]string) + func CheckRequiredAndParam(param map[string]interface{}, requireFields []string, ...) (bool, map[string]string) + func CheckStruct(s interface{}) (bool, error) + func CheckTimeFormat(tim string) error + func CreatePrivateKeyPem(filePath string, priv *rsa.PrivateKey) error + func DecodeMap(ecodeMapStr string) (*map[string]interface{}, error) + func DecodePublicKey(base64Key string) (*rsa.PublicKey, error) + func DecodeString(encodeStr string, privateKey *rsa.PrivateKey) (*bytes.Buffer, error) + func DecodeToken(token string) map[string]interface + func DecodeTokenByKey(req *http.Request, key string) map[string]interface + func EncodeMap(dataMap *map[string]interface{}) (string, error) + func EncodePublicKey(publicKey crypto.PublicKey) (*bytes.Buffer, error) + func EncodePublicKeyPem(publicKey crypto.PublicKey) (*bytes.Buffer, error) + func EncodeString(str string, publicKey *rsa.PublicKey) (*bytes.Buffer, error) + func FileExists(filename string) bool + func GetClientInfo(req *http.Request) map[string]interface + func GetClientKey(req *http.Request) string + func GetCtxVal(req *http.Request, ck CtxKey) interface + func GetFirstDayOfMonth() time.Time + func GetFullUrlStr(req *http.Request) string + func GetMutiFormPostValue(req *http.Request, fileKeys []string, valueKeys []string) (map[string]RequestFile, map[string]interface{}, error) + func GetPathVars(req *http.Request, keys []string) map[string]interface + func GetPostValue(req *http.Request, defaultEmpty bool, keys []string) (map[string]interface{}, error) + func GetQueryValue(req *http.Request, keys []string, defaultEmpty bool) map[string]interface + func InitValidator() + func IntToFixStrLen(val int, length int) (string, error) + func IsAlpha(str string) bool + func IsBool(str string) (bool, error) + func IsFloat64(param string, bound []float64) (float64, error) + func IsHomeNum(number string) bool + func IsIdNumber(id string) bool + func IsInt(param string, bound []int) (int, error) + func IsLegalPhoneNumber(num string) (bool, error) + func IsLogin(req *http.Request) bool + func IsMail(param string) (bool, error) + func IsMobileNum(number string) bool + func IsStrInList(input string, target ...string) bool + func IsVATnumber(num string) bool + func IsValidPwd(str string) (bool, error) + func JoinStrWithQuotation(separateSymbol string, quotation string, strs ...string) string + func MD5(str string) string + func MD5Byte(data []byte) string + func ReadPrivateKeyPem(filePath string) (*rsa.PrivateKey, error) + func RemoveScriptTag(htmlStr string) (string, error) + func ReturnExist(ori interface{}, new interface{}) interface + func SHA1(str string) string + func SetCtxKeyVal(r *http.Request, ck CtxKey, val interface{}) *http.Request + func StrAppend(strs ...string) string + func ToStrAry(input interface{}) []string + type CtxKey string + type Pagination interface + Output func(w io.Writer) error + func NewPagination(source PaginationSource, limit, page int64, ...) (Pagination, error) + type PaginationSource interface + Count func() (int64, error) + Data func(limit, p int64, format func(i interface{}) map[string]interface{}) ([]map[string]interface{}, error) + type RequestFile struct + ReqFile multipart.File + ReqHeader *multipart.FileHeader