mocks

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Oct 19, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewAliasMock

func NewAliasMock(err error) controller.AliasInterface

NewAliasMock exports a mock of the Alias.interface

func NewAppMock

func NewAppMock(err error) controller.AppInterface

NewAppMock exports a mock of the App.interface

func NewAuthMock

func NewAuthMock(err error) controller.AuthorizationInterface

NewAuthMock exports a mock of the Authorization.interface

func NewBrokersMock

func NewBrokersMock(err error) controller.BrokersInterface

NewBrokersMock exports a mock of the Brokers.interface

func NewChannelMock

func NewChannelMock(err error) controller.ChannelInterface

NewChannelMock exports a mock of the channel.interface

func NewClientMock

func NewClientMock(err error) controller.Interface

NewClientMock mocks a controller client

func NewTypeMock

func NewTypeMock(err error) controller.TypeInterface

NewTypeMock exports a mock of the Type.interface

Types

type AliasMock

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

AliasMock mock structure for the operations of the controller.Aliass()

func (*AliasMock) Create

func (am *AliasMock) Create(ctx context.Context, scope, target string, alias *meta.Alias, dryRun bool) (diff.Changelog, error)

Create is the AliasMock Create

func (*AliasMock) Delete

func (am *AliasMock) Delete(ctx context.Context, scope, key string, dryRun bool) (diff.Changelog, error)

Delete is the AliasMock Delete

func (*AliasMock) Get

func (am *AliasMock) Get(ctx context.Context, scope, key string) (*meta.Alias, error)

Get is the AliasMock Get

func (*AliasMock) Update

func (am *AliasMock) Update(ctx context.Context, scope, target string, alias *meta.Alias, dryRun bool) (diff.Changelog, error)

Update is the AliasMock Update

type AppMock

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

AppMock mock structure for the operations of the controller.Apps()

func (*AppMock) Create

func (am *AppMock) Create(ctx context.Context, scope string, app *meta.App, dryRun bool) (diff.Changelog, error)

Create is the AppMock Create

func (*AppMock) Delete

func (am *AppMock) Delete(ctx context.Context, scope string, dryRun bool) (diff.Changelog, error)

Delete is the AppMock Delete

func (*AppMock) Get

func (am *AppMock) Get(ctx context.Context, scope string) (*meta.App, error)

Get is the AppMock Get

func (*AppMock) Update

func (am *AppMock) Update(ctx context.Context, scope string, app *meta.App, dryRun bool) (diff.Changelog, error)

Update is the AppMock Update

type AuthMock

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

AuthMock mock structure for the operations of the controller.Authorization()

func (*AuthMock) GenerateToken

func (am *AuthMock) GenerateToken(ctx context.Context, payload auth.Payload) (string, error)

GenerateToken is the AuthMock GenerateToken method

func (*AuthMock) Init

func (am *AuthMock) Init(ctx context.Context, key string) (string, error)

Init is the AuthMock Init method

type BrokersMock

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

BrokersMock mock structure for the operations of the controller.Brokerss()

func (*BrokersMock) Create

func (bm *BrokersMock) Create(ctx context.Context, brokerName string, config []byte) error

Create mocks the Brokers controller interface method

func (*BrokersMock) Get

func (bm *BrokersMock) Get(ctx context.Context) (*models.BrokersDI, error)

Get is the BrokersMock Get

type ChannelMock

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

ChannelMock mock structure for the operations of the controller.Channels()

func (*ChannelMock) Create

func (cm *ChannelMock) Create(ctx context.Context, scope string, ch *meta.Channel, dryRun bool) (diff.Changelog, error)

Create is the channelmock Create

func (*ChannelMock) Delete

func (cm *ChannelMock) Delete(ctx context.Context, scope, name string, dryRun bool) (diff.Changelog, error)

Delete is the channelmock Delete

func (*ChannelMock) Get

func (cm *ChannelMock) Get(ctx context.Context, scope, name string) (*meta.Channel, error)

Get is the channelmock Get

func (*ChannelMock) Update

func (cm *ChannelMock) Update(ctx context.Context, scope string, ch *meta.Channel, dryRun bool) (diff.Changelog, error)

Update is the channelmock Update

type ClientMock

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

ClientMock test asset for mocking a controller

func (*ClientMock) Alias

func (cm *ClientMock) Alias() controller.AliasInterface

Alias mocks a alias controller

func (*ClientMock) Apps

func (cm *ClientMock) Apps() controller.AppInterface

Apps mocks a app controller

func (*ClientMock) Authorization

func (cm *ClientMock) Authorization() controller.AuthorizationInterface

Authorization mocks a app controller

func (*ClientMock) Brokers

func (cm *ClientMock) Brokers() controller.BrokersInterface

Brokers mocks brokers controller

func (*ClientMock) Channels

func (cm *ClientMock) Channels() controller.ChannelInterface

Channels mocks a channel controller

func (*ClientMock) Types

func (cm *ClientMock) Types() controller.TypeInterface

Types mocks a chanl types controller

type TypeMock

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

TypeMock mock structure for the operations of the controller.Types()

func (*TypeMock) Create

func (tm *TypeMock) Create(ctx context.Context, scope string, ct *meta.Type, dryRun bool) (diff.Changelog, error)

Create is the TypeMock Create

func (*TypeMock) Delete

func (tm *TypeMock) Delete(ctx context.Context, scope, ctName string, dryRun bool) (diff.Changelog, error)

Delete is the TypeMock Delete

func (*TypeMock) Get

func (tm *TypeMock) Get(ctx context.Context, scope, ctName string) (*meta.Type, error)

Get is the TypeMock Get

func (*TypeMock) Update

func (tm *TypeMock) Update(ctx context.Context, scope string, ct *meta.Type, dryRun bool) (diff.Changelog, error)

Update is the TypeMock Update

Jump to

Keyboard shortcuts

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