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 Configuration(filepath string)
- func Debug(arg0 interface{}, args ...interface{})
- func Error(arg0 interface{}, args ...interface{})
- func Get(url string) (body string, err error)
- 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 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 OrmEngin(keys ...string) (e *xorm.Engine)
- func Post(url string, data string) (body string, err error)
- func Result(ctx *gin.Context, code int, 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 RoleAuth(roleId int, auth ...map[string]int64) map[string]int64
- func SaveRoleId(ctx *gin.Context, roleId interface{})
- func SaveUser(ctx *gin.Context, user interface{})
- func SetCfg(c *Config)
- func SetEngin(key string, e *xorm.Engine)
- func SetSession(ctx *gin.Context, k string, o interface{})
- type Config
- func (cfg *Config) LoadBool(key string) bool
- func (cfg *Config) LoadCfg(key string) string
- func (cfg *Config) LoadInt(key string) (int, error)
- func (cfg *Config) LoadInt32(key string) (int64, error)
- func (cfg *Config) LoadInt64(key string) (int64, error)
- func (cfg *Config) LoadString(key string) string
- func (cfg *Config) Parse(fpath string)
- 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 Configuration ¶
func Configuration(filepath string)
func GetFuncMap ¶
func GetSession ¶
func IsEngishLowCase ¶
************************ 英文类型 ************************ 仅小写
func LoadRoleId ¶
func LoadVerify ¶
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 Config ¶
type Controller ¶
type Controller struct {
Data interface{}
}
func (*Controller) AjaxData ¶
func (this *Controller) AjaxData(ctx *gin.Context)
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.