store

package
v0.0.0-...-6520428 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockStore

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

Mock of Store interface

func NewMockStore

func NewMockStore(ctrl *gomock.Controller) *MockStore

func (*MockStore) Close

func (_m *MockStore) Close()

func (*MockStore) CreateMappingRule

func (_m *MockStore) CreateMappingRule(_param0 string, _param1 view.MappingRule, _param2 UpdateOptions) (view.MappingRule, error)

func (*MockStore) CreateNamespace

func (_m *MockStore) CreateNamespace(_param0 string, _param1 UpdateOptions) (view.Namespace, error)

func (*MockStore) CreateRollupRule

func (_m *MockStore) CreateRollupRule(_param0 string, _param1 view.RollupRule, _param2 UpdateOptions) (view.RollupRule, error)

func (*MockStore) DeleteMappingRule

func (_m *MockStore) DeleteMappingRule(_param0 string, _param1 string, _param2 UpdateOptions) error

func (*MockStore) DeleteNamespace

func (_m *MockStore) DeleteNamespace(_param0 string, _param1 UpdateOptions) error

func (*MockStore) DeleteRollupRule

func (_m *MockStore) DeleteRollupRule(_param0 string, _param1 string, _param2 UpdateOptions) error

func (*MockStore) EXPECT

func (_m *MockStore) EXPECT() *_MockStoreRecorder

func (*MockStore) FetchMappingRule

func (_m *MockStore) FetchMappingRule(_param0 string, _param1 string) (view.MappingRule, error)

func (*MockStore) FetchMappingRuleHistory

func (_m *MockStore) FetchMappingRuleHistory(_param0 string, _param1 string) ([]view.MappingRule, error)

func (*MockStore) FetchNamespaces

func (_m *MockStore) FetchNamespaces() (view.Namespaces, error)

func (*MockStore) FetchRollupRule

func (_m *MockStore) FetchRollupRule(_param0 string, _param1 string) (view.RollupRule, error)

func (*MockStore) FetchRollupRuleHistory

func (_m *MockStore) FetchRollupRuleHistory(_param0 string, _param1 string) ([]view.RollupRule, error)

func (*MockStore) FetchRuleSetSnapshot

func (_m *MockStore) FetchRuleSetSnapshot(_param0 string) (view.RuleSet, error)

func (*MockStore) UpdateMappingRule

func (_m *MockStore) UpdateMappingRule(_param0 string, _param1 string, _param2 view.MappingRule, _param3 UpdateOptions) (view.MappingRule, error)

func (*MockStore) UpdateRollupRule

func (_m *MockStore) UpdateRollupRule(_param0 string, _param1 string, _param2 view.RollupRule, _param3 UpdateOptions) (view.RollupRule, error)

func (*MockStore) UpdateRuleSet

func (_m *MockStore) UpdateRuleSet(_param0 changes.RuleSetChanges, _param1 int, _param2 UpdateOptions) (view.RuleSet, error)

func (*MockStore) ValidateRuleSet

func (_m *MockStore) ValidateRuleSet(_param0 view.RuleSet) error

type Store

type Store interface {
	// FetchNamespaces fetches namespaces.
	FetchNamespaces() (view.Namespaces, error)

	// CreateNamespace creates a namespace for the given namespace ID.
	CreateNamespace(namespaceID string, uOpts UpdateOptions) (view.Namespace, error)

	// DeleteNamespace deletes the namespace for the given namespace ID.
	DeleteNamespace(namespaceID string, uOpts UpdateOptions) error

	// FetchRuleSetSnapshot fetches the latest ruleset snapshot for the given namespace ID.
	FetchRuleSetSnapshot(namespaceID string) (view.RuleSet, error)

	// ValidateRuleSet validates a namespace's ruleset.
	ValidateRuleSet(rs view.RuleSet) error

	// UpdateRuleSet updates a ruleset with a given namespace.
	UpdateRuleSet(rsChanges changes.RuleSetChanges, version int, uOpts UpdateOptions) (view.RuleSet, error)

	// FetchMappingRule fetches the mapping rule for the given namespace ID and rule ID.
	FetchMappingRule(namespaceID, mappingRuleID string) (view.MappingRule, error)

	// CreateMappingRule creates a mapping rule for the given namespace ID and rule data.
	CreateMappingRule(namespaceID string, mrv view.MappingRule, uOpts UpdateOptions) (view.MappingRule, error)

	// UpdateMappingRule updates a mapping rule for the given namespace ID and rule data.
	UpdateMappingRule(namespaceID, mappingRuleID string, mrv view.MappingRule, uOpts UpdateOptions) (view.MappingRule, error)

	// DeleteMappingRule deletes the mapping rule for the given namespace ID and rule ID.
	DeleteMappingRule(namespaceID, mappingRuleID string, uOpts UpdateOptions) error

	// FetchMappingRuleHistory fetches the history of the mapping rule for the given namespace ID
	// and rule ID.
	FetchMappingRuleHistory(namespaceID, mappingRuleID string) ([]view.MappingRule, error)

	// FetchRollupRule fetches the rollup rule for the given namespace ID and rule ID.
	FetchRollupRule(namespaceID, rollupRuleID string) (view.RollupRule, error)

	// CreateRollupRule creates a rollup rule for the given namespace ID and rule data.
	CreateRollupRule(namespaceID string, rrv view.RollupRule, uOpts UpdateOptions) (view.RollupRule, error)

	// UpdateRollupRule updates a rollup rule for the given namespace ID and rule data.
	UpdateRollupRule(namespaceID, rollupRuleID string, rrv view.RollupRule, uOpts UpdateOptions) (view.RollupRule, error)

	// DeleteRollupRule deletes the rollup rule for the given namespace ID and rule ID.
	DeleteRollupRule(namespaceID, rollupRuleID string, uOpts UpdateOptions) error

	// FetchRollupRuleHistory fetches the history of the rollup rule for the given namespace ID
	// and rule ID.
	FetchRollupRuleHistory(namespaceID, rollupRuleID string) ([]view.RollupRule, error)

	// Close closes the store.
	Close()
}

Store is a construct that can perform operations against a backing rule store.

type UpdateOptions

type UpdateOptions interface {
	// SetAuthor sets the author for an update.
	SetAuthor(value string) UpdateOptions

	// Author returns the author for an update.
	Author() string
}

UpdateOptions is a set of ruleset or namespace update options.

func NewUpdateOptions

func NewUpdateOptions() UpdateOptions

NewUpdateOptions creates a new set of update options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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