Documentation ¶
Index ¶
- Variables
- func IsCapability(a net.Addr) bool
- type MockProvider
- func (_m *MockProvider) AddMeta(_a0 ...provider.Meta)
- func (_m *MockProvider) DeleteMeta(_a0 ...string)
- func (_m *MockProvider) EXPECT() *MockProvider_Expecter
- func (_m *MockProvider) GetMeta() map[string]string
- func (_m *MockProvider) LastError() (time.Time, error)
- func (_m *MockProvider) Listen(capability string) (net.Listener, error)
- func (_m *MockProvider) SessionStatus() string
- func (_m *MockProvider) Start() error
- func (_m *MockProvider) Stop() error
- func (_m *MockProvider) UpdateMeta(_a0 map[string]string)
- type MockProvider_AddMeta_Call
- type MockProvider_DeleteMeta_Call
- type MockProvider_Expecter
- func (_e *MockProvider_Expecter) AddMeta(_a0 ...interface{}) *MockProvider_AddMeta_Call
- func (_e *MockProvider_Expecter) DeleteMeta(_a0 ...interface{}) *MockProvider_DeleteMeta_Call
- func (_e *MockProvider_Expecter) GetMeta() *MockProvider_GetMeta_Call
- func (_e *MockProvider_Expecter) LastError() *MockProvider_LastError_Call
- func (_e *MockProvider_Expecter) Listen(capability interface{}) *MockProvider_Listen_Call
- func (_e *MockProvider_Expecter) SessionStatus() *MockProvider_SessionStatus_Call
- func (_e *MockProvider_Expecter) Start() *MockProvider_Start_Call
- func (_e *MockProvider_Expecter) Stop() *MockProvider_Stop_Call
- func (_e *MockProvider_Expecter) UpdateMeta(_a0 interface{}) *MockProvider_UpdateMeta_Call
- type MockProvider_GetMeta_Call
- type MockProvider_LastError_Call
- type MockProvider_Listen_Call
- func (_c *MockProvider_Listen_Call) Return(_a0 net.Listener, _a1 error) *MockProvider_Listen_Call
- func (_c *MockProvider_Listen_Call) Run(run func(capability string)) *MockProvider_Listen_Call
- func (_c *MockProvider_Listen_Call) RunAndReturn(run func(string) (net.Listener, error)) *MockProvider_Listen_Call
- type MockProvider_SessionStatus_Call
- type MockProvider_Start_Call
- type MockProvider_Stop_Call
- type MockProvider_UpdateMeta_Call
- type Provider
Constants ¶
This section is empty.
Variables ¶
var CAPCoreAPI = capability.NewAddr("core_api")
CAPCoreAPI is the capability used to securely expose the Consul HTTP API to HCP
Functions ¶
func IsCapability ¶
IsCapability takes a net.Addr and returns true if it is a SCADA capability.Addr
Types ¶
type MockProvider ¶
MockProvider is an autogenerated mock type for the Provider type
func NewMockProvider ¶
func NewMockProvider(t mockConstructorTestingTNewMockProvider) *MockProvider
NewMockProvider creates a new instance of MockProvider. It also registers a testing interface on the mock and a cleanup function to assert the mocks expectations.
func (*MockProvider) AddMeta ¶ added in v1.14.7
func (_m *MockProvider) AddMeta(_a0 ...provider.Meta)
AddMeta provides a mock function with given fields: _a0
func (*MockProvider) DeleteMeta ¶ added in v1.14.7
func (_m *MockProvider) DeleteMeta(_a0 ...string)
DeleteMeta provides a mock function with given fields: _a0
func (*MockProvider) EXPECT ¶
func (_m *MockProvider) EXPECT() *MockProvider_Expecter
func (*MockProvider) GetMeta ¶
func (_m *MockProvider) GetMeta() map[string]string
GetMeta provides a mock function with given fields:
func (*MockProvider) LastError ¶
func (_m *MockProvider) LastError() (time.Time, error)
LastError provides a mock function with given fields:
func (*MockProvider) Listen ¶
func (_m *MockProvider) Listen(capability string) (net.Listener, error)
Listen provides a mock function with given fields: capability
func (*MockProvider) SessionStatus ¶
func (_m *MockProvider) SessionStatus() string
SessionStatus provides a mock function with given fields:
func (*MockProvider) Start ¶
func (_m *MockProvider) Start() error
Start provides a mock function with given fields:
func (*MockProvider) Stop ¶
func (_m *MockProvider) Stop() error
Stop provides a mock function with given fields:
func (*MockProvider) UpdateMeta ¶
func (_m *MockProvider) UpdateMeta(_a0 map[string]string)
UpdateMeta provides a mock function with given fields: _a0
type MockProvider_AddMeta_Call ¶ added in v1.14.7
MockProvider_AddMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'AddMeta'
func (*MockProvider_AddMeta_Call) Return ¶ added in v1.14.7
func (_c *MockProvider_AddMeta_Call) Return() *MockProvider_AddMeta_Call
func (*MockProvider_AddMeta_Call) Run ¶ added in v1.14.7
func (_c *MockProvider_AddMeta_Call) Run(run func(_a0 ...provider.Meta)) *MockProvider_AddMeta_Call
func (*MockProvider_AddMeta_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_AddMeta_Call) RunAndReturn(run func(...provider.Meta)) *MockProvider_AddMeta_Call
type MockProvider_DeleteMeta_Call ¶ added in v1.14.7
MockProvider_DeleteMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'DeleteMeta'
func (*MockProvider_DeleteMeta_Call) Return ¶ added in v1.14.7
func (_c *MockProvider_DeleteMeta_Call) Return() *MockProvider_DeleteMeta_Call
func (*MockProvider_DeleteMeta_Call) Run ¶ added in v1.14.7
func (_c *MockProvider_DeleteMeta_Call) Run(run func(_a0 ...string)) *MockProvider_DeleteMeta_Call
func (*MockProvider_DeleteMeta_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_DeleteMeta_Call) RunAndReturn(run func(...string)) *MockProvider_DeleteMeta_Call
type MockProvider_Expecter ¶
type MockProvider_Expecter struct {
// contains filtered or unexported fields
}
func (*MockProvider_Expecter) AddMeta ¶ added in v1.14.7
func (_e *MockProvider_Expecter) AddMeta(_a0 ...interface{}) *MockProvider_AddMeta_Call
AddMeta is a helper method to define mock.On call
- _a0 ...provider.Meta
func (*MockProvider_Expecter) DeleteMeta ¶ added in v1.14.7
func (_e *MockProvider_Expecter) DeleteMeta(_a0 ...interface{}) *MockProvider_DeleteMeta_Call
DeleteMeta is a helper method to define mock.On call
- _a0 ...string
func (*MockProvider_Expecter) GetMeta ¶
func (_e *MockProvider_Expecter) GetMeta() *MockProvider_GetMeta_Call
GetMeta is a helper method to define mock.On call
func (*MockProvider_Expecter) LastError ¶
func (_e *MockProvider_Expecter) LastError() *MockProvider_LastError_Call
LastError is a helper method to define mock.On call
func (*MockProvider_Expecter) Listen ¶
func (_e *MockProvider_Expecter) Listen(capability interface{}) *MockProvider_Listen_Call
Listen is a helper method to define mock.On call
- capability string
func (*MockProvider_Expecter) SessionStatus ¶
func (_e *MockProvider_Expecter) SessionStatus() *MockProvider_SessionStatus_Call
SessionStatus is a helper method to define mock.On call
func (*MockProvider_Expecter) Start ¶
func (_e *MockProvider_Expecter) Start() *MockProvider_Start_Call
Start is a helper method to define mock.On call
func (*MockProvider_Expecter) Stop ¶
func (_e *MockProvider_Expecter) Stop() *MockProvider_Stop_Call
Stop is a helper method to define mock.On call
func (*MockProvider_Expecter) UpdateMeta ¶
func (_e *MockProvider_Expecter) UpdateMeta(_a0 interface{}) *MockProvider_UpdateMeta_Call
UpdateMeta is a helper method to define mock.On call
- _a0 map[string]string
type MockProvider_GetMeta_Call ¶
MockProvider_GetMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'GetMeta'
func (*MockProvider_GetMeta_Call) Return ¶
func (_c *MockProvider_GetMeta_Call) Return(_a0 map[string]string) *MockProvider_GetMeta_Call
func (*MockProvider_GetMeta_Call) Run ¶
func (_c *MockProvider_GetMeta_Call) Run(run func()) *MockProvider_GetMeta_Call
func (*MockProvider_GetMeta_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_GetMeta_Call) RunAndReturn(run func() map[string]string) *MockProvider_GetMeta_Call
type MockProvider_LastError_Call ¶
MockProvider_LastError_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'LastError'
func (*MockProvider_LastError_Call) Return ¶
func (_c *MockProvider_LastError_Call) Return(_a0 time.Time, _a1 error) *MockProvider_LastError_Call
func (*MockProvider_LastError_Call) Run ¶
func (_c *MockProvider_LastError_Call) Run(run func()) *MockProvider_LastError_Call
func (*MockProvider_LastError_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_LastError_Call) RunAndReturn(run func() (time.Time, error)) *MockProvider_LastError_Call
type MockProvider_Listen_Call ¶
MockProvider_Listen_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Listen'
func (*MockProvider_Listen_Call) Return ¶
func (_c *MockProvider_Listen_Call) Return(_a0 net.Listener, _a1 error) *MockProvider_Listen_Call
func (*MockProvider_Listen_Call) Run ¶
func (_c *MockProvider_Listen_Call) Run(run func(capability string)) *MockProvider_Listen_Call
func (*MockProvider_Listen_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_Listen_Call) RunAndReturn(run func(string) (net.Listener, error)) *MockProvider_Listen_Call
type MockProvider_SessionStatus_Call ¶
MockProvider_SessionStatus_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'SessionStatus'
func (*MockProvider_SessionStatus_Call) Return ¶
func (_c *MockProvider_SessionStatus_Call) Return(_a0 string) *MockProvider_SessionStatus_Call
func (*MockProvider_SessionStatus_Call) Run ¶
func (_c *MockProvider_SessionStatus_Call) Run(run func()) *MockProvider_SessionStatus_Call
func (*MockProvider_SessionStatus_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_SessionStatus_Call) RunAndReturn(run func() string) *MockProvider_SessionStatus_Call
type MockProvider_Start_Call ¶
MockProvider_Start_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Start'
func (*MockProvider_Start_Call) Return ¶
func (_c *MockProvider_Start_Call) Return(_a0 error) *MockProvider_Start_Call
func (*MockProvider_Start_Call) Run ¶
func (_c *MockProvider_Start_Call) Run(run func()) *MockProvider_Start_Call
func (*MockProvider_Start_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_Start_Call) RunAndReturn(run func() error) *MockProvider_Start_Call
type MockProvider_Stop_Call ¶
MockProvider_Stop_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'Stop'
func (*MockProvider_Stop_Call) Return ¶
func (_c *MockProvider_Stop_Call) Return(_a0 error) *MockProvider_Stop_Call
func (*MockProvider_Stop_Call) Run ¶
func (_c *MockProvider_Stop_Call) Run(run func()) *MockProvider_Stop_Call
func (*MockProvider_Stop_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_Stop_Call) RunAndReturn(run func() error) *MockProvider_Stop_Call
type MockProvider_UpdateMeta_Call ¶
MockProvider_UpdateMeta_Call is a *mock.Call that shadows Run/Return methods with type explicit version for method 'UpdateMeta'
func (*MockProvider_UpdateMeta_Call) Return ¶
func (_c *MockProvider_UpdateMeta_Call) Return() *MockProvider_UpdateMeta_Call
func (*MockProvider_UpdateMeta_Call) Run ¶
func (_c *MockProvider_UpdateMeta_Call) Run(run func(_a0 map[string]string)) *MockProvider_UpdateMeta_Call
func (*MockProvider_UpdateMeta_Call) RunAndReturn ¶ added in v1.14.7
func (_c *MockProvider_UpdateMeta_Call) RunAndReturn(run func(map[string]string)) *MockProvider_UpdateMeta_Call
type Provider ¶
type Provider interface { libscada.SCADAProvider }
Provider is the interface used in the rest of Consul core when using SCADA, it is aliased here to the same interface provided by the hcp-scada-provider library. If the interfaces needs to be extended in the future it can be done so with minimal impact on the rest of the codebase.