Documentation
¶
Index ¶
- type BatchCheckRequest
- type BatchCheckResponse
- type CheckRequest
- type CheckResponse
- type Handler
- type LoginRequest
- type LoginResponse
- type LogoutRequest
- type LogoutResponse
- type Service
- func (s *Service) BatchCheck(ctx context.Context, username string, req *BatchCheckRequest) (*BatchCheckResponse, error)
- func (s *Service) Check(ctx context.Context, username string, req *CheckRequest) (*CheckResponse, error)
- func (s *Service) Login(ctx context.Context, req *LoginRequest) (*LoginResponse, error)
- func (s *Service) Logout(ctx context.Context, req *LogoutRequest) (*LogoutResponse, error)
- type UserInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BatchCheckRequest ¶
type BatchCheckRequest struct {
Checks []CheckRequest `json:"checks" binding:"required"`
}
type BatchCheckResponse ¶
type BatchCheckResponse struct {
Results []CheckResponse `json:"results"`
}
type CheckRequest ¶
type CheckResponse ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
func NewHandler ¶
func (*Handler) BatchCheck ¶
type LoginRequest ¶
type LoginRequest struct {
Username string `json:"username" binding:"required"`
Password string `json:"password" binding:"required"`
ClientIP string `json:"-"`
UserAgent string `json:"-"`
}
LoginRequest 登录请求
type LoginResponse ¶
LoginResponse 登录响应
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(adminModel *model.AdminModel, permSvc *permissionservice.PermissionService, opsStore ...*svc.OpsStateStore) *Service
func (*Service) BatchCheck ¶
func (s *Service) BatchCheck(ctx context.Context, username string, req *BatchCheckRequest) (*BatchCheckResponse, error)
func (*Service) Check ¶
func (s *Service) Check(ctx context.Context, username string, req *CheckRequest) (*CheckResponse, error)
func (*Service) Login ¶
func (s *Service) Login(ctx context.Context, req *LoginRequest) (*LoginResponse, error)
Login 用户登录
func (*Service) Logout ¶
func (s *Service) Logout(ctx context.Context, req *LogoutRequest) (*LogoutResponse, error)
Logout 用户登出
Click to show internal directories.
Click to hide internal directories.