Documentation ¶
Index ¶
- Constants
- 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(ctx context.Context, adminName string) (string, error)
- func (h *MultiUsersSvc) IsAuthed(c *gin.Context)
- 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) ResetUsedSpace(c *gin.Context)
- func (h *MultiUsersSvc) Self(c *gin.Context)
- func (h *MultiUsersSvc) SetPreferences(c *gin.Context)
- func (h *MultiUsersSvc) SetPwd(c *gin.Context)
- func (h *MultiUsersSvc) SetUser(c *gin.Context)
- type ResetUsedSpaceReq
- type SelfResp
- type SetPreferencesReq
- type SetPwdReq
- type SetUserReq
- type UsedSpaceParams
Constants ¶
View Source
const (
MsgTypeResetUsedSpace = "reset-used-space"
)
Variables ¶
View Source
var ( ErrInvalidUser = errors.New("invalid user name or password") ErrInvalidConfig = errors.New("invalid user config") )
View Source
var ErrExpired = errors.New("token is expired")
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) IsAuthed ¶
func (h *MultiUsersSvc) IsAuthed(c *gin.Context)
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) ResetUsedSpace ¶ added in v0.6.1
func (h *MultiUsersSvc) ResetUsedSpace(c *gin.Context)
func (*MultiUsersSvc) Self ¶
func (h *MultiUsersSvc) Self(c *gin.Context)
func (*MultiUsersSvc) SetPreferences ¶ added in v0.4.13
func (h *MultiUsersSvc) SetPreferences(c *gin.Context)
func (*MultiUsersSvc) SetPwd ¶
func (h *MultiUsersSvc) SetPwd(c *gin.Context)
func (*MultiUsersSvc) SetUser ¶
func (h *MultiUsersSvc) SetUser(c *gin.Context)
type ResetUsedSpaceReq ¶ added in v0.6.1
type ResetUsedSpaceReq struct {
UserID uint64 `json:"userID,string"`
}
type SetPreferencesReq ¶ added in v0.4.13
type SetPreferencesReq struct {
Preferences *db.Preferences `json:"preferences"`
}
type SetUserReq ¶
type UsedSpaceParams ¶ added in v0.6.1
Click to show internal directories.
Click to hide internal directories.