Documentation ¶
Index ¶
- type AddUserRequest
- type ApAuthService
- type ChangePwdRequest
- type ChangeSuperPwdRequest
- type CheckLoginRequest
- type DelUserRequest
- type GetUsersRequest
- type LockUserRequest
- type LoginRequest
- type LogoutRequest
- type Options
- type PasswordEncodingFunc
- type ResetPwdRequest
- type Service
- func (this *Service) AddUser(req *AddUserRequest, res *core.SlotResponse)
- func (this *Service) ChangePwd(req *ChangePwdRequest, res *core.SlotResponse)
- func (this *Service) ChangeSuperPwd(req *ChangeSuperPwdRequest, res *core.SlotResponse)
- func (this *Service) CheckLogin(req *CheckLoginRequest, res *core.SlotResponse)
- func (this *Service) Config() core.IEntityConf
- func (this *Service) DB() *gorm.DB
- func (this *Service) DelUser(req *DelUserRequest, res *core.SlotResponse)
- func (this *Service) EntityStub() *core.EntityStub
- func (this *Service) GetUsers(req *GetUsersRequest, res *core.SlotResponse)
- func (this *Service) LockUser(req *LockUserRequest, res *core.SlotResponse)
- func (this *Service) Login(req *LoginRequest, res *core.SlotResponse)
- func (this *Service) Logout(req *LogoutRequest, res *core.SlotResponse)
- func (this *Service) Objects() []interface{}
- func (this *Service) Open(s core.IServer, instance core.IService, options htypes.Any) *herrors.Error
- func (this *Service) ResetPwd(req *ResetPwdRequest, res *core.SlotResponse)
- func (this *Service) UnLockUser(req *UnlockUserRequest, res *core.SlotResponse)
- func (this *Service) UpdateUser(req *UpdateUserRequest, res *core.SlotResponse)
- type SvsApAuthUser
- type UnlockUserRequest
- type UpdateUserRequest
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddUserRequest ¶ added in v1.1.0
type AddUserRequest struct { core.SlotRequestBase Name *string `json:"name" param:"require"` Password *string `json:"password" param:"require"` }
type ApAuthService ¶
type ApAuthService struct { core.ServiceConf DatabaseKey string SessionService string SessionCreateSlot string SessionVerifySlot string SessionRevokeSlot string PwdEncoding string PwdSecret string PwdMinLen int PwdMaxLen int PwdUpperAndLowerLetter bool PwdNumberAndLetter bool PwdSymbol bool PwdSymbols string DefaultPwd string SuperName string SuperPwd string SuperFails int LockAfterFails int OutAddressField string OutAgentField string }
type ChangePwdRequest ¶ added in v1.1.0
type ChangePwdRequest struct { core.SlotRequestBase Name *string `json:"name" param:"require"` OldPassword *string `json:"old_password" param:"require"` NewPassword *string `json:"new_password" param:"require"` }
type ChangeSuperPwdRequest ¶ added in v1.1.0
type ChangeSuperPwdRequest struct { core.SlotRequestBase OldPassword *string `json:"old_password" param:"require"` NewPassword *string `json:"new_password" param:"require"` }
type CheckLoginRequest ¶ added in v1.1.9
type CheckLoginRequest struct { core.SlotRequestBase Name *string `json:"name" param:"require"` IP *string `json:"ip"` Agent *string `json:"User-Agent"` }
type DelUserRequest ¶ added in v1.1.0
type DelUserRequest struct { core.SlotRequestBase Name *string `json:"name" param:"require"` }
type GetUsersRequest ¶ added in v1.1.0
type GetUsersRequest struct { core.SlotRequestBase Paging *string `json:"paging" param:"require"` }
type LockUserRequest ¶ added in v1.1.0
type LockUserRequest struct { core.SlotRequestBase Name *string `json:"name" param:"require"` }
type LoginRequest ¶ added in v1.1.0
type LogoutRequest ¶ added in v1.1.0
type LogoutRequest struct {
Name *string `json:"name" param:"require"`
}
type Options ¶ added in v1.1.0
type Options struct { Hooks htypes.Any PasswordEncoder PasswordEncodingFunc }
type PasswordEncodingFunc ¶
type ResetPwdRequest ¶ added in v1.1.0
type ResetPwdRequest struct { core.SlotRequestBase Name *string `json:"name" param:"require"` Password *string `json:"password" param:"require"` }
type Service ¶
func (*Service) AddUser ¶
func (this *Service) AddUser(req *AddUserRequest, res *core.SlotResponse)
func (*Service) ChangePwd ¶
func (this *Service) ChangePwd(req *ChangePwdRequest, res *core.SlotResponse)
func (*Service) ChangeSuperPwd ¶
func (this *Service) ChangeSuperPwd(req *ChangeSuperPwdRequest, res *core.SlotResponse)
func (*Service) CheckLogin ¶
func (this *Service) CheckLogin(req *CheckLoginRequest, res *core.SlotResponse)
func (*Service) Config ¶
func (this *Service) Config() core.IEntityConf
func (*Service) DelUser ¶
func (this *Service) DelUser(req *DelUserRequest, res *core.SlotResponse)
func (*Service) EntityStub ¶
func (this *Service) EntityStub() *core.EntityStub
func (*Service) GetUsers ¶
func (this *Service) GetUsers(req *GetUsersRequest, res *core.SlotResponse)
func (*Service) LockUser ¶
func (this *Service) LockUser(req *LockUserRequest, res *core.SlotResponse)
func (*Service) Login ¶
func (this *Service) Login(req *LoginRequest, res *core.SlotResponse)
func (*Service) Logout ¶
func (this *Service) Logout(req *LogoutRequest, res *core.SlotResponse)
func (*Service) ResetPwd ¶
func (this *Service) ResetPwd(req *ResetPwdRequest, res *core.SlotResponse)
func (*Service) UnLockUser ¶
func (this *Service) UnLockUser(req *UnlockUserRequest, res *core.SlotResponse)
func (*Service) UpdateUser ¶
func (this *Service) UpdateUser(req *UpdateUserRequest, res *core.SlotResponse)
type SvsApAuthUser ¶
type SvsApAuthUser struct { gorm.Model ID int64 `json:"id"` User string `json:"user" gorm:"size:50;unique;index:user_idx"` //用户名,即账号 Password string `json:"-" gorm:"size:32"` //用户密码 LastLogin string `json:"last_login" gorm:"size:19"` //最后一次登录 Locked bool `json:"-"` //账号是否被锁定 Fails int `json:"-"` //登录失败次数 }
账密登录用户表
type UnlockUserRequest ¶ added in v1.1.0
type UnlockUserRequest struct { core.SlotRequestBase Name *string `json:"name" param:"require"` }
type UpdateUserRequest ¶ added in v1.1.0
type UpdateUserRequest struct { core.SlotRequestBase Name *string `json:"name" param:"require"` Password *string `json:"password"` Locked *bool `json:"locked"` }
Click to show internal directories.
Click to hide internal directories.