commands

package
v0.0.0-...-0e2b5c9 Latest Latest
Warning

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

Go to latest
Published: May 7, 2020 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package commands is a generated GoMock package.

Package commands is a generated GoMock package.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyCommand is returned when trying to access content of an empty command
	ErrEmptyCommand = errors.New("empty command")
)

Functions

This section is empty.

Types

type Command

type Command interface {
	Type() (byte, error)
	Content() ([]byte, error)
	Bytes() []byte
}

Command defines an interface for a protectable Commands

type Factory

type Factory interface {
	CreateRemoveTopicCommand(topic string) (Command, error)
	CreateResetTopicsCommand() (Command, error)
	CreateSetIDKeyCommand(key []byte) (Command, error)
	CreateSetTopicKeyCommand(topic string, key []byte) (Command, error)
	CreateSetPubKeyCommand(publicKey ed25519.PublicKey, clientName string) (Command, error)
	CreateRemovePubKeyCommand(clientName string) (Command, error)
	CreateResetPubKeysCommand() (Command, error)
	CreateSetC2KeyCommand(c2PublicKey e4crypto.Curve25519PublicKey) (Command, error)
}

Factory defines interface able to create e4 Commands

func NewFactory

func NewFactory() Factory

NewFactory creates a new Command factory

type MockCommand

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

MockCommand is a mock of Command interface

func NewMockCommand

func NewMockCommand(ctrl *gomock.Controller) *MockCommand

NewMockCommand creates a new mock instance

func (*MockCommand) Bytes

func (m *MockCommand) Bytes() []byte

Bytes mocks base method

func (*MockCommand) Content

func (m *MockCommand) Content() ([]byte, error)

Content mocks base method

func (*MockCommand) EXPECT

func (m *MockCommand) EXPECT() *MockCommandMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

func (*MockCommand) Type

func (m *MockCommand) Type() (byte, error)

Type mocks base method

type MockCommandMockRecorder

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

MockCommandMockRecorder is the mock recorder for MockCommand

func (*MockCommandMockRecorder) Bytes

func (mr *MockCommandMockRecorder) Bytes() *gomock.Call

Bytes indicates an expected call of Bytes

func (*MockCommandMockRecorder) Content

func (mr *MockCommandMockRecorder) Content() *gomock.Call

Content indicates an expected call of Content

func (*MockCommandMockRecorder) Type

func (mr *MockCommandMockRecorder) Type() *gomock.Call

Type indicates an expected call of Type

type MockFactory

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

MockFactory is a mock of Factory interface

func NewMockFactory

func NewMockFactory(ctrl *gomock.Controller) *MockFactory

NewMockFactory creates a new mock instance

func (*MockFactory) CreateRemovePubKeyCommand

func (m *MockFactory) CreateRemovePubKeyCommand(arg0 string) (Command, error)

CreateRemovePubKeyCommand mocks base method

func (*MockFactory) CreateRemoveTopicCommand

func (m *MockFactory) CreateRemoveTopicCommand(arg0 string) (Command, error)

CreateRemoveTopicCommand mocks base method

func (*MockFactory) CreateResetPubKeysCommand

func (m *MockFactory) CreateResetPubKeysCommand() (Command, error)

CreateResetPubKeysCommand mocks base method

func (*MockFactory) CreateResetTopicsCommand

func (m *MockFactory) CreateResetTopicsCommand() (Command, error)

CreateResetTopicsCommand mocks base method

func (*MockFactory) CreateSetC2KeyCommand

func (m *MockFactory) CreateSetC2KeyCommand(arg0 []byte) (Command, error)

CreateSetC2KeyCommand mocks base method

func (*MockFactory) CreateSetIDKeyCommand

func (m *MockFactory) CreateSetIDKeyCommand(arg0 []byte) (Command, error)

CreateSetIDKeyCommand mocks base method

func (*MockFactory) CreateSetPubKeyCommand

func (m *MockFactory) CreateSetPubKeyCommand(arg0 ed25519.PublicKey, arg1 string) (Command, error)

CreateSetPubKeyCommand mocks base method

func (*MockFactory) CreateSetTopicKeyCommand

func (m *MockFactory) CreateSetTopicKeyCommand(arg0 string, arg1 []byte) (Command, error)

CreateSetTopicKeyCommand mocks base method

func (*MockFactory) EXPECT

func (m *MockFactory) EXPECT() *MockFactoryMockRecorder

EXPECT returns an object that allows the caller to indicate expected use

type MockFactoryMockRecorder

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

MockFactoryMockRecorder is the mock recorder for MockFactory

func (*MockFactoryMockRecorder) CreateRemovePubKeyCommand

func (mr *MockFactoryMockRecorder) CreateRemovePubKeyCommand(arg0 interface{}) *gomock.Call

CreateRemovePubKeyCommand indicates an expected call of CreateRemovePubKeyCommand

func (*MockFactoryMockRecorder) CreateRemoveTopicCommand

func (mr *MockFactoryMockRecorder) CreateRemoveTopicCommand(arg0 interface{}) *gomock.Call

CreateRemoveTopicCommand indicates an expected call of CreateRemoveTopicCommand

func (*MockFactoryMockRecorder) CreateResetPubKeysCommand

func (mr *MockFactoryMockRecorder) CreateResetPubKeysCommand() *gomock.Call

CreateResetPubKeysCommand indicates an expected call of CreateResetPubKeysCommand

func (*MockFactoryMockRecorder) CreateResetTopicsCommand

func (mr *MockFactoryMockRecorder) CreateResetTopicsCommand() *gomock.Call

CreateResetTopicsCommand indicates an expected call of CreateResetTopicsCommand

func (*MockFactoryMockRecorder) CreateSetC2KeyCommand

func (mr *MockFactoryMockRecorder) CreateSetC2KeyCommand(arg0 interface{}) *gomock.Call

CreateSetC2KeyCommand indicates an expected call of CreateSetC2KeyCommand

func (*MockFactoryMockRecorder) CreateSetIDKeyCommand

func (mr *MockFactoryMockRecorder) CreateSetIDKeyCommand(arg0 interface{}) *gomock.Call

CreateSetIDKeyCommand indicates an expected call of CreateSetIDKeyCommand

func (*MockFactoryMockRecorder) CreateSetPubKeyCommand

func (mr *MockFactoryMockRecorder) CreateSetPubKeyCommand(arg0, arg1 interface{}) *gomock.Call

CreateSetPubKeyCommand indicates an expected call of CreateSetPubKeyCommand

func (*MockFactoryMockRecorder) CreateSetTopicKeyCommand

func (mr *MockFactoryMockRecorder) CreateSetTopicKeyCommand(arg0, arg1 interface{}) *gomock.Call

CreateSetTopicKeyCommand indicates an expected call of CreateSetTopicKeyCommand

Jump to

Keyboard shortcuts

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