isql

package
v0.0.0-...-03609d5 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	User   = &UserService{}
	Domain = &DomainService{}
	View   = &ViewService{}
	Zone   = &ZoneService{}
)

Functions

This section is empty.

Types

type DomainService

type DomainService struct {
}

func (DomainService) Add

func (d DomainService) Add(domain *model.Domain) error

Add 添加域名记录

func (DomainService) Count

func (d DomainService) Count() (int64, error)

Count 获取资源总数

func (DomainService) Delete

func (d DomainService) Delete(ids []uint) error

Delete 域名批量删除

func (DomainService) Exist

func (d DomainService) Exist(filter map[string]interface{}) bool

Exist 判断资源是否存在

func (DomainService) Find

func (d DomainService) Find(filter map[string]interface{}, data *model.Domain) error

Find 获取单个资源

func (DomainService) GetDomainsByIds

func (d DomainService) GetDomainsByIds(domainIds []uint) ([]*model.Domain, error)

根据域名ID获取域名

func (DomainService) List

func (d DomainService) List(req *request.DomainListReq) ([]*model.Domain, error)

List 获取数据列表

func (DomainService) Update

func (d DomainService) Update(domain *model.Domain) error

Update 更新域名资源

type UserService

type UserService struct{}

func (UserService) Add

func (s UserService) Add(user *user.User) error

Add 添加资源

func (UserService) ChangePwd

func (s UserService) ChangePwd(username string, hashNewPasswd string) error

ChangePwd 更新密码

func (UserService) ClearUserInfoCache

func (s UserService) ClearUserInfoCache()

ClearUserInfoCache 清理所有用户信息缓存

func (UserService) Count

func (s UserService) Count() (int64, error)

Count 获取数据总数

func (UserService) Delete

func (s UserService) Delete(ids []uint) error

Delete 批量删除

func (UserService) Exist

func (s UserService) Exist(filter map[string]interface{}) bool

Exist 判断资源是否存在

func (UserService) Find

func (s UserService) Find(filter map[string]interface{}, data *user.User) error

Find 获取单个资源

func (UserService) FindTheSameUserName

func (s UserService) FindTheSameUserName(username string, data *user.User) error

Find 获取同名用户已入库的序号最大的用户信息

func (UserService) GetCurrentLoginUser

func (s UserService) GetCurrentLoginUser(c *gin.Context) (user.User, error)

GetCurrentLoginUser 获取当前登录用户信息 需要缓存,减少数据库访问

func (UserService) GetUserById

func (us UserService) GetUserById(id uint) (user.User, error)

GetUserById 获取单个用户

func (UserService) GetUserByIds

func (s UserService) GetUserByIds(ids []uint) ([]user.User, error)

GetUserByIds 根据用户ID获取用户角色排序最小值

func (UserService) List

func (s UserService) List(req *request.UserListReq) ([]*user.User, error)

List 获取数据列表

func (UserService) ListAll

func (s UserService) ListAll() (list []*user.User, err error)

List 获取数据列表

func (UserService) ListCount

func (s UserService) ListCount(req *request.UserListReq) (int64, error)

ListCout 获取符合条件的数据列表条数

func (UserService) Login

func (s UserService) Login(user2 *user.User) (*user.User, error)

Login 登录

type ViewService

type ViewService struct {
}

func (ViewService) Add

func (v ViewService) Add(view *model.View) error

Add 添加视图记录

func (ViewService) CheckRelateResource

func (v ViewService) CheckRelateResource(filter map[string]interface{}) bool

CheckRelateResource 判断视图资源是否关联其他资源存在

func (ViewService) Count

func (v ViewService) Count() (int64, error)

Count 获取资源总数

func (ViewService) Delete

func (v ViewService) Delete(ids []uint) error

Delete 视图批量删除

func (ViewService) Exist

func (v ViewService) Exist(filter map[string]interface{}) bool

Exist 判断视图资源是否存在

func (ViewService) Find

func (v ViewService) Find(filter map[string]interface{}, data *model.View) error

Find 获取单个资源

func (ViewService) GetViewsByIds

func (v ViewService) GetViewsByIds(viewIds []uint) ([]*model.View, error)

根据角色ID获取角色

func (ViewService) List

func (v ViewService) List(req *request.ViewListReq) ([]*model.View, error)

List 获取数据列表

func (ViewService) Update

func (v ViewService) Update(view *model.View) error

Update 更新视图资源

type ZoneService

type ZoneService struct {
}

func (ZoneService) Add

func (z ZoneService) Add(zone *model.Zone) error

Add 添加zone记录

func (ZoneService) CheckRelateDomains

func (z ZoneService) CheckRelateDomains(filter map[string]interface{}) bool

CheckRelateDomains 判断zone资源是否关联其他domains实例

func (ZoneService) Count

func (z ZoneService) Count() (int64, error)

Count 获取资源总数

func (ZoneService) Delete

func (z ZoneService) Delete(ids []uint) error

Delete zone批量删除

func (ZoneService) Exist

func (z ZoneService) Exist(filter map[string]interface{}) bool

Exist 判断zone资源是否存在

func (ZoneService) Find

func (z ZoneService) Find(filter map[string]interface{}, data *model.Zone) error

Find 获取单个资源

func (ZoneService) GetZonesByIds

func (z ZoneService) GetZonesByIds(zoneIds []uint) ([]*model.Zone, error)

根据角色ID获取角色

func (ZoneService) List

func (z ZoneService) List(req *request.ZoneListReq) ([]*model.Zone, error)

List 获取数据列表

Jump to

Keyboard shortcuts

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