mocks

package
v0.0.0-...-71d4f67 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2022 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type GCloudInterfaceMock

type GCloudInterfaceMock struct {
	ResettableMock
}

func (*GCloudInterfaceMock) Instances

func (g *GCloudInterfaceMock) Instances(serversMap map[string]server.Server) error

type GCloudMock

type GCloudMock struct {
	ResettableMock
}

func (*GCloudMock) InstancesInRegion

func (g *GCloudMock) InstancesInRegion(region string) ([]compute.Instance, error)

func (*GCloudMock) Zones

func (g *GCloudMock) Zones() ([]string, error)

type GCloudServiceMock

type GCloudServiceMock interface {
	wrapper.GCloudWrapper
}

type MockAWSWrapper

type MockAWSWrapper struct {
	ResettableMock
}

func (*MockAWSWrapper) GetFileFromS3

func (m *MockAWSWrapper) GetFileFromS3(s3Key string) ([]byte, error)

func (*MockAWSWrapper) Instances

func (m *MockAWSWrapper) Instances(map[string]server.Server) error

func (*MockAWSWrapper) UploadObjectToS3

func (m *MockAWSWrapper) UploadObjectToS3(fileData []byte, s3Key string) error

type MockEC2API

type MockEC2API struct {
	ec2iface.EC2API
	ResettableMock
}

func (*MockEC2API) DescribeInstances

func (m *MockEC2API) DescribeInstances(input *ec2.DescribeInstancesInput) (*ec2.DescribeInstancesOutput, error)

func (*MockEC2API) DescribeRegions

func (m *MockEC2API) DescribeRegions(input *ec2.DescribeRegionsInput) (*ec2.DescribeRegionsOutput, error)

type MockS3API

type MockS3API struct {
	s3iface.S3API
	ResettableMock
}

func (*MockS3API) GetObject

func (m *MockS3API) GetObject(input *s3.GetObjectInput) (*s3.GetObjectOutput, error)

func (*MockS3API) PutObject

func (m *MockS3API) PutObject(input *s3.PutObjectInput) (*s3.PutObjectOutput, error)

type NmapScannerMock

type NmapScannerMock struct {
	ResettableMock
}

func (*NmapScannerMock) CurrentScanResults

func (n *NmapScannerMock) CurrentScanResults() ([]byte, error)

func (*NmapScannerMock) DiffScans

func (n *NmapScannerMock) DiffScans() map[string]wrapper.PortMap

func (*NmapScannerMock) ParsePreviousScan

func (n *NmapScannerMock) ParsePreviousScan(scanBytes []byte) error

func (*NmapScannerMock) StartScan

func (n *NmapScannerMock) StartScan(ipAddresses []string) error

type ResettableMock

type ResettableMock struct {
	mock.Mock
}

func (*ResettableMock) Reset

func (m *ResettableMock) Reset()

type ScannerMock

type ScannerMock struct {
	ResettableMock
}

func (*ScannerMock) Run

func (s *ScannerMock) Run([]string, context.Context) (*nmap.Run, []string, error)

type ScannerServiceMock

type ScannerServiceMock interface {
	wrapper.NmapClientWrapper
}

type SlackInterfaceMock

type SlackInterfaceMock struct {
	ResettableMock
}

func (*SlackInterfaceMock) PrintOpenedPorts

func (s *SlackInterfaceMock) PrintOpenedPorts(host server.Server, ports []uint16) error

Jump to

Keyboard shortcuts

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