testsupport

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 4, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateBackupResponse

func CreateBackupResponse() []byte

func CreatePortSettingResponse

func CreatePortSettingResponse() string

func CreatePortStatsResponse

func CreatePortStatsResponse() string

func CreateSystemInfoResponse

func CreateSystemInfoResponse(s FakeSwitch) string

Types

type FakeSwitch

type FakeSwitch struct {
	AdminUsr    string
	AdminPwd    string
	Description string
	MacAddress  string
	IPAddress   string
	Netmask     string
	Gateway     string
	Firmware    string
	Hardware    string
}

func NewFakeSwitch

func NewFakeSwitch() *FakeSwitch

creates a new fake switch with default data

type MockedWebsite

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

A mocked website

func NewMockedWebsite

func NewMockedWebsite() *MockedWebsite

creates a new mocked website

func (*MockedWebsite) Disable

func (t *MockedWebsite) Disable()

func (*MockedWebsite) GetHttpClient

func (t *MockedWebsite) GetHttpClient() *http.Client

func (*MockedWebsite) InterceptClient

func (t *MockedWebsite) InterceptClient(c *http.Client)

Jump to

Keyboard shortcuts

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