Documentation
¶
Index ¶
- type MockClient
- func (c *MockClient) ConvertDevice(d *packngo.Device, networkType string) error
- func (c *MockClient) Create(createRequest *packngo.DeviceCreateRequest) (*packngo.Device, *packngo.Response, error)
- func (c *MockClient) Delete(deviceID string, force bool) (*packngo.Response, error)
- func (c *MockClient) DeviceNetworkType(deviceID string) (string, error)
- func (c *MockClient) DeviceToNetworkType(deviceID string, networkType string) (*packngo.Device, error)
- func (c *MockClient) Get(deviceID string, options *packngo.GetOptions) (*packngo.Device, *packngo.Response, error)
- func (c *MockClient) GetFacilityID(id string) string
- func (c *MockClient) GetProjectID(id string) string
- func (c *MockClient) Update(deviceID string, createRequest *packngo.DeviceUpdateRequest) (*packngo.Device, *packngo.Response, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type MockClient ¶
type MockClient struct { MockCreate func(createRequest *packngo.DeviceCreateRequest) (*packngo.Device, *packngo.Response, error) MockUpdate func(deviceID string, createRequest *packngo.DeviceUpdateRequest) (*packngo.Device, *packngo.Response, error) MockDelete func(deviceID string, force bool) (*packngo.Response, error) MockGet func(deviceID string, getOpt *packngo.GetOptions) (*packngo.Device, *packngo.Response, error) MockDeviceToNetworkType func(deviceID string, networkType string) (*packngo.Device, error) MockDeviceNetworkType func(deviceID string) (string, error) MockConvertDevice func(*packngo.Device, string) error MockGetProjectID func(string) string MockGetFacilityID func(string) string }
MockClient is a fake implementation of packngo.Client.
func (*MockClient) ConvertDevice ¶ added in v0.0.5
func (c *MockClient) ConvertDevice(d *packngo.Device, networkType string) error
ConvertDevice calls the MockClient's MockConvertDevice function.
func (*MockClient) Create ¶
func (c *MockClient) Create(createRequest *packngo.DeviceCreateRequest) (*packngo.Device, *packngo.Response, error)
Create calls the MockClient's MockCreate function.
func (*MockClient) DeviceNetworkType ¶
func (c *MockClient) DeviceNetworkType(deviceID string) (string, error)
DeviceNetworkType calls the MockClient's MockDeviceNetworkType function.
func (*MockClient) DeviceToNetworkType ¶
func (c *MockClient) DeviceToNetworkType(deviceID string, networkType string) (*packngo.Device, error)
DeviceToNetworkType calls the MockClient's MockDeviceToNetworkType function.
func (*MockClient) Get ¶
func (c *MockClient) Get(deviceID string, options *packngo.GetOptions) (*packngo.Device, *packngo.Response, error)
Get calls the MockClient's MockGet function.
func (*MockClient) GetFacilityID ¶
func (c *MockClient) GetFacilityID(id string) string
GetFacilityID calls the MockClient's MockGet function.
func (*MockClient) GetProjectID ¶
func (c *MockClient) GetProjectID(id string) string
GetProjectID calls the MockClient's MockGet function.
Click to show internal directories.
Click to hide internal directories.