fake

package
v1.3.6 Latest Latest
Warning

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

Go to latest
Published: Jun 13, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Database added in v1.3.1

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

fake database that's in memory

func NewFakeDatabase added in v1.3.1

func NewFakeDatabase(t *testing.T) *Database

func (*Database) Instance added in v1.3.1

func (d *Database) Instance() *gorm.DB

func (*Database) Setup added in v1.3.1

func (d *Database) Setup(action func(db *gorm.DB)) *Database

type FakeHookService

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

func NewFakeHookService

func NewFakeHookService(t *testing.T) *FakeHookService

func (*FakeHookService) Messages

func (q *FakeHookService) Messages() []sdk.EventHookMessage

func (*FakeHookService) Notify

func (q *FakeHookService) Notify(ctx context.Context, message *sdk.EventHookMessage) (uuid.UUID, error)

type FakeMessageSender

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

func NewFakeMessageSender

func NewFakeMessageSender(t *testing.T) *FakeMessageSender

func (*FakeMessageSender) Count added in v1.3.4

func (fake *FakeMessageSender) Count() uint

message count

func (*FakeMessageSender) EnsureTopology

func (s *FakeMessageSender) EnsureTopology(ctx context.Context, queueName string) error

func (*FakeMessageSender) Last added in v1.3.4

func (fake *FakeMessageSender) Last() any

func (*FakeMessageSender) Messages added in v1.3.4

func (fake *FakeMessageSender) Messages() []any

all messages passed to notify

func (*FakeMessageSender) Send

func (fake *FakeMessageSender) Send(ctx context.Context, queueName string, messages ...any) ([]messaging.SendMessageResult, error)

type FakeNotifyFunc added in v1.3.4

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

func NewFakeNotifyFunc added in v1.3.4

func NewFakeNotifyFunc(t *testing.T) *FakeNotifyFunc

func (*FakeNotifyFunc) Count added in v1.3.4

func (fake *FakeNotifyFunc) Count() int

message count

func (*FakeNotifyFunc) Messages added in v1.3.4

func (fake *FakeNotifyFunc) Messages() []*sdk.EventHookMessage

all messages passed to notify

func (*FakeNotifyFunc) Notify added in v1.3.4

func (fake *FakeNotifyFunc) Notify(ctx context.Context, message *sdk.EventHookMessage) (uuid.UUID, error)

Jump to

Keyboard shortcuts

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