Documentation
¶
Index ¶
- Constants
- func OnDelete(config *ConfigurationContext, key string, returnError error)
- func OnDeleteRecursive(config *ConfigurationContext, key string, returnError error)
- func OnExists(config *ConfigurationContext, key string, returnExists bool, returnError error)
- func OnGet(config *ConfigurationContext, key string, returnValue string, ...)
- func OnGetOrFalse(config *ConfigurationContext, key string, returnValue string, ...)
- func OnRefresh(config *ConfigurationContext, key string, ttl int, returnError error)
- func OnRemoveAll(config *ConfigurationContext, returnError error)
- func OnSet(config *ConfigurationContext, keyToSet string, valueToSet string, ...)
- func OnSetWithLifetime(config *ConfigurationContext, key string, value string, ttl int, ...)
- type ConfigurationContext
- func (_m *ConfigurationContext) Delete(key string) error
- func (_m *ConfigurationContext) DeleteRecursive(key string) error
- func (_m *ConfigurationContext) Exists(key string) (bool, error)
- func (_m *ConfigurationContext) Get(key string) (string, error)
- func (_m *ConfigurationContext) GetAll() (map[string]string, error)
- func (_m *ConfigurationContext) GetOrFalse(key string) (bool, string, error)
- func (_m *ConfigurationContext) Refresh(key string, timeToLiveInSeconds int) error
- func (_m *ConfigurationContext) RemoveAll() error
- func (_m *ConfigurationContext) Set(key string, value string) error
- func (_m *ConfigurationContext) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error
- type DoguRegistry
- func (_m *DoguRegistry) Enable(dogu *core.Dogu) error
- func (_m *DoguRegistry) Get(name string) (*core.Dogu, error)
- func (_m *DoguRegistry) GetAll() ([]*core.Dogu, error)
- func (_m *DoguRegistry) IsEnabled(name string) (bool, error)
- func (_m *DoguRegistry) Register(dogu *core.Dogu) error
- func (_m *DoguRegistry) Unregister(name string) error
- type NewWatchConfigurationContextT
- type Registry
- func (_m *Registry) BlueprintRegistry() registry.ConfigurationContext
- func (_m *Registry) DoguConfig(dogu string) registry.ConfigurationContext
- func (_m *Registry) DoguRegistry() registry.DoguRegistry
- func (_m *Registry) GetNode() (registry.Node, error)
- func (_m *Registry) GlobalConfig() registry.ConfigurationContext
- func (_m *Registry) HostConfig(hostService string) registry.ConfigurationContext
- func (_m *Registry) RootConfig() registry.WatchConfigurationContext
- func (_m *Registry) State(dogu string) registry.State
- type RegistryMocks
- type WatchConfigurationContext
Constants ¶
const ( AnyLifetime = -1 Anything = mock.Anything )
Variables ¶
This section is empty.
Functions ¶
func OnDelete ¶
func OnDelete(config *ConfigurationContext, key string, returnError error)
OnDelete provides a helper function to mock the "Delete" method of a configuration context
func OnDeleteRecursive ¶
func OnDeleteRecursive(config *ConfigurationContext, key string, returnError error)
OnDeleteRecursive provides a helper function to mock the "Delete" method of a configuration context
func OnExists ¶
func OnExists(config *ConfigurationContext, key string, returnExists bool, returnError error)
OnExists provides a helper function to mock the "Exists" method of a configuration context
func OnGet ¶
func OnGet(config *ConfigurationContext, key string, returnValue string, returnError error)
OnGet provides a helper function to mock the "Get" method of a configuration context
func OnGetOrFalse ¶
func OnGetOrFalse(config *ConfigurationContext, key string, returnValue string, returnExists bool, returnError error)
OnGetOrFalse provides a helper function to mock the "GetOrFalse" method of a configuration context
func OnRefresh ¶
func OnRefresh(config *ConfigurationContext, key string, ttl int, returnError error)
OnRefresh provides a helper function to mock the "Refresh" method of a configuration context
func OnRemoveAll ¶
func OnRemoveAll(config *ConfigurationContext, returnError error)
OnRemoveAll provides a helper function to mock the "RemoveAll" method of a configuration context
func OnSet ¶
func OnSet(config *ConfigurationContext, keyToSet string, valueToSet string, returnError error)
OnSet provides a helper function to mock the "Set" method of a configuration context
func OnSetWithLifetime ¶
func OnSetWithLifetime(config *ConfigurationContext, key string, value string, ttl int, returnError error)
OnSetWithLifetime provides a helper function to mock the "SetWithLifetime" method of a configuration context
Types ¶
type ConfigurationContext ¶
ConfigurationContext is an autogenerated mock type for the ConfigurationContext type
func NewConfigurationContext ¶ added in v0.8.0
func NewConfigurationContext(t mockConstructorTestingTNewConfigurationContext) *ConfigurationContext
NewConfigurationContext creates a new instance of ConfigurationContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*ConfigurationContext) Delete ¶
func (_m *ConfigurationContext) Delete(key string) error
Delete provides a mock function with given fields: key
func (*ConfigurationContext) DeleteRecursive ¶
func (_m *ConfigurationContext) DeleteRecursive(key string) error
DeleteRecursive provides a mock function with given fields: key
func (*ConfigurationContext) Exists ¶
func (_m *ConfigurationContext) Exists(key string) (bool, error)
Exists provides a mock function with given fields: key
func (*ConfigurationContext) Get ¶
func (_m *ConfigurationContext) Get(key string) (string, error)
Get provides a mock function with given fields: key
func (*ConfigurationContext) GetAll ¶
func (_m *ConfigurationContext) GetAll() (map[string]string, error)
GetAll provides a mock function with given fields:
func (*ConfigurationContext) GetOrFalse ¶
func (_m *ConfigurationContext) GetOrFalse(key string) (bool, string, error)
GetOrFalse provides a mock function with given fields: key
func (*ConfigurationContext) Refresh ¶
func (_m *ConfigurationContext) Refresh(key string, timeToLiveInSeconds int) error
Refresh provides a mock function with given fields: key, timeToLiveInSeconds
func (*ConfigurationContext) RemoveAll ¶
func (_m *ConfigurationContext) RemoveAll() error
RemoveAll provides a mock function with given fields:
func (*ConfigurationContext) Set ¶
func (_m *ConfigurationContext) Set(key string, value string) error
Set provides a mock function with given fields: key, value
func (*ConfigurationContext) SetWithLifetime ¶
func (_m *ConfigurationContext) SetWithLifetime(key string, value string, timeToLiveInSeconds int) error
SetWithLifetime provides a mock function with given fields: key, value, timeToLiveInSeconds
type DoguRegistry ¶
DoguRegistry is an autogenerated mock type for the DoguRegistry type
func NewDoguRegistry ¶ added in v0.8.0
func NewDoguRegistry(t mockConstructorTestingTNewDoguRegistry) *DoguRegistry
NewDoguRegistry creates a new instance of DoguRegistry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*DoguRegistry) Enable ¶
func (_m *DoguRegistry) Enable(dogu *core.Dogu) error
Enable provides a mock function with given fields: dogu
func (*DoguRegistry) Get ¶
func (_m *DoguRegistry) Get(name string) (*core.Dogu, error)
Get provides a mock function with given fields: name
func (*DoguRegistry) GetAll ¶
func (_m *DoguRegistry) GetAll() ([]*core.Dogu, error)
GetAll provides a mock function with given fields:
func (*DoguRegistry) IsEnabled ¶
func (_m *DoguRegistry) IsEnabled(name string) (bool, error)
IsEnabled provides a mock function with given fields: name
func (*DoguRegistry) Register ¶
func (_m *DoguRegistry) Register(dogu *core.Dogu) error
Register provides a mock function with given fields: dogu
func (*DoguRegistry) Unregister ¶
func (_m *DoguRegistry) Unregister(name string) error
Unregister provides a mock function with given fields: name
type NewWatchConfigurationContextT ¶ added in v0.2.0
type Registry ¶
Registry is an autogenerated mock type for the Registry type
func NewRegistry ¶ added in v0.5.0
func NewRegistry(t mockConstructorTestingTNewRegistry) *Registry
NewRegistry creates a new instance of Registry. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*Registry) BlueprintRegistry ¶
func (_m *Registry) BlueprintRegistry() registry.ConfigurationContext
BlueprintRegistry provides a mock function with given fields:
func (*Registry) DoguConfig ¶
func (_m *Registry) DoguConfig(dogu string) registry.ConfigurationContext
DoguConfig provides a mock function with given fields: dogu
func (*Registry) DoguRegistry ¶
func (_m *Registry) DoguRegistry() registry.DoguRegistry
DoguRegistry provides a mock function with given fields:
func (*Registry) GlobalConfig ¶
func (_m *Registry) GlobalConfig() registry.ConfigurationContext
GlobalConfig provides a mock function with given fields:
func (*Registry) HostConfig ¶
func (_m *Registry) HostConfig(hostService string) registry.ConfigurationContext
HostConfig provides a mock function with given fields: hostService
func (*Registry) RootConfig ¶ added in v0.2.0
func (_m *Registry) RootConfig() registry.WatchConfigurationContext
RootConfig provides a mock function with given fields:
type RegistryMocks ¶ added in v0.5.0
type RegistryMocks struct {
Registry *Registry
SubRegistries map[string]*ConfigurationContext
DoguRegistry *DoguRegistry
WatchContext *WatchConfigurationContext
Node registry.Node
}
func CreateMockRegistry ¶
func CreateMockRegistry(doguRegs []string) RegistryMocks
CreateMockRegistry creates a mock registry containing default values for any sub-registry. The doguRegs parameter contains a list with all dogu registries that should be exist. Pass nil if you don't need any dogu registry. Note: AssertExpectations on the registry may fail because of the predefined expectations.
type WatchConfigurationContext ¶ added in v0.2.0
WatchConfigurationContext is an autogenerated mock type for the WatchConfigurationContext type
func NewWatchConfigurationContext ¶ added in v0.2.0
func NewWatchConfigurationContext(t NewWatchConfigurationContextT) *WatchConfigurationContext
NewWatchConfigurationContext creates a new instance of WatchConfigurationContext. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*WatchConfigurationContext) Get ¶ added in v0.2.0
func (_m *WatchConfigurationContext) Get(key string) (string, error)
Get provides a mock function with given fields: key
func (*WatchConfigurationContext) GetChildrenPaths ¶ added in v0.2.0
func (_m *WatchConfigurationContext) GetChildrenPaths(key string) ([]string, error)
GetChildrenPaths provides a mock function with given fields: key