Documentation
¶
Index ¶
- Constants
- Variables
- func AllAuth(auth ...map[string]int64) map[string]int64
- func Auth() gin.HandlerFunc
- func CheckVerify(ctx *gin.Context, code string) bool
- func ClearAllSession(ctx *gin.Context)
- func Cors() gin.HandlerFunc
- func GetFuncMap() template.FuncMap
- func GetSession(ctx *gin.Context, k string) interface{}
- func IsDecimals(str ...string) bool
- func IsEmail(str ...string) bool
- func IsEngishLowCase(str ...string) bool
- func IsEnglish(str ...string) bool
- func IsEnglishCap(str ...string) bool
- func IsID(str ...string) bool
- func IsInteger(str ...string) bool
- func IsMobile(str ...string) bool
- func IsPwd(str ...string) bool
- func IsTelephone(str ...string) bool
- func LoadRoleId(ctx *gin.Context) interface{}
- func LoadUser(ctx *gin.Context) interface{}
- func LoadVerify(ctx *gin.Context)
- func Match(p string, s string) bool
- func Md5Encode(arg0 string) string
- func Md5EncodeV2(arg0 string) string
- func New() string
- func NewLen(length int) string
- func NewLenChars(length int, chars []byte) string
- func NoMethod(ctx *gin.Context)
- func NoRoute(ctx *gin.Context)
- func Result(ctx *gin.Context, code int32, data interface{}, msg string)
- func ResultErrCode(ctx *gin.Context, code int32, data interface{}, msg string)
- func ResultFail(ctx *gin.Context, err interface{})
- func ResultFailData(ctx *gin.Context, data interface{}, err interface{})
- func ResultList(ctx *gin.Context, data interface{}, total int64)
- func ResultOk(ctx *gin.Context, data interface{})
- func ResultOkMsg(ctx *gin.Context, data interface{}, msg string)
- func SaveRoleId(ctx *gin.Context, roleId interface{})
- func SaveUser(ctx *gin.Context, user interface{})
- func SetSession(ctx *gin.Context, k string, o interface{})
- type Controller
- type Image
- type JsonDate
- type JsonDateTime
- type JsonTime
Constants ¶
View Source
const ( // Standard length of uniuri string to achive ~95 bits of entropy. StdLen = 16 // Length of uniurl string to achive ~119 bits of entropy, closest // to what can be losslessly converted to UUIDv4 (122 bits). UUIDLen = 20 )
Variables ¶
View Source
var StdChars = []byte("ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789")
Standard characters allowed in uniuri string.
Functions ¶
func ClearAllSession ¶
func Cors ¶
func Cors() gin.HandlerFunc
* * @Description: 允許跨域限制 * @return: gin.HandlerFunc * @Author: Iori * @Date: 2022-07-26 16:04:04 *
func GetFuncMap ¶
func GetSession ¶
func IsEngishLowCase ¶
************************ 英文类型 ************************ 仅小写
func LoadRoleId ¶
func LoadVerify ¶
func Md5EncodeV2 ¶
func New ¶
func New() string
New returns a new random string of the standard length, consisting of standard characters.
func NewLen ¶
NewLen returns a new random string of the provided length, consisting of standard characters.
func NewLenChars ¶
NewLenChars returns a new random string of the provided length, consisting of the provided byte slice of allowed characters (maximum 256).
func ResultFail ¶
func ResultFailData ¶
func ResultList ¶
func ResultOkMsg ¶
func SaveRoleId ¶
func SetSession ¶
Types ¶
type Controller ¶
type Controller struct {
Auth bool
Data interface{}
}
type JsonDateTime ¶
func (JsonDateTime) MarshalJSON ¶
func (c JsonDateTime) MarshalJSON() ([]byte, error)
func (JsonDateTime) String ¶
func (c JsonDateTime) String() string
func (*JsonDateTime) UnmarshalJSON ¶
func (p *JsonDateTime) UnmarshalJSON(data []byte) (err error)
Click to show internal directories.
Click to hide internal directories.