testing

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: May 12, 2020 License: MIT Imports: 16 Imported by: 2

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 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 added in v0.5.0

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) 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 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 MockExporter added in v0.2.0

type MockExporter struct {
	mock.Mock
}

MockExporter is a mock exporter object

func (*MockExporter) Init added in v0.2.0

func (m *MockExporter) Init(appID string, hostAddress string, metadata exporters.Metadata) error

Init is a mock initialization method

type MockPubSub

type MockPubSub struct {
	mock.Mock
}

MockPubSub is a mock pub-sub component object

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

Jump to

Keyboard shortcuts

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