fake

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2021 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockClient

type MockClient struct {
	MockAssign        func(*packngo.PortAssignRequest) (*packngo.Port, *packngo.Response, error)
	MockUnassign      func(*packngo.PortAssignRequest) (*packngo.Port, *packngo.Response, error)
	MockGetPortByName func(string, string) (*packngo.Port, error)

	MockGetProjectID  func(string) string
	MockGetFacilityID func(string) string
}

MockClient is a fake implementation of packngo.Client.

func (*MockClient) Assign

Assign calls the MockClient's MockAssign function.

func (*MockClient) GetFacilityID

func (c *MockClient) GetFacilityID(id string) string

GetFacilityID calls the MockClient's MockGet function.

func (*MockClient) GetPortByName

func (c *MockClient) GetPortByName(deviceID string, name string) (*packngo.Port, error)

GetPortByName calls the MockClient's MockGetPortByName function.

func (*MockClient) GetProjectID

func (c *MockClient) GetProjectID(id string) string

GetProjectID calls the MockClient's MockGet function.

func (*MockClient) Unassign

Unassign calls the MockClient's MockUnassign function.

Jump to

Keyboard shortcuts

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