service

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterAlert added in v1.2.0

func RegisterAlert(i IAlert)

func RegisterConfig added in v1.1.0

func RegisterConfig(i IConfig)

func RegisterGroup

func RegisterGroup(i IGroup)

func RegisterMail added in v1.2.0

func RegisterMail(i IMail)

func RegisterNode

func RegisterNode(i INode)

func RegisterRules added in v1.1.0

func RegisterRules(i IRules)

func RegisterUser

func RegisterUser(i IUser)

Types

type IAlert added in v1.2.0

type IAlert interface {
	AddAlert(ctx context.Context, alerts []model.Alert) (err error)
	Page(ctx context.Context, pageNo int, pageSize int, alert model.Alert) (models []vo.Alert, total int, err error)
}

func Alert added in v1.2.0

func Alert() IAlert

type IConfig added in v1.1.0

type IConfig interface {
	Add(ctx context.Context, config model.Config) (result entity.Config, err error)
	Update(ctx context.Context, config model.Config) (result entity.Config, err error)
	Remove(ctx context.Context, id int) (config entity.Config, err error)
	Detail(ctx context.Context, id int) (config entity.Config, err error)
	Page(ctx context.Context, pageNo int, pageSize int, config model.Config) (configs []entity.Config, total int, err error)
	NameQuery(ctx context.Context, name string) (result entity.Config, err error)
}

func Config added in v1.1.0

func Config() IConfig

type IGroup

type IGroup interface {
	AddGroup(ctx context.Context, group *model.Group) (err error)
	UpdateGroup(ctx context.Context, group *model.Group) (err error)
	DeleteById(ctx context.Context, id int) (group entity.Group, err error)
	Detail(ctx context.Context, id int) (group entity.Group, err error)
	Page(ctx context.Context, group model.Group, pageNo int, pageSize int) (list []entity.Group, total int, err error)
	List(ctx context.Context) (groups []entity.Group, err error)
}

func Group

func Group() IGroup

type IMail added in v1.2.0

type IMail interface {
	SendAlertEmail(ctx context.Context, messageId int64)
}

func Mail added in v1.2.0

func Mail() IMail

type INode

type INode interface {
	AddNode(ctx context.Context, node *model.Node) (err error)
	UpdateNode(ctx context.Context, node *model.Node) (err error)
	RemoveNode(ctx context.Context, id int) (node entity.Node, err error)
	DetailNode(ctx context.Context, id int) (node entity.Node, err error)
	Page(ctx context.Context, pageNo int, pageSize int, node model.Node) (total int, models []entity.Node, err error)
	Active(ctx context.Context, id int, active bool) (err error)
	Target(ctx context.Context) (result string, err error)
}

func Node

func Node() INode

type IRules added in v1.1.0

type IRules interface {
	Add(ctx context.Context, rules model.Rules) (result entity.Rules, err error)
	Update(ctx context.Context, rules model.Rules) (rule entity.Rules, err error)
	Remove(ctx context.Context, id int) (rules entity.Rules, err error)
	Detail(ctx context.Context, id int) (rules entity.Rules, err error)
	Page(ctx context.Context, pageNo int, pageSize int, rules model.Rules) (models []entity.Rules, total int, err error)
	GeneratedFile(ctx context.Context) (err error)
	Active(ctx context.Context, id int, active bool) (err error)
}

func Rules added in v1.1.0

func Rules() IRules

type IUser

type IUser interface {
	Login(ctx context.Context, loginName *string, password *string) (token string, userJson string, err error)
	Regist(ctx context.Context, user *model.User) (err error)
	CheckUser(ctx context.Context, loginName string) bool
	Add(ctx context.Context, user model.User) (id int64, err error)
	Update(ctx context.Context, user model.User) (err error)
	Delete(ctx context.Context, id int) (user entity.User, err error)
	Detail(ctx context.Context, id int) (user entity.User, err error)
	Page(ctx context.Context, pageNo int, pageSize int, user model.User) (total int, users []entity.User, err error)
	UpdatePassword(ctx context.Context, user model.User, password string) (err error)
}

func User

func User() IUser

Jump to

Keyboard shortcuts

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