Documentation ¶
Index ¶
- Constants
- Variables
- func AesCBCDecrypt(encryptData, key []byte) ([]byte, error)
- func AesCBCEncrypt(rawData, key []byte) ([]byte, error)
- func ByteToHex(data [20]byte) string
- func CheckFieldLength(v string, max int, cn string) (bool, errors.Error)
- func Combination(n, m int) int
- func CombinationResult(n int, m int) [][]int
- func Decrypt(rawData string, key []byte) (string, error)
- func Encrypt(rawData, key []byte) (string, error)
- func ErrMail(title, content string)
- func Factorial(n int) int
- func FindNumsByIndexes(nums []int, indexes [][]int) [][]int
- func GetDBFromContext(c *gin.Context, schema string) (*gorm.DB, error)
- func GetRandomString(l int) string
- func GetUserIDFromContext(c *gin.Context) int
- func GetWxaCode(token, scene, page string) (string, error)
- func IsLoggedIn(c *gin.Context) bool
- func JudgeExistInRegion(lat1, lat2, lng1, lng2, distance float64) bool
- func MpGetUserFromHeader(c *gin.Context) (string, error)
- func PKCS7Padding(cipherText []byte, blockSize int) []byte
- func PKCS7UnPadding(origData []byte) []byte
- func PointSquareWithDistance(lat, lng, distance float64) (latScope [2]float64, lngScope [2]float64)
- func SendSmsCode(phone string) (bool, error)
- func Substr(str string, start int, length int) string
- func VerifySmsCode(phone, code string) (bool, error)
- type HTTPCallback
- type HTTPResponse
- type TimeIt
Constants ¶
View Source
const ( NeteaseAppKey = "7ceb11438d399c096be71884b3aee8e9" NeteaseAppSecret = "96506ddc03b6" SmsTemplateID = "3033646" InterfaceSendSmsCode = "https://api.netease.im/sms/sendcode.action" InterfaceVerifySmsCode = "https://api.netease.im/sms/verifycode.action" )
Variables ¶
View Source
var (
Requests requests
)
Functions ¶
func AesCBCDecrypt ¶
func AesCBCEncrypt ¶
func Combination ¶
func CombinationResult ¶
func FindNumsByIndexes ¶
func GetRandomString ¶
func GetUserIDFromContext ¶
func GetWxaCode ¶
func IsLoggedIn ¶
func JudgeExistInRegion ¶
distance unit is km
func PKCS7Padding ¶
func PKCS7UnPadding ¶
func PointSquareWithDistance ¶
distance unit is km
func SendSmsCode ¶
func VerifySmsCode ¶
Types ¶
type HTTPCallback ¶
type HTTPResponse ¶
type HTTPResponse struct { CallbackOutput []interface{} // contains filtered or unexported fields }
func (*HTTPResponse) Body ¶
func (h *HTTPResponse) Body() []byte
func (*HTTPResponse) ContentType ¶
func (h *HTTPResponse) ContentType() string
func (*HTTPResponse) Json ¶
func (h *HTTPResponse) Json(v interface{}) error
func (*HTTPResponse) Status ¶
func (h *HTTPResponse) Status() int
func (*HTTPResponse) Text ¶
func (h *HTTPResponse) Text() string
Click to show internal directories.
Click to hide internal directories.