Documentation ¶
Index ¶
- type Dao
- func (d *Dao) AddGroup(c context.Context, g *model.Group) (res int64, err error)
- func (d *Dao) AddProduct(c context.Context, p *model.Product) (res int64, err error)
- func (d *Dao) AddTarget(c context.Context, t *model.Target) (res int64, err error)
- func (d *Dao) AllGroups(c context.Context) (res []*model.Group, err error)
- func (d *Dao) AllProducts(c context.Context) (res []*model.Product, err error)
- func (d *Dao) AllTargets(c context.Context, state int) (res []*model.Target, err error)
- func (d *Dao) Close()
- func (d *Dao) CountTargets(c context.Context, where string) (res int, err error)
- func (d *Dao) DeleteGroup(c context.Context, id int64) (res int64, err error)
- func (d *Dao) DeleteProduct(c context.Context, id int64) (res int64, err error)
- func (d *Dao) DeleteTarget(c context.Context, id int64) (res int64, err error)
- func (d *Dao) GetMailLock(c context.Context, name string, interval int, t *model.Target, code string) (ok bool, err error)
- func (d *Dao) Group(c context.Context, id int64) (res *model.Group, err error)
- func (d *Dao) GroupByName(c context.Context, name string) (res *model.Group, err error)
- func (d *Dao) Groups(c context.Context, ids []int64) (res []*model.Group, err error)
- func (d *Dao) IsExisted(c context.Context, t *model.Target) (res int64, err error)
- func (d *Dao) Ping(c context.Context) (err error)
- func (d *Dao) Product(c context.Context, id int64) (res *model.Product, err error)
- func (d *Dao) ProductByName(c context.Context, name string) (res *model.Product, err error)
- func (d *Dao) Target(c context.Context, id int64) (res *model.Target, err error)
- func (d *Dao) TargetIncr(c context.Context, t *model.Target, code string) (res int)
- func (d *Dao) TargetSync(c context.Context, id int64, state int) (err error)
- func (d *Dao) TargetsByQuery(c context.Context, where string) (res []*model.Target, err error)
- func (d *Dao) UpdateGroup(c context.Context, g *model.Group) (res int64, err error)
- func (d *Dao) UpdateProduct(c context.Context, p *model.Product) (res int64, err error)
- func (d *Dao) UpdateTarget(c context.Context, t *model.Target) (res int64, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dao ¶
type Dao struct {
// contains filtered or unexported fields
}
Dao .
func (*Dao) AddProduct ¶
AddProduct add a new product.
func (*Dao) AllProducts ¶
AllProducts return all products.
func (*Dao) AllTargets ¶
AllTargets return all targets by state.
func (*Dao) CountTargets ¶
CountTargets .
func (*Dao) DeleteGroup ¶
DeleteGroup delete group.
func (*Dao) DeleteProduct ¶
DeleteProduct delete a product by id.
func (*Dao) DeleteTarget ¶
DeleteTarget delete target by id.
func (*Dao) GetMailLock ¶
func (d *Dao) GetMailLock(c context.Context, name string, interval int, t *model.Target, code string) (ok bool, err error)
GetMailLock .
func (*Dao) GroupByName ¶
GroupByName query group id by name.
func (*Dao) ProductByName ¶
ProductByName get product bu name.
func (*Dao) TargetIncr ¶
TargetIncr get current target error amount.
func (*Dao) TargetSync ¶
TargetSync sync target state by id.
func (*Dao) TargetsByQuery ¶
TargetsByQuery query targets by query.
func (*Dao) UpdateGroup ¶
UpdateGroup update group.
func (*Dao) UpdateProduct ¶
UpdateProduct update product by id.
Click to show internal directories.
Click to hide internal directories.