manager

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ForceStrategy added in v0.3.1

type ForceStrategy int

ForceStrategy is an enum for the force strategy. It implements https://pkg.go.dev/github.com/spf13/pflag#Value.

const (
	// ForceApply forces the application of the ruleset on all notifications,
	// even the ones marked as Done.
	ForceApply ForceStrategy = 1 << iota

	// ForceApply forces the enrichment of all notifications, even the ones
	// marked as Done.
	ForceEnrich
)

func (ForceStrategy) Allowed added in v0.3.1

func (r ForceStrategy) Allowed() string

func (ForceStrategy) Has added in v0.3.1

func (r ForceStrategy) Has(s ForceStrategy) bool

func (*ForceStrategy) Set added in v0.3.1

func (r *ForceStrategy) Set(value string) error

func (ForceStrategy) String added in v0.3.1

func (r ForceStrategy) String() string

func (ForceStrategy) Type added in v0.3.1

func (r ForceStrategy) Type() string

type Manager

type Manager struct {
	Notifications notifications.Notifications

	Actors actors.ActorsMap

	Refresh RefreshStrategy
	Force   ForceStrategy
	// contains filtered or unexported fields
}

func New

func New(config *config.Data) *Manager

func (*Manager) Apply

func (m *Manager) Apply(noop, force bool) error

func (*Manager) Enrich added in v0.3.1

func (*Manager) Load

func (m *Manager) Load() error

func (*Manager) Save

func (m *Manager) Save() error

func (*Manager) WithCaller added in v0.3.0

func (m *Manager) WithCaller(caller api.Caller) *Manager

type RefreshStrategy added in v0.1.1

type RefreshStrategy int

RefreshStrategy is an enum for the refresh strategy. It implements https://pkg.go.dev/github.com/spf13/pflag#Value.

const (
	// AutoRefresh refreshes the notifications if the cache is expired.
	AutoRefresh RefreshStrategy = iota

	// ForceRefresh always refreshes the notifications.
	ForceRefresh

	// PreventRefresh never refreshes the notifications.
	PreventRefresh
)

func (*RefreshStrategy) Allowed added in v0.3.0

func (r *RefreshStrategy) Allowed() string

func (*RefreshStrategy) Set added in v0.3.0

func (r *RefreshStrategy) Set(value string) error

func (RefreshStrategy) String added in v0.3.0

func (r RefreshStrategy) String() string

func (RefreshStrategy) Type added in v0.3.0

func (r RefreshStrategy) Type() string

Jump to

Keyboard shortcuts

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