fake

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewChannelOperator

func NewChannelOperator(err error) operators.ChannelOperatorInterface

NewChannelOperator mock

func NewFakeOperator

func NewFakeOperator() operators.OperatorInterface

NewFakeOperator creates a simple operator that only acts in memory

func NewNodeOperator

func NewNodeOperator(err error) operators.NodeOperatorInterface

NewNodeOperator returns a mocked node operator that returns err on every function if err is not nil

Types

type ChannelOperator

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

ChannelOperator mock

func (ChannelOperator) Create

func (o ChannelOperator) Create(ctx context.Context, context string, ch *meta.Channel) error

Create mock

func (ChannelOperator) Delete

func (o ChannelOperator) Delete(ctx context.Context, context string, name string) error

Delete mock

func (ChannelOperator) Get

func (o ChannelOperator) Get(ctx context.Context, context string, name string) (*meta.Channel, error)

Get mock

func (ChannelOperator) GetAll

func (o ChannelOperator) GetAll(_ context.Context, context string) (ret []*meta.Channel, err error)

GetAll mock

func (ChannelOperator) Update

func (o ChannelOperator) Update(ctx context.Context, context string, ch *meta.Channel) error

Update mock

type NodeOperator

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

NodeOperator mock

func (*NodeOperator) CreateNode

func (o *NodeOperator) CreateNode(ctx context.Context, app *meta.App) (*meta.Node, error)

CreateNode mock

func (*NodeOperator) DeleteNode

func (o *NodeOperator) DeleteNode(ctx context.Context, nodeContext string, nodeName string) error

DeleteNode mock

func (*NodeOperator) GetAllNodes

func (o *NodeOperator) GetAllNodes() (ret []meta.Node)

GetAllNodes mock

func (*NodeOperator) GetNode

func (o *NodeOperator) GetNode(ctx context.Context, app *meta.App) (*meta.Node, error)

GetNode mock

func (*NodeOperator) UpdateNode

func (o *NodeOperator) UpdateNode(ctx context.Context, app *meta.App) (*meta.Node, error)

UpdateNode mock

type Operator

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

Operator mock

func (*Operator) Channels

Channels mock

func (*Operator) Nodes

Nodes mock

Jump to

Keyboard shortcuts

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