Documentation
¶
Index ¶
- type AuthService
- type IPService
- func (s *IPService) CreateAllowedIP(req *models.CreateIPRequest) error
- func (s *IPService) DeleteAllowedIP(ip string) error
- func (s *IPService) GetAllowedIPByIP(ip string) (*models.AllowedIP, error)
- func (s *IPService) GetAllowedIPs(params *models.QueryParams) (*models.PaginatedResponse, error)
- func (s *IPService) UpdateAllowedIP(ip string, req *models.UpdateIPRequest) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AuthService ¶
type AuthService struct {
// contains filtered or unexported fields
}
func NewAuthService ¶
func NewAuthService(ipService *IPService) *AuthService
func (*AuthService) ChangePassword ¶
func (s *AuthService) ChangePassword(username string, req *models.ChangePasswordRequest) error
ChangePassword 修改密码
func (*AuthService) Login ¶
func (s *AuthService) Login(req *models.LoginRequest) (*models.LoginResponse, error)
Login 用户登录
func (*AuthService) ValidateToken ¶
func (s *AuthService) ValidateToken(tokenString string) (*models.JWTClaims, error)
ValidateToken 验证token
type IPService ¶
type IPService struct {
// contains filtered or unexported fields
}
func NewIPService ¶
func (*IPService) CreateAllowedIP ¶
func (s *IPService) CreateAllowedIP(req *models.CreateIPRequest) error
CreateAllowedIP 创建允许的IP
func (*IPService) DeleteAllowedIP ¶
DeleteAllowedIP 删除允许的IP
func (*IPService) GetAllowedIPByIP ¶
GetAllowedIPByIP 根据IP获取配置
func (*IPService) GetAllowedIPs ¶
func (s *IPService) GetAllowedIPs(params *models.QueryParams) (*models.PaginatedResponse, error)
func (*IPService) UpdateAllowedIP ¶
func (s *IPService) UpdateAllowedIP(ip string, req *models.UpdateIPRequest) error
UpdateAllowedIP 更新允许的IP
Click to show internal directories.
Click to hide internal directories.