Documentation ¶
Index ¶
- type MockClient
- func (c *MockClient) Assign(p *packngo.PortAssignRequest) (*packngo.Port, *packngo.Response, error)
- func (c *MockClient) GetFacilityID(id string) string
- func (c *MockClient) GetPortByName(deviceID string, name string) (*packngo.Port, error)
- func (c *MockClient) GetProjectID(id string) string
- func (c *MockClient) Unassign(p *packngo.PortAssignRequest) (*packngo.Port, *packngo.Response, error)
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 ¶
func (c *MockClient) Assign(p *packngo.PortAssignRequest) (*packngo.Port, *packngo.Response, error)
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 ¶
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 ¶
func (c *MockClient) Unassign(p *packngo.PortAssignRequest) (*packngo.Port, *packngo.Response, error)
Unassign calls the MockClient's MockUnassign function.
Click to show internal directories.
Click to hide internal directories.