services

package
v1.0.2 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 7, 2025 License: GPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

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

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 NewIPService(configFile string) *IPService

func (*IPService) CreateAllowedIP

func (s *IPService) CreateAllowedIP(req *models.CreateIPRequest) error

CreateAllowedIP 创建允许的IP

func (*IPService) DeleteAllowedIP

func (s *IPService) DeleteAllowedIP(ip string) error

DeleteAllowedIP 删除允许的IP

func (*IPService) GetAllowedIPByIP

func (s *IPService) GetAllowedIPByIP(ip string) (*models.AllowedIP, error)

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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL