auditplan

package
v1.2201.0-pre1 Latest Latest
Warning

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

Go to latest
Published: Jan 7, 2022 License: MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrAuditPlanExisted = errors.New("audit plan existed")
View Source
var ErrAuditPlanNotExist = errors.New("audit plan not exist")

Functions

func InitManager

func InitManager(s *model.Storage) chan struct{}

Types

type Manager

type Manager struct {
	// contains filtered or unexported fields
}

Manager is the struct managing the persistent AuditPlans. It is *goroutine-safe*, since all exported methods are protected by a lock.

All audit plan operations except select should go through Manager.

func GetManager

func GetManager() *Manager

func (*Manager) AddDynamicAuditPlan

func (mgr *Manager) AddDynamicAuditPlan(name, cronExp, instanceName, instanceDatabase, currentUserName string) error

func (*Manager) AddStaticAuditPlan

func (mgr *Manager) AddStaticAuditPlan(name, cronExp, dbType, currentUserName string) error

func (*Manager) DeleteAuditPlan

func (mgr *Manager) DeleteAuditPlan(name string) error

func (*Manager) TriggerAuditPlan

func (mgr *Manager) TriggerAuditPlan(name string) (*model.AuditPlanReport, error)

func (*Manager) UpdateAuditPlan

func (mgr *Manager) UpdateAuditPlan(name string, attrs map[string]interface{}) error

Jump to

Keyboard shortcuts

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