Documentation ¶
Index ¶
- Variables
- func Base64Decode(s string) ([]byte, error)
- func Base64Encode(data []byte) string
- func Base64URLDecode(s string) ([]byte, error)
- func Base64URLEncode(data []byte) string
- func CheckImgCaptcha(cache *cache.Cache, captchaID string, code string) bool
- func GenerateID() string
- func GenerateRandNum(digits int) string
- func GetAuthModel(ctx context.Context) (enum.AuthJWT, error)
- func GetContentTypeByFileName(filename string) (string, string)
- func GetDefaultHttpClient(timeout int) *http.Client
- func GetPassword(password string, sale string) string
- func GetRequestIdByContext(ctx context.Context) string
- func GetTokenByContext(ctx context.Context) (tokenString string, ok bool)
- func GetTokenFromHeader(header http.Header) (tokenString string, ok bool)
- func GetUserInformationFromContext(ctx context.Context) (*enum.AuthJWT, error)
- func InitJWT()
- func InitPgSQL(pgConf conf.PostgresConfiguration) (*gorm.DB, error)
- func Md5Encode(str string) string
- func PrintObj(obj interface{})
- func RandKey(ln int) string
- func RandSMSCode(ln int) string
- func UploadFile(w http.ResponseWriter, r *http.Request)
- func XRand(max int, min int) int
Constants ¶
This section is empty.
Variables ¶
View Source
var JWT *jwt.JWT
Functions ¶
func CheckImgCaptcha ¶
func GenerateID ¶
func GenerateID() string
func GenerateRandNum ¶
func GetAuthModel ¶
GetAuthModel GetAuthModel
func GetDefaultHttpClient ¶
func GetPassword ¶
func GetRequestIdByContext ¶
func RandSMSCode ¶
func UploadFile ¶
func UploadFile(w http.ResponseWriter, r *http.Request)
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.