Documentation
¶
Index ¶
- Constants
- func CreateMockRegistry(doguRegs []string) (main *Registry, doguConfigs map[string]*ConfigurationContext, ...)
- 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 Registry
- func (_m *Registry) BlueprintRegistry() registry.ConfigurationContext
- func (_m *Registry) DoguConfig(dogu string) registry.ConfigurationContext
- func (_m *Registry) DoguRegistry() registry.DoguRegistry
- func (_m *Registry) GlobalConfig() registry.ConfigurationContext
- func (_m *Registry) HostConfig(hostService string) registry.ConfigurationContext
- func (_m *Registry) State(dogu string) registry.State
Constants ¶
const ( AnyLifetime = -1 Anything = mock.Anything )
Variables ¶
This section is empty.
Functions ¶
func CreateMockRegistry ¶
func CreateMockRegistry(doguRegs []string) (main *Registry, doguConfigs map[string]*ConfigurationContext, doguRegistry *DoguRegistry)
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.
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 (*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 (*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 Registry ¶
Registry is an autogenerated mock type for the Registry type
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