policy

package
v0.0.0-...-a14a4d2 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Mgr is a global variable for the default notification policies
	Mgr = NewManager()
)

Functions

This section is empty.

Types

type Manager

type Manager interface {
	// Create new policy
	Create(ctx context.Context, policy *model.Policy) (int64, error)
	// List the policies, returns the policy list and error
	List(ctx context.Context, query *q.Query) ([]*model.Policy, error)
	// Count the policies, returns the policy count and error
	Count(ctx context.Context, query *q.Query) (int64, error)
	// Get policy with specified ID
	Get(ctx context.Context, id int64) (*model.Policy, error)
	// Update the specified policy
	Update(ctx context.Context, policy *model.Policy) error
	// Delete the specified policy
	Delete(ctx context.Context, policyID int64) error
	// GetRelatedPolices get event type related policies in project
	GetRelatedPolices(ctx context.Context, projectID int64, eventType string) ([]*model.Policy, error)
}

Manager manages the notification policies

func NewManager

func NewManager() Manager

NewManager ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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