store

package
v1.0.0-rc.3 Latest Latest
Warning

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

Go to latest
Published: Nov 12, 2020 License: Apache-2.0 Imports: 4 Imported by: 8

Documentation

Overview

Package store is a generated GoMock package.

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
}

MockStore is a mock of Store interface

func NewMockStore

func NewMockStore(ctrl *gomock.Controller) *MockStore

NewMockStore creates a new mock instance

func (*MockStore) Close

func (m *MockStore) Close()

Close mocks base method

func (*MockStore) CreateMappingRule

func (m *MockStore) CreateMappingRule(arg0 string, arg1 view.MappingRule, arg2 UpdateOptions) (view.MappingRule, error)

CreateMappingRule mocks base method

func (*MockStore) CreateNamespace

func (m *MockStore) CreateNamespace(arg0 string, arg1 UpdateOptions) (view.Namespace, error)

CreateNamespace mocks base method

func (*MockStore) CreateRollupRule

func (m *MockStore) CreateRollupRule(arg0 string, arg1 view.RollupRule, arg2 UpdateOptions) (view.RollupRule, error)

CreateRollupRule mocks base method

func (*MockStore) DeleteMappingRule

func (m *MockStore) DeleteMappingRule(arg0, arg1 string, arg2 UpdateOptions) error

DeleteMappingRule mocks base method

func (*MockStore) DeleteNamespace

func (m *MockStore) DeleteNamespace(arg0 string, arg1 UpdateOptions) error

DeleteNamespace mocks base method

func (*MockStore) DeleteRollupRule

func (m *MockStore) DeleteRollupRule(arg0, arg1 string, arg2 UpdateOptions) error

DeleteRollupRule mocks base method

func (*MockStore) EXPECT

func (m *MockStore) EXPECT() *MockStoreMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockStore) FetchMappingRule

func (m *MockStore) FetchMappingRule(arg0, arg1 string) (view.MappingRule, error)

FetchMappingRule mocks base method

func (*MockStore) FetchMappingRuleHistory

func (m *MockStore) FetchMappingRuleHistory(arg0, arg1 string) ([]view.MappingRule, error)

FetchMappingRuleHistory mocks base method

func (*MockStore) FetchNamespaces

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

FetchNamespaces mocks base method

func (*MockStore) FetchRollupRule

func (m *MockStore) FetchRollupRule(arg0, arg1 string) (view.RollupRule, error)

FetchRollupRule mocks base method

func (*MockStore) FetchRollupRuleHistory

func (m *MockStore) FetchRollupRuleHistory(arg0, arg1 string) ([]view.RollupRule, error)

FetchRollupRuleHistory mocks base method

func (*MockStore) FetchRuleSetSnapshot

func (m *MockStore) FetchRuleSetSnapshot(arg0 string) (view.RuleSet, error)

FetchRuleSetSnapshot mocks base method

func (*MockStore) UpdateMappingRule

func (m *MockStore) UpdateMappingRule(arg0, arg1 string, arg2 view.MappingRule, arg3 UpdateOptions) (view.MappingRule, error)

UpdateMappingRule mocks base method

func (*MockStore) UpdateRollupRule

func (m *MockStore) UpdateRollupRule(arg0, arg1 string, arg2 view.RollupRule, arg3 UpdateOptions) (view.RollupRule, error)

UpdateRollupRule mocks base method

func (*MockStore) UpdateRuleSet

func (m *MockStore) UpdateRuleSet(arg0 changes.RuleSetChanges, arg1 int, arg2 UpdateOptions) (view.RuleSet, error)

UpdateRuleSet mocks base method

func (*MockStore) ValidateRuleSet

func (m *MockStore) ValidateRuleSet(arg0 view.RuleSet) error

ValidateRuleSet mocks base method

type MockStoreMockRecorder

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

MockStoreMockRecorder is the mock recorder for MockStore

func (*MockStoreMockRecorder) Close

func (mr *MockStoreMockRecorder) Close() *gomock.Call

Close indicates an expected call of Close

func (*MockStoreMockRecorder) CreateMappingRule

func (mr *MockStoreMockRecorder) CreateMappingRule(arg0, arg1, arg2 interface{}) *gomock.Call

CreateMappingRule indicates an expected call of CreateMappingRule

func (*MockStoreMockRecorder) CreateNamespace

func (mr *MockStoreMockRecorder) CreateNamespace(arg0, arg1 interface{}) *gomock.Call

CreateNamespace indicates an expected call of CreateNamespace

func (*MockStoreMockRecorder) CreateRollupRule

func (mr *MockStoreMockRecorder) CreateRollupRule(arg0, arg1, arg2 interface{}) *gomock.Call

CreateRollupRule indicates an expected call of CreateRollupRule

func (*MockStoreMockRecorder) DeleteMappingRule

func (mr *MockStoreMockRecorder) DeleteMappingRule(arg0, arg1, arg2 interface{}) *gomock.Call

DeleteMappingRule indicates an expected call of DeleteMappingRule

func (*MockStoreMockRecorder) DeleteNamespace

func (mr *MockStoreMockRecorder) DeleteNamespace(arg0, arg1 interface{}) *gomock.Call

DeleteNamespace indicates an expected call of DeleteNamespace

func (*MockStoreMockRecorder) DeleteRollupRule

func (mr *MockStoreMockRecorder) DeleteRollupRule(arg0, arg1, arg2 interface{}) *gomock.Call

DeleteRollupRule indicates an expected call of DeleteRollupRule

func (*MockStoreMockRecorder) FetchMappingRule

func (mr *MockStoreMockRecorder) FetchMappingRule(arg0, arg1 interface{}) *gomock.Call

FetchMappingRule indicates an expected call of FetchMappingRule

func (*MockStoreMockRecorder) FetchMappingRuleHistory

func (mr *MockStoreMockRecorder) FetchMappingRuleHistory(arg0, arg1 interface{}) *gomock.Call

FetchMappingRuleHistory indicates an expected call of FetchMappingRuleHistory

func (*MockStoreMockRecorder) FetchNamespaces

func (mr *MockStoreMockRecorder) FetchNamespaces() *gomock.Call

FetchNamespaces indicates an expected call of FetchNamespaces

func (*MockStoreMockRecorder) FetchRollupRule

func (mr *MockStoreMockRecorder) FetchRollupRule(arg0, arg1 interface{}) *gomock.Call

FetchRollupRule indicates an expected call of FetchRollupRule

func (*MockStoreMockRecorder) FetchRollupRuleHistory

func (mr *MockStoreMockRecorder) FetchRollupRuleHistory(arg0, arg1 interface{}) *gomock.Call

FetchRollupRuleHistory indicates an expected call of FetchRollupRuleHistory

func (*MockStoreMockRecorder) FetchRuleSetSnapshot

func (mr *MockStoreMockRecorder) FetchRuleSetSnapshot(arg0 interface{}) *gomock.Call

FetchRuleSetSnapshot indicates an expected call of FetchRuleSetSnapshot

func (*MockStoreMockRecorder) UpdateMappingRule

func (mr *MockStoreMockRecorder) UpdateMappingRule(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

UpdateMappingRule indicates an expected call of UpdateMappingRule

func (*MockStoreMockRecorder) UpdateRollupRule

func (mr *MockStoreMockRecorder) UpdateRollupRule(arg0, arg1, arg2, arg3 interface{}) *gomock.Call

UpdateRollupRule indicates an expected call of UpdateRollupRule

func (*MockStoreMockRecorder) UpdateRuleSet

func (mr *MockStoreMockRecorder) UpdateRuleSet(arg0, arg1, arg2 interface{}) *gomock.Call

UpdateRuleSet indicates an expected call of UpdateRuleSet

func (*MockStoreMockRecorder) ValidateRuleSet

func (mr *MockStoreMockRecorder) ValidateRuleSet(arg0 interface{}) *gomock.Call

ValidateRuleSet indicates an expected call of ValidateRuleSet

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