Documentation ¶
Index ¶
- func DePwdCode(pwd string, ts int64) (string, error)
- func Delete[T comparable](org, del []T) []T
- func DigitRandomConfig() *base64Captcha.DriverDigit
- func EnPwdCode(pwdStr string, ts int64) (string, error)
- func GenerateRandomKey(timestamp int64) []byte
- func GetIDButNotNumber(baseName string, y int) string
- func GetNum(in string) float64
- func GetNumbers(in string) []float64
- func HTTPRequest(method, url string, params, headers map[string]interface{}, data interface{}) ([]byte, error)
- func Has[T comparable](org, s []T) []T
- func HideEmail(email string) string
- func IsEmailValid(email string) bool
- func IsPhoneNumberValid(phoneNumber string) bool
- func MathRandomConfig() *base64Captcha.DriverMath
- func Merge[T comparable](list1, list2 []T) []T
- func Page[T any](src []T, page, size int) (out []T, total int)
- func Ptr[T any](t T) *T
- func PtrNow() *time.Time
- func PtrTime(t time.Time) *time.Time
- func RandomString(length int) string
- func RemoveRepeatedElement[S ~[]E, E comparable](s S) S
- func RemoveSpacesAndTranslate(input string) string
- func ReplaceAll(s, new string, old ...string) string
- func TIF[T any](t bool, a1 T, a2 T) T
- func ToJSON(in interface{}) string
- func TranslateEn(input string) string
- type HTTPTransporter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete[T comparable](org, del []T) []T
func DigitRandomConfig ¶
func DigitRandomConfig() *base64Captcha.DriverDigit
func GenerateRandomKey ¶
func GetIDButNotNumber ¶
GetIDButNotNumber 生成Cube ID前缀, 2024JIAY 需要自行补充数字
func GetNumbers ¶
func HTTPRequest ¶
func HTTPRequest(method, url string, params, headers map[string]interface{}, data interface{}) ([]byte, error)
HTTPRequest is used to send HTTP request
func Has ¶
func Has[T comparable](org, s []T) []T
func IsEmailValid ¶
func IsPhoneNumberValid ¶
func MathRandomConfig ¶
func MathRandomConfig() *base64Captcha.DriverMath
MathRandomConfig 生成图形化算术验证码配置
func Merge ¶
func Merge[T comparable](list1, list2 []T) []T
func RandomString ¶
func RemoveRepeatedElement ¶
func RemoveRepeatedElement[S ~[]E, E comparable](s S) S
func RemoveSpacesAndTranslate ¶
RemoveSpacesAndTranslate 将输入字符串中的空格移除,并将中文字符翻译成拼音后截取前四位英文
func ReplaceAll ¶
func TranslateEn ¶
Types ¶
type HTTPTransporter ¶
type HTTPTransporter struct {
// contains filtered or unexported fields
}
HTTPTransporter define
func NewHTTPTransporter ¶
func NewHTTPTransporter(callTimeout int) *HTTPTransporter
NewHTTPTransporter is used to create HTTP transporter
Click to show internal directories.
Click to hide internal directories.