testing

package
v1.0.1-0...-f351835 Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

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 FakeSecretStore

type FakeSecretStore struct {
}

func (FakeSecretStore) GetSecret

func (FakeSecretStore) Init

func (c FakeSecretStore) Init(metadata secretstores.Metadata) error

type KeyValState

type KeyValState struct {
	Key   string      `json:"key"`
	Value interface{} `json:"value"`
}

KeyValState is a key value struct for state

type MockActors

type MockActors struct {
	mock.Mock
}

MockActors is an autogenerated mock type for the MockActors type

func (*MockActors) Call

Call provides a mock function with given fields: req

func (*MockActors) CreateReminder

func (_m *MockActors) CreateReminder(ctx context.Context, req *actors.CreateReminderRequest) error

CreateReminder provides a mock function with given fields: req

func (*MockActors) CreateTimer

func (_m *MockActors) CreateTimer(ctx context.Context, req *actors.CreateTimerRequest) error

CreateTimer provides a mock function with given fields: req

func (*MockActors) DeleteReminder

func (_m *MockActors) DeleteReminder(ctx context.Context, req *actors.DeleteReminderRequest) error

DeleteReminder provides a mock function with given fields: req

func (*MockActors) DeleteState

func (_m *MockActors) DeleteState(ctx context.Context, req *actors.DeleteStateRequest) error

DeleteState provides a mock function with given fields: req

func (*MockActors) DeleteTimer

func (_m *MockActors) DeleteTimer(ctx context.Context, req *actors.DeleteTimerRequest) error

DeleteTimer provides a mock function with given fields: req

func (*MockActors) GetActiveActorsCount

func (_m *MockActors) GetActiveActorsCount(ctx context.Context) []actors.ActiveActorsCount

GetActiveActorsCount provides a mock function

func (*MockActors) GetReminder

func (_m *MockActors) GetReminder(ctx context.Context, req *actors.GetReminderRequest) (*actors.Reminder, error)

GetReminder provides a mock function with given fields: req

func (*MockActors) GetState

GetState provides a mock function with given fields: req

func (*MockActors) Init

func (_m *MockActors) Init() error

Init provides a mock function with given fields:

func (*MockActors) IsActorHosted

func (_m *MockActors) IsActorHosted(ctx context.Context, req *actors.ActorHostedRequest) bool

IsActorHosted provides a mock function with given fields: req

func (*MockActors) SaveState

func (_m *MockActors) SaveState(ctx context.Context, req *actors.SaveStateRequest) error

SaveState provides a mock function with given fields: req

func (*MockActors) Stop

func (_m *MockActors) Stop()

Stop provides a mock function with given fields:

func (*MockActors) TransactionalStateOperation

func (_m *MockActors) TransactionalStateOperation(ctx context.Context, req *actors.TransactionalRequest) error

TransactionalStateOperation provides a mock function with given fields: req

type MockApp

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

MockApp is a mock for an app

func NewMockApp

func NewMockApp(returnBody bool, messageCount int, noprint bool) *MockApp

NewMockApp returns a new mocked app

func (*MockApp) Run

func (a *MockApp) Run(port int)

Run opens a test HTTP server and echo endpoint on the mock object

type MockBinding

type MockBinding struct {
	mock.Mock
}

MockBinding is a mock input/output component object

func (*MockBinding) Init

func (m *MockBinding) Init(metadata bindings.Metadata) error

Init is a mock initialization method

func (*MockBinding) Invoke

Invoke is a mock invoke method

func (*MockBinding) Operations

func (m *MockBinding) Operations() []bindings.OperationKind

Operations is a mock operations method

func (*MockBinding) Read

func (m *MockBinding) Read(handler func(*bindings.ReadResponse) ([]byte, error)) error

Read is a mock read method

type MockDirectMessaging

type MockDirectMessaging struct {
	mock.Mock
}

MockDirectMessaging is an autogenerated mock type for the MockDirectMessaging type

func (*MockDirectMessaging) Invoke

Invoke provides a mock function with given fields: ctx, targetAppID, req

type MockPubSub

type MockPubSub struct {
	mock.Mock
}

MockPubSub is a mock pub-sub component object

func (*MockPubSub) Close

func (m *MockPubSub) Close() error

func (*MockPubSub) Features

func (m *MockPubSub) Features() []pubsub.Feature

func (*MockPubSub) Init

func (m *MockPubSub) Init(metadata pubsub.Metadata) error

Init is a mock initialization method

func (*MockPubSub) Publish

func (m *MockPubSub) Publish(req *pubsub.PublishRequest) error

Publish is a mock publish method

func (*MockPubSub) Subscribe

func (m *MockPubSub) Subscribe(req pubsub.SubscribeRequest, handler func(msg *pubsub.NewMessage) error) error

Subscribe is a mock subscribe method

type MockPubSubAdapter

type MockPubSubAdapter struct {
	PublishFn   func(req *pubsub.PublishRequest) error
	GetPubSubFn func(pubsubName string) pubsub.PubSub
}

MockPubSubAdapter is mock for PubSubAdapter

func (*MockPubSubAdapter) GetPubSub

func (a *MockPubSubAdapter) GetPubSub(pubsubName string) pubsub.PubSub

GetPubSub is an adapter method to fetch a pubsub

func (*MockPubSubAdapter) Publish

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 MockStateStore

type MockStateStore struct {
	mock.Mock
}

MockStateStore is an autogenerated mock type for the Store type

func (*MockStateStore) BulkDelete

func (_m *MockStateStore) BulkDelete(req []state.DeleteRequest) error

BulkDelete provides a mock function with given fields: req

func (*MockStateStore) BulkGet

func (_m *MockStateStore) BulkGet(req []state.GetRequest) (bool, []state.BulkGetResponse, error)

func (*MockStateStore) BulkSet

func (_m *MockStateStore) BulkSet(req []state.SetRequest) error

BulkSet provides a mock function with given fields: req

func (*MockStateStore) Delete

func (_m *MockStateStore) Delete(req *state.DeleteRequest) error

Delete provides a mock function with given fields: req

func (*MockStateStore) Features

func (_m *MockStateStore) Features() []state.Feature

Features returns the features for this state store.

func (*MockStateStore) Get

Get provides a mock function with given fields: req

func (*MockStateStore) Init

func (_m *MockStateStore) Init(metadata state.Metadata) error

Init provides a mock function with given fields: metadata

func (*MockStateStore) Set

func (_m *MockStateStore) Set(req *state.SetRequest) error

Set provides a mock function with given fields: req

type TransactionalStoreMock

type TransactionalStoreMock struct {
	MockStateStore
}

func (*TransactionalStoreMock) Features

func (_m *TransactionalStoreMock) Features() []state.Feature

func (*TransactionalStoreMock) Multi

Code generated by mockery v2.3.0. DO NOT EDIT.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL