mocks

package
v0.0.0-...-404d597 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package mocks contains the mock implementations to be used in testing.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Communication

type Communication struct {
	MockQuery func([]byte) ([]byte, error)
	MockClose func()
}

Communication is a mock implementation of firmware.Communication.

func (*Communication) Close

func (communication *Communication) Close()

Close implements firmware.Close.

func (*Communication) Query

func (communication *Communication) Query(msg []byte) ([]byte, error)

Query implements firmware.Query.

type Config

type Config struct{}

Config is a mock implementation of firmware.ConfigInterface.

func (*Config) AddDeviceStaticPubkey

func (config *Config) AddDeviceStaticPubkey(pubkey []byte) error

AddDeviceStaticPubkey implements firmware.Communication.

func (*Config) ContainsDeviceStaticPubkey

func (config *Config) ContainsDeviceStaticPubkey(pubkey []byte) bool

ContainsDeviceStaticPubkey implements firmware.Communication.

func (*Config) GetAppNoiseStaticKeypair

func (config *Config) GetAppNoiseStaticKeypair() *noise.DHKey

GetAppNoiseStaticKeypair implements firmware.Communication.

func (*Config) SetAppNoiseStaticKeypair

func (config *Config) SetAppNoiseStaticKeypair(key *noise.DHKey) error

SetAppNoiseStaticKeypair implements firmware.Communication.

type Logger

type Logger struct{}

Logger is a mock implementation of firmware.Logger.

func (*Logger) Debug

func (logger *Logger) Debug(msg string)

Debug implements firmware.Logger.

func (*Logger) Error

func (logger *Logger) Error(msg string, err error)

Error implements firmware.Logger.

func (*Logger) Info

func (logger *Logger) Info(msg string)

Info implements firmware.Logger.

Jump to

Keyboard shortcuts

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