Documentation ¶
Index ¶
- Variables
- type AddRoleReq
- type AddUserReq
- type AddUserResp
- type DelRoleReq
- type DelUserResp
- type ForceSetPwdReq
- type GetCaptchaIDResp
- type ListRolesReq
- type ListRolesResp
- type ListUsersResp
- type LoginReq
- type LogoutReq
- type MultiUsersSvc
- func (h *MultiUsersSvc) APIAccessControl() gin.HandlerFunc
- func (h *MultiUsersSvc) AddRole(c *gin.Context)
- func (h *MultiUsersSvc) AddUser(c *gin.Context)
- func (h *MultiUsersSvc) AuthN() gin.HandlerFunc
- func (h *MultiUsersSvc) DelRole(c *gin.Context)
- func (h *MultiUsersSvc) DelUser(c *gin.Context)
- func (h *MultiUsersSvc) ForceSetPwd(c *gin.Context)
- func (h *MultiUsersSvc) GetCaptchaID(c *gin.Context)
- func (h *MultiUsersSvc) GetCaptchaImg(c *gin.Context)
- func (h *MultiUsersSvc) Init(adminName, adminPwd string) (string, error)
- func (h *MultiUsersSvc) IsAuthed(c *gin.Context)
- func (h *MultiUsersSvc) IsInited() bool
- func (h *MultiUsersSvc) ListRoles(c *gin.Context)
- func (h *MultiUsersSvc) ListUsers(c *gin.Context)
- func (h *MultiUsersSvc) Login(c *gin.Context)
- func (h *MultiUsersSvc) Logout(c *gin.Context)
- func (h *MultiUsersSvc) Self(c *gin.Context)
- func (h *MultiUsersSvc) SetPwd(c *gin.Context)
- func (h *MultiUsersSvc) SetUser(c *gin.Context)
- type SelfResp
- type SetPwdReq
- type SetUserReq
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidUser = errors.New("invalid user name or password") ErrInvalidConfig = errors.New("invalid user config") )
Functions ¶
This section is empty.
Types ¶
type AddRoleReq ¶
type AddRoleReq struct {
Role string `json:"role"`
}
type AddUserReq ¶
type AddUserResp ¶
type AddUserResp struct {
ID string `json:"id"`
}
type DelRoleReq ¶
type DelRoleReq struct {
Role string `json:"role"`
}
type DelUserResp ¶
type DelUserResp struct {
ID string `json:"id"`
}
type ForceSetPwdReq ¶
type GetCaptchaIDResp ¶
type GetCaptchaIDResp struct {
CaptchaID string `json:"id"`
}
type ListRolesReq ¶
type ListRolesReq struct{}
type ListRolesResp ¶
type ListUsersResp ¶
type MultiUsersSvc ¶
type MultiUsersSvc struct {
// contains filtered or unexported fields
}
func NewMultiUsersSvc ¶
func (*MultiUsersSvc) APIAccessControl ¶
func (h *MultiUsersSvc) APIAccessControl() gin.HandlerFunc
func (*MultiUsersSvc) AddRole ¶
func (h *MultiUsersSvc) AddRole(c *gin.Context)
func (*MultiUsersSvc) AddUser ¶
func (h *MultiUsersSvc) AddUser(c *gin.Context)
func (*MultiUsersSvc) AuthN ¶
func (h *MultiUsersSvc) AuthN() gin.HandlerFunc
func (*MultiUsersSvc) DelRole ¶
func (h *MultiUsersSvc) DelRole(c *gin.Context)
func (*MultiUsersSvc) DelUser ¶
func (h *MultiUsersSvc) DelUser(c *gin.Context)
func (*MultiUsersSvc) ForceSetPwd ¶
func (h *MultiUsersSvc) ForceSetPwd(c *gin.Context)
func (*MultiUsersSvc) GetCaptchaID ¶
func (h *MultiUsersSvc) GetCaptchaID(c *gin.Context)
func (*MultiUsersSvc) GetCaptchaImg ¶
func (h *MultiUsersSvc) GetCaptchaImg(c *gin.Context)
path: /captchas/imgs?id=xxx
func (*MultiUsersSvc) Init ¶
func (h *MultiUsersSvc) Init(adminName, adminPwd string) (string, error)
func (*MultiUsersSvc) IsAuthed ¶
func (h *MultiUsersSvc) IsAuthed(c *gin.Context)
func (*MultiUsersSvc) IsInited ¶
func (h *MultiUsersSvc) IsInited() bool
func (*MultiUsersSvc) ListRoles ¶
func (h *MultiUsersSvc) ListRoles(c *gin.Context)
func (*MultiUsersSvc) ListUsers ¶
func (h *MultiUsersSvc) ListUsers(c *gin.Context)
func (*MultiUsersSvc) Login ¶
func (h *MultiUsersSvc) Login(c *gin.Context)
func (*MultiUsersSvc) Logout ¶
func (h *MultiUsersSvc) Logout(c *gin.Context)
func (*MultiUsersSvc) Self ¶
func (h *MultiUsersSvc) Self(c *gin.Context)
func (*MultiUsersSvc) SetPwd ¶
func (h *MultiUsersSvc) SetPwd(c *gin.Context)
func (*MultiUsersSvc) SetUser ¶
func (h *MultiUsersSvc) SetUser(c *gin.Context)
Click to show internal directories.
Click to hide internal directories.