Documentation ¶
Overview ¶
Package testing is a generated GoMock package.
Index ¶
- Constants
- Variables
- func GetFreePorts(num uint) ([]int, error)
- func WaitForListeningAddress(t *testing.T, timeout time.Duration, addresses ...string)
- type Event
- type FailingAppChannel
- func (f *FailingAppChannel) GetAppConfig() (*config.ApplicationConfig, error)
- func (f *FailingAppChannel) HealthProbe(ctx context.Context) (bool, error)
- func (f *FailingAppChannel) InvokeMethod(ctx context.Context, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
- func (f *FailingAppChannel) SetAppHealth(ah *apphealth.AppHealth)
- type FailingBinding
- func (m *FailingBinding) Close() error
- func (m *FailingBinding) GetComponentMetadata() map[string]string
- func (m *FailingBinding) Init(ctx context.Context, metadata bindings.Metadata) error
- func (m *FailingBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
- func (m *FailingBinding) Operations() []bindings.OperationKind
- type FailingConfigurationStore
- func (f *FailingConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
- func (f *FailingConfigurationStore) GetComponentMetadata() map[string]string
- func (f *FailingConfigurationStore) Init(ctx context.Context, metadata configuration.Metadata) error
- func (f *FailingConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, ...) (string, error)
- func (f *FailingConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
- type FailingDirectMessaging
- func (_m *FailingDirectMessaging) Invoke(ctx context.Context, targetAppID string, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
- func (_m *FailingDirectMessaging) SetAppChannel(appChannel channel.AppChannel)
- func (_m *FailingDirectMessaging) SetHTTPEndpointsAppChannel(appChannel channel.HTTPEndpointAppChannel)
- type FailingPubsub
- func (f *FailingPubsub) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
- func (f *FailingPubsub) BulkSubscribe(ctx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
- func (f *FailingPubsub) Close() error
- func (f *FailingPubsub) Features() []pubsub.Feature
- func (f *FailingPubsub) GetComponentMetadata() map[string]string
- func (f *FailingPubsub) Init(ctx context.Context, metadata pubsub.Metadata) error
- func (f *FailingPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
- func (f *FailingPubsub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
- type FailingSecretStore
- func (c FailingSecretStore) BulkGetSecret(ctx context.Context, req secretstores.BulkGetSecretRequest) (secretstores.BulkGetSecretResponse, error)
- func (c FailingSecretStore) Close() error
- func (c FailingSecretStore) Features() []secretstores.Feature
- func (c FailingSecretStore) GetComponentMetadata() map[string]string
- func (c FailingSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecretRequest) (secretstores.GetSecretResponse, error)
- func (c FailingSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error
- type FailingStatestore
- func (f *FailingStatestore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
- func (f *FailingStatestore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (f *FailingStatestore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
- func (f *FailingStatestore) Close() error
- func (f *FailingStatestore) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (f *FailingStatestore) Features() []state.Feature
- func (f *FailingStatestore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (f *FailingStatestore) GetComponentMetadata() map[string]string
- func (f *FailingStatestore) Init(ctx context.Context, metadata state.Metadata) error
- func (f *FailingStatestore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (f *FailingStatestore) Ping() error
- func (f *FailingStatestore) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
- func (f *FailingStatestore) Set(ctx context.Context, req *state.SetRequest) error
- type FailingSubtleCrypto
- func (c FailingSubtleCrypto) Decrypt(ctx context.Context, ciphertext []byte, algorithm string, keyName string, ...) (plaintext []byte, err error)
- func (c FailingSubtleCrypto) Encrypt(ctx context.Context, plaintext []byte, algorithm string, keyName string, ...) (ciphertext []byte, tag []byte, err error)
- func (c FailingSubtleCrypto) GetKey(ctx context.Context, keyName string) (pubKey jwk.Key, err error)
- func (c FailingSubtleCrypto) Sign(ctx context.Context, digest []byte, algorithm string, keyName string) (signature []byte, err error)
- func (c FailingSubtleCrypto) UnwrapKey(ctx context.Context, wrappedKey []byte, algorithm string, keyName string, ...) (plaintextKey jwk.Key, err error)
- func (c FailingSubtleCrypto) Verify(ctx context.Context, digest []byte, signature []byte, algorithm string, ...) (valid bool, err error)
- func (c FailingSubtleCrypto) WrapKey(ctx context.Context, plaintextKey jwk.Key, algorithm string, keyName string, ...) (wrappedKey []byte, tag []byte, err error)
- type Failure
- type FakeSecretStore
- func (c FakeSecretStore) BulkGetSecret(ctx context.Context, req secretstores.BulkGetSecretRequest) (secretstores.BulkGetSecretResponse, error)
- func (c FakeSecretStore) Close() error
- func (c FakeSecretStore) Features() []secretstores.Feature
- func (c FakeSecretStore) GetComponentMetadata() map[string]string
- func (c FakeSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecretRequest) (secretstores.GetSecretResponse, error)
- func (c FakeSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error
- type FakeStateStore
- func (f *FakeStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
- func (f *FakeStateStore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (f *FakeStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
- func (f *FakeStateStore) CallCount(op string) uint64
- func (f *FakeStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (f *FakeStateStore) Features() []state.Feature
- func (f *FakeStateStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (f *FakeStateStore) GetComponentMetadata() map[string]string
- func (f *FakeStateStore) Init(ctx context.Context, metadata state.Metadata) error
- func (f *FakeStateStore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
- func (f *FakeStateStore) NewItem(data []byte) *FakeStateStoreItem
- func (f *FakeStateStore) Ping() error
- func (f *FakeStateStore) Set(ctx context.Context, req *state.SetRequest) error
- type FakeStateStoreItem
- type FakeSubtleCrypto
- func (c FakeSubtleCrypto) Close() error
- func (c FakeSubtleCrypto) Decrypt(ctx context.Context, ciphertext []byte, algorithm string, keyName string, ...) (plaintext []byte, err error)
- func (c FakeSubtleCrypto) Encrypt(ctx context.Context, plaintext []byte, algorithm string, keyName string, ...) (ciphertext []byte, tag []byte, err error)
- func (c FakeSubtleCrypto) Features() []contribCrypto.Feature
- func (c FakeSubtleCrypto) GetComponentMetadata() map[string]string
- func (c FakeSubtleCrypto) GetKey(ctx context.Context, keyName string) (pubKey jwk.Key, err error)
- func (c FakeSubtleCrypto) Init(ctx context.Context, metadata contribCrypto.Metadata) error
- func (c FakeSubtleCrypto) Sign(ctx context.Context, digest []byte, algorithm string, keyName string) (signature []byte, err error)
- func (c FakeSubtleCrypto) SupportedEncryptionAlgorithms() []string
- func (c FakeSubtleCrypto) SupportedSignatureAlgorithms() []string
- func (c FakeSubtleCrypto) UnwrapKey(ctx context.Context, wrappedKey []byte, algorithm string, keyName string, ...) (plaintextKey jwk.Key, err error)
- func (c FakeSubtleCrypto) Verify(ctx context.Context, digest []byte, signature []byte, algorithm string, ...) (valid bool, err error)
- func (c FakeSubtleCrypto) WrapKey(ctx context.Context, plaintextKey jwk.Key, algorithm string, keyName string, ...) (wrappedKey []byte, tag []byte, err error)
- type InMemoryPubsub
- func (m *InMemoryPubsub) BulkPublish(req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
- func (m *InMemoryPubsub) BulkSubscribe(parentCtx context.Context, req pubsub.SubscribeRequest, ...) (pubsub.BulkSubscribeResponse, error)
- func (m *InMemoryPubsub) Close() error
- func (m *InMemoryPubsub) Features() []pubsub.Feature
- func (m *InMemoryPubsub) GetComponentMetadata() map[string]string
- func (m *InMemoryPubsub) Init(ctx context.Context, metadata pubsub.Metadata) error
- func (m *InMemoryPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
- func (m *InMemoryPubsub) SetBulkHandler(h func(topic string, msg *pubsub.BulkMessage))
- func (m *InMemoryPubsub) SetHandler(h func(topic string, msg *pubsub.NewMessage))
- func (m *InMemoryPubsub) SetOnSubscribedTopicsChanged(f func([]string))
- func (m *InMemoryPubsub) Subscribe(parentCtx context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
- type KeyValState
- type MockApp
- type MockBinding
- func (m *MockBinding) Close() error
- func (m *MockBinding) GetComponentMetadata() map[string]string
- func (m *MockBinding) Init(ctx context.Context, metadata bindings.Metadata) error
- func (m *MockBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
- func (m *MockBinding) Operations() []bindings.OperationKind
- func (m *MockBinding) Read(ctx context.Context, handler bindings.Handler) error
- func (m *MockBinding) SetOnReadCloseCh(ch chan struct{})
- type MockConfigurationStore
- func (_m *MockConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
- func (_m *MockConfigurationStore) GetComponentMetadata() map[string]string
- func (_m *MockConfigurationStore) Init(ctx context.Context, metadata configuration.Metadata) error
- func (_m *MockConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, ...) (string, error)
- func (_m *MockConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
- type MockDirectMessaging
- func (_m *MockDirectMessaging) Close() error
- func (_m *MockDirectMessaging) Invoke(ctx context.Context, targetAppID string, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
- func (_m *MockDirectMessaging) SetAppChannel(appChannel channel.AppChannel)
- func (_m *MockDirectMessaging) SetHTTPEndpointsAppChannel(appChannel channel.HTTPEndpointAppChannel)
- type MockFieldIndexer
- type MockManager
- func (m *MockManager) Add(runnable manager.Runnable) error
- func (m *MockManager) AddHealthzCheck(name string, check healthz.Checker) error
- func (m *MockManager) AddMetricsExtraHandler(path string, handler http.Handler) error
- func (m *MockManager) AddReadyzCheck(name string, check healthz.Checker) error
- func (m *MockManager) Elected() <-chan struct{}
- func (m *MockManager) GetAPIReader() client.Reader
- func (m *MockManager) GetCache() cache.Cache
- func (m *MockManager) GetClient() client.Client
- func (m *MockManager) GetConfig() *rest.Config
- func (m *MockManager) GetControllerOptions() v1alpha1.ControllerConfigurationSpec
- func (m *MockManager) GetEventRecorderFor(name string) record.EventRecorder
- func (m *MockManager) GetFieldIndexer() client.FieldIndexer
- func (m *MockManager) GetIndexerFunc(obj client.Object) client.IndexerFunc
- func (m *MockManager) GetLogger() logr.Logger
- func (m *MockManager) GetRESTMapper() meta.RESTMapper
- func (m *MockManager) GetRunnables() []manager.Runnable
- func (m *MockManager) GetScheme() *runtime.Scheme
- func (m *MockManager) GetWebhookServer() *webhook.Server
- func (m *MockManager) SetFields(interface{}) error
- func (m *MockManager) Start(ctx context.Context) error
- type MockPubSub
- func (m *MockPubSub) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
- func (m *MockPubSub) BulkSubscribe(rctx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
- func (m *MockPubSub) Close() error
- func (m *MockPubSub) Features() []pubsub.Feature
- func (m *MockPubSub) GetComponentMetadata() map[string]string
- func (m *MockPubSub) Init(ctx context.Context, metadata pubsub.Metadata) error
- func (m *MockPubSub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
- func (m *MockPubSub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
- type MockPubSubAdapter
- type MockQuerier
- type MockResolver
- type MockStateStore
- func (_m *MockStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
- func (_m *MockStateStore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
- func (_m *MockStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
- func (_m *MockStateStore) Close() error
- func (_m *MockStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error
- func (_m *MockStateStore) Features() []state.Feature
- func (_m *MockStateStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
- func (_m *MockStateStore) GetComponentMetadata() map[string]string
- func (_m *MockStateStore) Init(ctx context.Context, metadata state.Metadata) error
- func (_m *MockStateStore) Ping() error
- func (_m *MockStateStore) Set(ctx context.Context, req *state.SetRequest) error
- type MockStore
- func (m *MockStore) EXPECT() *MockStoreMockRecorder
- func (m *MockStore) GetComponentMetadata() map[string]string
- func (m *MockStore) InitLockStore(ctx context.Context, metadata lock.Metadata) error
- func (m *MockStore) TryLock(ctx context.Context, req *lock.TryLockRequest) (*lock.TryLockResponse, error)
- func (m *MockStore) Unlock(ctx context.Context, req *lock.UnlockRequest) (*lock.UnlockResponse, error)
- type MockStoreMockRecorder
- type MockWorkflow
- func (w *MockWorkflow) Get(ctx context.Context, req *workflowContrib.GetRequest) (*workflowContrib.StateResponse, error)
- func (w *MockWorkflow) GetComponentMetadata() map[string]string
- func (w *MockWorkflow) Init(metadata workflowContrib.Metadata) error
- func (w *MockWorkflow) Pause(ctx context.Context, req *workflowContrib.PauseRequest) error
- func (w *MockWorkflow) Purge(ctx context.Context, req *workflowContrib.PurgeRequest) error
- func (w *MockWorkflow) RaiseEvent(ctx context.Context, req *workflowContrib.RaiseEventRequest) error
- func (w *MockWorkflow) Resume(ctx context.Context, req *workflowContrib.ResumeRequest) error
- func (w *MockWorkflow) Start(ctx context.Context, req *workflowContrib.StartRequest) (*workflowContrib.StartResponse, error)
- func (w *MockWorkflow) Terminate(ctx context.Context, req *workflowContrib.TerminateRequest) error
- type TransactionalStoreMock
Constants ¶
const ErrorInstanceID = "errorInstanceID"
Variables ¶
var ErrFakeWorkflowComponentError = errors.New("fake workflow error")
Functions ¶
func GetFreePorts ¶ added in v1.5.0
GetFreePorts asks the kernel for `num` free open ports that are ready to use. This code is retrofitted from freeport.GetFreePort().
Types ¶
type Event ¶
type Event struct { EventName string `json:"eventName,omitempty"` To []string `json:"to,omitempty"` Concurrency string `json:"concurrency,omitempty"` CreatedAt time.Time `json:"createdAt,omitempty"` State []KeyValState `json:"state,omitempty"` Data interface{} `json:"data,omitempty"` }
Event is an app response event.
type FailingAppChannel ¶ added in v1.7.0
type FailingAppChannel struct { Failure Failure KeyFunc func(req *invokev1.InvokeMethodRequest) string }
func (*FailingAppChannel) GetAppConfig ¶ added in v1.7.0
func (f *FailingAppChannel) GetAppConfig() (*config.ApplicationConfig, error)
func (*FailingAppChannel) HealthProbe ¶ added in v1.9.0
func (f *FailingAppChannel) HealthProbe(ctx context.Context) (bool, error)
func (*FailingAppChannel) InvokeMethod ¶ added in v1.7.0
func (f *FailingAppChannel) InvokeMethod(ctx context.Context, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
func (*FailingAppChannel) SetAppHealth ¶ added in v1.9.0
func (f *FailingAppChannel) SetAppHealth(ah *apphealth.AppHealth)
type FailingBinding ¶ added in v1.7.0
type FailingBinding struct {
Failure Failure
}
func (*FailingBinding) Close ¶ added in v1.7.0
func (m *FailingBinding) Close() error
func (*FailingBinding) GetComponentMetadata ¶ added in v1.10.0
func (m *FailingBinding) GetComponentMetadata() map[string]string
func (*FailingBinding) Invoke ¶ added in v1.7.0
func (m *FailingBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
Invoke is a mock invoke method.
func (*FailingBinding) Operations ¶ added in v1.7.0
func (m *FailingBinding) Operations() []bindings.OperationKind
Operations is a mock operations method.
type FailingConfigurationStore ¶ added in v1.7.0
type FailingConfigurationStore struct {
Failure Failure
}
func (*FailingConfigurationStore) Get ¶ added in v1.7.0
func (f *FailingConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
func (*FailingConfigurationStore) GetComponentMetadata ¶ added in v1.11.0
func (f *FailingConfigurationStore) GetComponentMetadata() map[string]string
func (*FailingConfigurationStore) Init ¶ added in v1.7.0
func (f *FailingConfigurationStore) Init(ctx context.Context, metadata configuration.Metadata) error
func (*FailingConfigurationStore) Subscribe ¶ added in v1.7.0
func (f *FailingConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, handler configuration.UpdateHandler) (string, error)
func (*FailingConfigurationStore) Unsubscribe ¶ added in v1.7.0
func (f *FailingConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
type FailingDirectMessaging ¶ added in v1.7.0
func (*FailingDirectMessaging) Invoke ¶ added in v1.7.0
func (_m *FailingDirectMessaging) Invoke(ctx context.Context, targetAppID string, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
func (*FailingDirectMessaging) SetAppChannel ¶ added in v1.10.0
func (_m *FailingDirectMessaging) SetAppChannel(appChannel channel.AppChannel)
func (*FailingDirectMessaging) SetHTTPEndpointsAppChannel ¶ added in v1.11.0
func (_m *FailingDirectMessaging) SetHTTPEndpointsAppChannel(appChannel channel.HTTPEndpointAppChannel)
SetHTTPEndpointsAppChannel provides a mock function with given fields: appChannel
type FailingPubsub ¶ added in v1.7.0
type FailingPubsub struct {
Failure Failure
}
FailingPubsub is a mock pubsub component object that simulates failures.
func (*FailingPubsub) BulkPublish ¶ added in v1.10.0
func (f *FailingPubsub) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
func (*FailingPubsub) BulkSubscribe ¶ added in v1.10.0
func (f *FailingPubsub) BulkSubscribe(ctx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
func (*FailingPubsub) Close ¶ added in v1.7.0
func (f *FailingPubsub) Close() error
func (*FailingPubsub) Features ¶ added in v1.7.0
func (f *FailingPubsub) Features() []pubsub.Feature
func (*FailingPubsub) GetComponentMetadata ¶ added in v1.10.0
func (f *FailingPubsub) GetComponentMetadata() map[string]string
func (*FailingPubsub) Publish ¶ added in v1.7.0
func (f *FailingPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
func (*FailingPubsub) Subscribe ¶ added in v1.7.0
func (f *FailingPubsub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
type FailingSecretStore ¶ added in v1.7.0
type FailingSecretStore struct {
Failure Failure
}
func (FailingSecretStore) BulkGetSecret ¶ added in v1.7.0
func (c FailingSecretStore) BulkGetSecret(ctx context.Context, req secretstores.BulkGetSecretRequest) (secretstores.BulkGetSecretResponse, error)
func (FailingSecretStore) Close ¶ added in v1.7.0
func (c FailingSecretStore) Close() error
func (FailingSecretStore) Features ¶ added in v1.9.0
func (c FailingSecretStore) Features() []secretstores.Feature
func (FailingSecretStore) GetComponentMetadata ¶ added in v1.10.0
func (c FailingSecretStore) GetComponentMetadata() map[string]string
func (FailingSecretStore) GetSecret ¶ added in v1.7.0
func (c FailingSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecretRequest) (secretstores.GetSecretResponse, error)
func (FailingSecretStore) Init ¶ added in v1.7.0
func (c FailingSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error
type FailingStatestore ¶ added in v1.7.0
func (*FailingStatestore) BulkDelete ¶ added in v1.7.0
func (f *FailingStatestore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
func (*FailingStatestore) BulkGet ¶ added in v1.7.0
func (f *FailingStatestore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
func (*FailingStatestore) BulkSet ¶ added in v1.7.0
func (f *FailingStatestore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
func (*FailingStatestore) Close ¶ added in v1.7.0
func (f *FailingStatestore) Close() error
func (*FailingStatestore) Delete ¶ added in v1.7.0
func (f *FailingStatestore) Delete(ctx context.Context, req *state.DeleteRequest) error
func (*FailingStatestore) Features ¶ added in v1.7.0
func (f *FailingStatestore) Features() []state.Feature
func (*FailingStatestore) Get ¶ added in v1.7.0
func (f *FailingStatestore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
func (*FailingStatestore) GetComponentMetadata ¶ added in v1.10.0
func (f *FailingStatestore) GetComponentMetadata() map[string]string
func (*FailingStatestore) Multi ¶ added in v1.7.0
func (f *FailingStatestore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
func (*FailingStatestore) Ping ¶ added in v1.7.0
func (f *FailingStatestore) Ping() error
func (*FailingStatestore) Query ¶ added in v1.7.0
func (f *FailingStatestore) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
func (*FailingStatestore) Set ¶ added in v1.7.0
func (f *FailingStatestore) Set(ctx context.Context, req *state.SetRequest) error
type FailingSubtleCrypto ¶ added in v1.11.0
type FailingSubtleCrypto struct { FakeSubtleCrypto Failure Failure }
type Failure ¶ added in v1.7.0
type Failure struct {
// contains filtered or unexported fields
}
func NewFailure ¶ added in v1.9.0
func (*Failure) PerformFailure ¶ added in v1.7.0
type FakeSecretStore ¶ added in v0.11.0
type FakeSecretStore struct{}
func (FakeSecretStore) BulkGetSecret ¶ added in v1.0.0
func (c FakeSecretStore) BulkGetSecret(ctx context.Context, req secretstores.BulkGetSecretRequest) (secretstores.BulkGetSecretResponse, error)
func (FakeSecretStore) Close ¶ added in v1.2.0
func (c FakeSecretStore) Close() error
func (FakeSecretStore) Features ¶ added in v1.9.0
func (c FakeSecretStore) Features() []secretstores.Feature
func (FakeSecretStore) GetComponentMetadata ¶ added in v1.10.0
func (c FakeSecretStore) GetComponentMetadata() map[string]string
func (FakeSecretStore) GetSecret ¶ added in v0.11.0
func (c FakeSecretStore) GetSecret(ctx context.Context, req secretstores.GetSecretRequest) (secretstores.GetSecretResponse, error)
func (FakeSecretStore) Init ¶ added in v0.11.0
func (c FakeSecretStore) Init(ctx context.Context, metadata secretstores.Metadata) error
type FakeStateStore ¶ added in v1.11.0
type FakeStateStore struct { NoLock bool Items map[string]*FakeStateStoreItem // contains filtered or unexported fields }
func NewFakeStateStore ¶ added in v1.11.0
func NewFakeStateStore() *FakeStateStore
func (*FakeStateStore) BulkDelete ¶ added in v1.11.0
func (f *FakeStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
func (*FakeStateStore) BulkGet ¶ added in v1.11.0
func (f *FakeStateStore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
func (*FakeStateStore) BulkSet ¶ added in v1.11.0
func (f *FakeStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
func (*FakeStateStore) CallCount ¶ added in v1.11.0
func (f *FakeStateStore) CallCount(op string) uint64
func (*FakeStateStore) Delete ¶ added in v1.11.0
func (f *FakeStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error
func (*FakeStateStore) Features ¶ added in v1.11.0
func (f *FakeStateStore) Features() []state.Feature
func (*FakeStateStore) Get ¶ added in v1.11.0
func (f *FakeStateStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
func (*FakeStateStore) GetComponentMetadata ¶ added in v1.11.0
func (f *FakeStateStore) GetComponentMetadata() map[string]string
func (*FakeStateStore) Multi ¶ added in v1.11.0
func (f *FakeStateStore) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
func (*FakeStateStore) NewItem ¶ added in v1.11.0
func (f *FakeStateStore) NewItem(data []byte) *FakeStateStoreItem
func (*FakeStateStore) Ping ¶ added in v1.11.0
func (f *FakeStateStore) Ping() error
func (*FakeStateStore) Set ¶ added in v1.11.0
func (f *FakeStateStore) Set(ctx context.Context, req *state.SetRequest) error
type FakeStateStoreItem ¶ added in v1.11.0
type FakeStateStoreItem struct {
// contains filtered or unexported fields
}
type FakeSubtleCrypto ¶ added in v1.11.0
type FakeSubtleCrypto struct{}
func (FakeSubtleCrypto) Close ¶ added in v1.11.0
func (c FakeSubtleCrypto) Close() error
func (FakeSubtleCrypto) Features ¶ added in v1.11.0
func (c FakeSubtleCrypto) Features() []contribCrypto.Feature
func (FakeSubtleCrypto) GetComponentMetadata ¶ added in v1.11.0
func (c FakeSubtleCrypto) GetComponentMetadata() map[string]string
func (FakeSubtleCrypto) Init ¶ added in v1.11.0
func (c FakeSubtleCrypto) Init(ctx context.Context, metadata contribCrypto.Metadata) error
func (FakeSubtleCrypto) SupportedEncryptionAlgorithms ¶ added in v1.11.0
func (c FakeSubtleCrypto) SupportedEncryptionAlgorithms() []string
func (FakeSubtleCrypto) SupportedSignatureAlgorithms ¶ added in v1.11.0
func (c FakeSubtleCrypto) SupportedSignatureAlgorithms() []string
type InMemoryPubsub ¶ added in v1.9.0
InMemoryPubsub is a mock pub-sub component object that works with in-memory handlers
func (*InMemoryPubsub) BulkPublish ¶ added in v1.10.0
func (m *InMemoryPubsub) BulkPublish(req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
func (*InMemoryPubsub) BulkSubscribe ¶ added in v1.10.0
func (m *InMemoryPubsub) BulkSubscribe(parentCtx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
func (*InMemoryPubsub) Close ¶ added in v1.9.0
func (m *InMemoryPubsub) Close() error
Close is a mock close method.
func (*InMemoryPubsub) Features ¶ added in v1.9.0
func (m *InMemoryPubsub) Features() []pubsub.Feature
func (*InMemoryPubsub) GetComponentMetadata ¶ added in v1.11.0
func (m *InMemoryPubsub) GetComponentMetadata() map[string]string
func (*InMemoryPubsub) Publish ¶ added in v1.9.0
func (m *InMemoryPubsub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
Publish is a mock publish method.
func (*InMemoryPubsub) SetBulkHandler ¶ added in v1.10.0
func (m *InMemoryPubsub) SetBulkHandler(h func(topic string, msg *pubsub.BulkMessage))
func (*InMemoryPubsub) SetHandler ¶ added in v1.9.0
func (m *InMemoryPubsub) SetHandler(h func(topic string, msg *pubsub.NewMessage))
func (*InMemoryPubsub) SetOnSubscribedTopicsChanged ¶ added in v1.9.0
func (m *InMemoryPubsub) SetOnSubscribedTopicsChanged(f func([]string))
func (*InMemoryPubsub) Subscribe ¶ added in v1.9.0
func (m *InMemoryPubsub) Subscribe(parentCtx context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
Subscribe is a mock subscribe method.
type KeyValState ¶
type KeyValState struct { Key string `json:"key"` Value interface{} `json:"value"` }
KeyValState is a key value struct for state.
type MockApp ¶
type MockApp struct {
// contains filtered or unexported fields
}
MockApp is a mock for an app.
func NewMockApp ¶
NewMockApp returns a new mocked app.
type MockBinding ¶ added in v1.0.0
MockBinding is a mock input/output component object.
func (*MockBinding) Close ¶ added in v1.2.0
func (m *MockBinding) Close() error
func (*MockBinding) GetComponentMetadata ¶ added in v1.10.0
func (m *MockBinding) GetComponentMetadata() map[string]string
func (*MockBinding) Invoke ¶ added in v1.0.0
func (m *MockBinding) Invoke(ctx context.Context, req *bindings.InvokeRequest) (*bindings.InvokeResponse, error)
Invoke is a mock invoke method.
func (*MockBinding) Operations ¶ added in v1.0.0
func (m *MockBinding) Operations() []bindings.OperationKind
Operations is a mock operations method.
func (*MockBinding) SetOnReadCloseCh ¶ added in v1.9.0
func (m *MockBinding) SetOnReadCloseCh(ch chan struct{})
type MockConfigurationStore ¶ added in v1.7.0
MockConfigurationStore is an autogenerated mock type for the Store type
func (*MockConfigurationStore) Get ¶ added in v1.7.0
func (_m *MockConfigurationStore) Get(ctx context.Context, req *configuration.GetRequest) (*configuration.GetResponse, error)
Get provides a mock function with given fields: ctx, req
func (*MockConfigurationStore) GetComponentMetadata ¶ added in v1.11.0
func (_m *MockConfigurationStore) GetComponentMetadata() map[string]string
func (*MockConfigurationStore) Init ¶ added in v1.7.0
func (_m *MockConfigurationStore) Init(ctx context.Context, metadata configuration.Metadata) error
Init provides a mock function with given fields: metadata
func (*MockConfigurationStore) Subscribe ¶ added in v1.7.0
func (_m *MockConfigurationStore) Subscribe(ctx context.Context, req *configuration.SubscribeRequest, handler configuration.UpdateHandler) (string, error)
Subscribe provides a mock function with given fields: ctx, req, handler
func (*MockConfigurationStore) Unsubscribe ¶ added in v1.7.0
func (_m *MockConfigurationStore) Unsubscribe(ctx context.Context, req *configuration.UnsubscribeRequest) error
Unsubscribe provides a mock function with given fields: ctx, req
type MockDirectMessaging ¶
MockDirectMessaging is a semi-autogenerated mock type for the MockDirectMessaging type. Note: This file is created by copy/pasting values and renaming to use MockDirectMessaging instead of DirectMessaging. You run "mockery --name directMessaging" in "pkg/messaging" and modify the corresponding values here.
func (*MockDirectMessaging) Close ¶ added in v1.2.0
func (_m *MockDirectMessaging) Close() error
func (*MockDirectMessaging) Invoke ¶
func (_m *MockDirectMessaging) Invoke(ctx context.Context, targetAppID string, req *invokev1.InvokeMethodRequest) (*invokev1.InvokeMethodResponse, error)
Invoke provides a mock function with given fields: ctx, targetAppID, req
func (*MockDirectMessaging) SetAppChannel ¶ added in v1.10.0
func (_m *MockDirectMessaging) SetAppChannel(appChannel channel.AppChannel)
func (*MockDirectMessaging) SetHTTPEndpointsAppChannel ¶ added in v1.11.0
func (_m *MockDirectMessaging) SetHTTPEndpointsAppChannel(appChannel channel.HTTPEndpointAppChannel)
SetHTTPEndpointsAppChannel provides a mock function with given fields: appChannel
type MockFieldIndexer ¶ added in v1.6.0
type MockFieldIndexer struct {
// contains filtered or unexported fields
}
func (*MockFieldIndexer) IndexField ¶ added in v1.6.0
func (t *MockFieldIndexer) IndexField(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error
type MockManager ¶ added in v1.6.0
type MockManager struct {
// contains filtered or unexported fields
}
func NewMockManager ¶ added in v1.6.0
func NewMockManager() *MockManager
func (*MockManager) Add ¶ added in v1.6.0
func (m *MockManager) Add(runnable manager.Runnable) error
func (*MockManager) AddHealthzCheck ¶ added in v1.6.0
func (m *MockManager) AddHealthzCheck(name string, check healthz.Checker) error
func (*MockManager) AddMetricsExtraHandler ¶ added in v1.6.0
func (m *MockManager) AddMetricsExtraHandler(path string, handler http.Handler) error
func (*MockManager) AddReadyzCheck ¶ added in v1.6.0
func (m *MockManager) AddReadyzCheck(name string, check healthz.Checker) error
func (*MockManager) Elected ¶ added in v1.6.0
func (m *MockManager) Elected() <-chan struct{}
func (*MockManager) GetAPIReader ¶ added in v1.6.0
func (m *MockManager) GetAPIReader() client.Reader
func (*MockManager) GetCache ¶ added in v1.6.0
func (m *MockManager) GetCache() cache.Cache
func (*MockManager) GetClient ¶ added in v1.6.0
func (m *MockManager) GetClient() client.Client
func (*MockManager) GetConfig ¶ added in v1.6.0
func (m *MockManager) GetConfig() *rest.Config
func (*MockManager) GetControllerOptions ¶ added in v1.7.0
func (m *MockManager) GetControllerOptions() v1alpha1.ControllerConfigurationSpec
func (*MockManager) GetEventRecorderFor ¶ added in v1.6.0
func (m *MockManager) GetEventRecorderFor(name string) record.EventRecorder
func (*MockManager) GetFieldIndexer ¶ added in v1.6.0
func (m *MockManager) GetFieldIndexer() client.FieldIndexer
func (*MockManager) GetIndexerFunc ¶ added in v1.6.0
func (m *MockManager) GetIndexerFunc(obj client.Object) client.IndexerFunc
func (*MockManager) GetLogger ¶ added in v1.6.0
func (m *MockManager) GetLogger() logr.Logger
func (*MockManager) GetRESTMapper ¶ added in v1.6.0
func (m *MockManager) GetRESTMapper() meta.RESTMapper
func (*MockManager) GetRunnables ¶ added in v1.6.0
func (m *MockManager) GetRunnables() []manager.Runnable
func (*MockManager) GetScheme ¶ added in v1.6.0
func (m *MockManager) GetScheme() *runtime.Scheme
func (*MockManager) GetWebhookServer ¶ added in v1.6.0
func (m *MockManager) GetWebhookServer() *webhook.Server
func (*MockManager) SetFields ¶ added in v1.6.0
func (m *MockManager) SetFields(interface{}) error
type MockPubSub ¶
MockPubSub is a mock pub-sub component object.
func (*MockPubSub) BulkPublish ¶ added in v1.10.0
func (m *MockPubSub) BulkPublish(ctx context.Context, req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
BulkPublish is a mock bulk publish method.
func (*MockPubSub) BulkSubscribe ¶ added in v1.10.0
func (m *MockPubSub) BulkSubscribe(rctx context.Context, req pubsub.SubscribeRequest, handler pubsub.BulkHandler) (pubsub.BulkSubscribeResponse, error)
BulkSubscribe is a mock bulk subscribe method.
func (*MockPubSub) Close ¶ added in v1.0.0
func (m *MockPubSub) Close() error
Close is a mock close method.
func (*MockPubSub) Features ¶ added in v1.0.0
func (m *MockPubSub) Features() []pubsub.Feature
func (*MockPubSub) GetComponentMetadata ¶ added in v1.10.0
func (m *MockPubSub) GetComponentMetadata() map[string]string
func (*MockPubSub) Publish ¶
func (m *MockPubSub) Publish(ctx context.Context, req *pubsub.PublishRequest) error
Publish is a mock publish method.
func (*MockPubSub) Subscribe ¶
func (m *MockPubSub) Subscribe(_ context.Context, req pubsub.SubscribeRequest, handler pubsub.Handler) error
Subscribe is a mock subscribe method.
type MockPubSubAdapter ¶ added in v1.0.0
type MockPubSubAdapter struct { PublishFn func(req *pubsub.PublishRequest) error BulkPublishFn func(req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error) GetPubSubFn func(pubsubName string) pubsub.PubSub }
MockPubSubAdapter is mock for PubSubAdapter
func (*MockPubSubAdapter) BulkPublish ¶ added in v1.10.0
func (a *MockPubSubAdapter) BulkPublish(req *pubsub.BulkPublishRequest) (pubsub.BulkPublishResponse, error)
Publish is an adapter method for the runtime to pre-validate publish requests And then forward them to the Pub/Sub component. This method is used by the HTTP and gRPC APIs.
func (*MockPubSubAdapter) GetPubSub ¶ added in v1.0.0
func (a *MockPubSubAdapter) GetPubSub(pubsubName string) pubsub.PubSub
GetPubSub is an adapter method to fetch a pubsub
func (*MockPubSubAdapter) Publish ¶ added in v1.0.0
func (a *MockPubSubAdapter) Publish(req *pubsub.PublishRequest) error
Publish is an adapter method for the runtime to pre-validate publish requests And then forward them to the Pub/Sub component. This method is used by the HTTP and gRPC APIs.
type MockQuerier ¶ added in v1.5.0
MockQuerier is an autogenerated mock type for the Querier type
func (*MockQuerier) Query ¶ added in v1.5.0
func (_m *MockQuerier) Query(ctx context.Context, req *state.QueryRequest) (*state.QueryResponse, error)
Query provides a mock function with given fields: req
type MockResolver ¶ added in v1.2.0
MockResolver is a mock nameresolution component object.
func (*MockResolver) GetComponentMetadata ¶ added in v1.11.0
func (m *MockResolver) GetComponentMetadata() map[string]string
func (*MockResolver) Init ¶ added in v1.2.0
func (m *MockResolver) Init(metadata nr.Metadata) error
Init is a mock initialization method.
func (*MockResolver) ResolveID ¶ added in v1.2.0
func (m *MockResolver) ResolveID(req nr.ResolveRequest) (string, error)
ResolveID is a mock resolve method.
type MockStateStore ¶ added in v1.0.0
MockStateStore is an autogenerated mock type for the Store type
func (*MockStateStore) BulkDelete ¶ added in v1.0.0
func (_m *MockStateStore) BulkDelete(ctx context.Context, req []state.DeleteRequest, opts state.BulkStoreOpts) error
func (*MockStateStore) BulkGet ¶ added in v1.0.0
func (_m *MockStateStore) BulkGet(ctx context.Context, req []state.GetRequest, opts state.BulkGetOpts) ([]state.BulkGetResponse, error)
func (*MockStateStore) BulkSet ¶ added in v1.0.0
func (_m *MockStateStore) BulkSet(ctx context.Context, req []state.SetRequest, opts state.BulkStoreOpts) error
func (*MockStateStore) Close ¶ added in v1.2.0
func (_m *MockStateStore) Close() error
func (*MockStateStore) Delete ¶ added in v1.0.0
func (_m *MockStateStore) Delete(ctx context.Context, req *state.DeleteRequest) error
Delete provides a mock function with given fields: req
func (*MockStateStore) Features ¶ added in v1.1.0
func (_m *MockStateStore) Features() []state.Feature
Features returns the features for this state store.
func (*MockStateStore) Get ¶ added in v1.0.0
func (_m *MockStateStore) Get(ctx context.Context, req *state.GetRequest) (*state.GetResponse, error)
Get provides a mock function with given fields: req
func (*MockStateStore) GetComponentMetadata ¶ added in v1.10.0
func (_m *MockStateStore) GetComponentMetadata() map[string]string
func (*MockStateStore) Init ¶ added in v1.0.0
Init provides a mock function with given fields: metadata
func (*MockStateStore) Ping ¶ added in v1.3.0
func (_m *MockStateStore) Ping() error
Ping provides a mock function
func (*MockStateStore) Set ¶ added in v1.0.0
func (_m *MockStateStore) Set(ctx context.Context, req *state.SetRequest) error
Set provides a mock function with given fields: req
type MockStore ¶ added in v1.8.0
type MockStore struct {
// contains filtered or unexported fields
}
MockStore is a mock of Store interface.
func NewMockStore ¶ added in v1.8.0
func NewMockStore(ctrl *gomock.Controller) *MockStore
NewMockStore creates a new mock instance.
func (*MockStore) EXPECT ¶ added in v1.8.0
func (m *MockStore) EXPECT() *MockStoreMockRecorder
EXPECT returns an object that allows the caller to indicate expected use.
func (*MockStore) GetComponentMetadata ¶ added in v1.11.0
func (*MockStore) InitLockStore ¶ added in v1.8.0
InitLockStore mocks base method.
func (*MockStore) TryLock ¶ added in v1.8.0
func (m *MockStore) TryLock(ctx context.Context, req *lock.TryLockRequest) (*lock.TryLockResponse, error)
TryLock mocks base method.
func (*MockStore) Unlock ¶ added in v1.8.0
func (m *MockStore) Unlock(ctx context.Context, req *lock.UnlockRequest) (*lock.UnlockResponse, error)
Unlock mocks base method.
type MockStoreMockRecorder ¶ added in v1.8.0
type MockStoreMockRecorder struct {
// contains filtered or unexported fields
}
MockStoreMockRecorder is the mock recorder for MockStore.
func (*MockStoreMockRecorder) InitLockStore ¶ added in v1.8.0
func (mr *MockStoreMockRecorder) InitLockStore(ctx context.Context, metadata interface{}) *gomock.Call
InitLockStore indicates an expected call of InitLockStore.
type MockWorkflow ¶ added in v1.11.0
type MockWorkflow struct{}
func (*MockWorkflow) Get ¶ added in v1.11.0
func (w *MockWorkflow) Get(ctx context.Context, req *workflowContrib.GetRequest) (*workflowContrib.StateResponse, error)
func (*MockWorkflow) GetComponentMetadata ¶ added in v1.11.0
func (w *MockWorkflow) GetComponentMetadata() map[string]string
func (*MockWorkflow) Init ¶ added in v1.11.0
func (w *MockWorkflow) Init(metadata workflowContrib.Metadata) error
func (*MockWorkflow) Pause ¶ added in v1.11.0
func (w *MockWorkflow) Pause(ctx context.Context, req *workflowContrib.PauseRequest) error
func (*MockWorkflow) Purge ¶ added in v1.11.0
func (w *MockWorkflow) Purge(ctx context.Context, req *workflowContrib.PurgeRequest) error
func (*MockWorkflow) RaiseEvent ¶ added in v1.11.0
func (w *MockWorkflow) RaiseEvent(ctx context.Context, req *workflowContrib.RaiseEventRequest) error
func (*MockWorkflow) Resume ¶ added in v1.11.0
func (w *MockWorkflow) Resume(ctx context.Context, req *workflowContrib.ResumeRequest) error
func (*MockWorkflow) Start ¶ added in v1.11.0
func (w *MockWorkflow) Start(ctx context.Context, req *workflowContrib.StartRequest) (*workflowContrib.StartResponse, error)
func (*MockWorkflow) Terminate ¶ added in v1.11.0
func (w *MockWorkflow) Terminate(ctx context.Context, req *workflowContrib.TerminateRequest) error
type TransactionalStoreMock ¶ added in v1.0.0
type TransactionalStoreMock struct {
MockStateStore
}
func (*TransactionalStoreMock) Close ¶ added in v1.2.0
func (storeMock *TransactionalStoreMock) Close() error
func (*TransactionalStoreMock) Features ¶ added in v1.1.0
func (storeMock *TransactionalStoreMock) Features() []state.Feature
func (*TransactionalStoreMock) Multi ¶ added in v1.0.0
func (storeMock *TransactionalStoreMock) Multi(ctx context.Context, request *state.TransactionalStateRequest) error
Code generated by mockery v2.3.0. DO NOT EDIT.
Source Files ¶
- app_channel_mock.go
- app_mock.go
- bindings_mock.go
- directmessaging_mock.go
- failure_mock.go
- fake_state_store.go
- lock_mock.go
- manager_mock.go
- nameresolution_mock.go
- network.go
- pubsub_mock.go
- pubsubadapter_mock.go
- querier_mock.go
- secrets_mock.go
- state_mock.go
- store_mock.go
- subtlecrypto_mock.go
- transactionalstore_mock.go
- workflow_mock.go