Documentation
¶
Index ¶
- Constants
- func Actions() []string
- func Allow(session *auth.Session, obj, act string, enforcer *casbin.Enforcer) bool
- func AllowAny(session *auth.Session, obj string, enforcer *casbin.Enforcer) bool
- func AutowiredCreator(c *gin.Context, record any)
- func ClearSessions(db *gorm.DB)
- func Convert(matchMode, value string) (condition string)
- func FilterClause(sb *strings.Builder, table, field, matchMode, value string)
- func GetBindingTag(field reflect.StructField) string
- func GetComponent(field reflect.StructField) tag.Component
- func GetSession(c *gin.Context) *auth.Session
- func Group(model any) string
- func HandleBatchEnforcer(ids []uint, model any, enforcer *casbin.Enforcer)
- func HandleEnforcer(record any, enforcer *casbin.Enforcer)
- func HandlePassword(c *gin.Context, record any, db *gorm.DB)
- func Icon(model any) string
- func IsCtrl(m any) bool
- func IsLazy(m any) bool
- func IsPurge(m any) bool
- func IsTabler(t reflect.Type) bool
- func Item(model any) string
- func Obj(model any) string
- func ParseRoleID(roleID string) uint
- func RecordOpLog(db *gorm.DB, c *gin.Context, record any, action string)
- func RecordOpLogs(db *gorm.DB, c *gin.Context, ids []uint, action string)
- func SecureRecord(secrets []Column, recordVal reflect.Value)
- func SecureRecords(secrets []Column, recordsVal reflect.Value)
- func SetCookieSessionid(c *gin.Context, sessionid string, rememberMe bool, domain string, secure bool)
- func TableFieldName(db *gorm.DB, model any, modelType reflect.Type, filterField string) (table, field string)
- func TableName(db *gorm.DB, model any, modelType reflect.Type) (table string)
- type ChangePasswordForm
- type Column
- type Component
- type DataTable
- type LazyParam
- type Menu
- type Option
- type Perm
- type Perms
- type PermsParam
- type RecordList
- type Result
- type RolesParam
- type SigninForm
Constants ¶
View Source
const ( ErrInvalidUsernameOrPassword int = -(iota + 10000) ErrInvalidPassword )
View Source
const (
PASSWORD_PLACEHOLDER string = "password placeholder"
)
Variables ¶
This section is empty.
Functions ¶
func AutowiredCreator ¶
func ClearSessions ¶
func FilterClause ¶
func GetBindingTag ¶
func GetBindingTag(field reflect.StructField) string
func GetComponent ¶
func GetComponent(field reflect.StructField) tag.Component
func HandleBatchEnforcer ¶
func HandleEnforcer ¶
func HandleEnforcer(record any, enforcer *casbin.Enforcer)
func ParseRoleID ¶
func SecureRecord ¶
func SecureRecords ¶
func SetCookieSessionid ¶
func TableFieldName ¶
Types ¶
type ChangePasswordForm ¶
type ChangePasswordForm struct {
Password, NewPassword string `binding:"required,min=8"`
}
type PermsParam ¶
type PermsParam struct {
RoleID uint `uri:"roleID"`
}
type RecordList ¶
type RolesParam ¶
type RolesParam struct {
UserID uint `uri:"userID"`
}
type SigninForm ¶
Click to show internal directories.
Click to hide internal directories.