Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // Mgr is a global variable for the default immutablerule manager implementation Mgr = NewDefaultRuleManager() )
Functions ¶
This section is empty.
Types ¶
type Manager ¶
type Manager interface { // CreateImmutableRule creates the Immutable Rule CreateImmutableRule(ctx context.Context, m *model.Metadata) (int64, error) // UpdateImmutableRule update the immutable rules UpdateImmutableRule(ctx context.Context, projectID int64, ir *model.Metadata) error // EnableImmutableRule enable/disable immutable rules EnableImmutableRule(ctx context.Context, id int64, enabled bool) error // GetImmutableRule get immutable rule GetImmutableRule(ctx context.Context, id int64) (*model.Metadata, error) // Count count the immutable rules Count(ctx context.Context, query *q.Query) (int64, error) // ListImmutableRules list the immutable rules ListImmutableRules(ctx context.Context, query *q.Query) ([]*model.Metadata, error) // DeleteImmutableRule delete the immutable rule DeleteImmutableRule(ctx context.Context, id int64) error }
Manager ...
func NewDefaultRuleManager ¶
func NewDefaultRuleManager() Manager
NewDefaultRuleManager return a new instance of defaultRuleManager
Click to show internal directories.
Click to hide internal directories.