Documentation
¶
Index ¶
- type CreateRequest
- type DeleteRequest
- type DisableRequest
- type EnableRequest
- type ItemPCIDevice
- type ListPCIDevices
- type PCIDevice
- func (p PCIDevice) Create(ctx context.Context, req CreateRequest) (uint64, error)
- func (p PCIDevice) Delete(ctx context.Context, req DeleteRequest) (bool, error)
- func (p PCIDevice) Disable(ctx context.Context, req DisableRequest) (bool, error)
- func (p PCIDevice) Enable(ctx context.Context, req EnableRequest) (bool, error)
- func (p PCIDevice) List(ctx context.Context) (ListPCIDevices, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateRequest ¶
type CreateRequest struct { // StackID // Required: true StackID uint64 `url:"stackId" json:"stackId" validate:"required"` // Resource group ID // Required: true RGID uint64 `url:"rgId" json:"rgId" validate:"required"` // Name of device // Required: true Name string `url:"name" json:"name" validate:"required"` // PCI address of the device // Must be in format 0000:1f:2b.0 // Required: true HWPath string `url:"hwPath" json:"hwPath" validate:"required,hwPath"` // Description, just for information // Required: false Description string `url:"description,omitempty" json:"description,omitempty"` }
Request struct for creating PCI device
type DeleteRequest ¶
type DeleteRequest struct { // PCI device ID // Required: true DeviceID uint64 `url:"deviceId" json:"deviceId" validate:"required"` // Force delete // Required: false Force bool `url:"force,omitempty" json:"force,omitempty"` }
Request struct for deleting PCI device
type DisableRequest ¶
type DisableRequest struct { // PCI device ID // Required: true DeviceID uint64 `url:"deviceId" json:"deviceId" validate:"required"` // Force delete // Required: false Force bool `url:"force,omitempty" json:"force,omitempty"` }
Request struct for disabling PCI device
type EnableRequest ¶
type EnableRequest struct { // PCI device ID // Required: true DeviceID uint64 `url:"deviceId" json:"deviceId" validate:"required"` }
Request struct for enabling PCI device
type ItemPCIDevice ¶
type ItemPCIDevice struct { // CKey CKey string `json:"_ckey"` // Meta Meta []interface{} `json:"_meta"` // Compute ID ComputeID uint64 `json:"computeId"` // Description Description string `json:"description"` // GUID GUID uint64 `json:"guid"` // HwPath HwPath string `json:"hwPath"` // ID ID uint64 `json:"id"` // Name Name string `json:"name"` // Resource group ID RGID uint64 `json:"rgId"` // Stack ID StackID uint64 `json:"stackId"` // Status Status string `json:"status"` // System name SystemName string `json:"systemName"` }
Main information about PCI device
func (ItemPCIDevice) Serialize ¶
func (i ItemPCIDevice) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type ListPCIDevices ¶
type ListPCIDevices []ItemPCIDevice
List PCI devices
func (ListPCIDevices) Serialize ¶
func (l ListPCIDevices) Serialize(params ...string) (serialization.Serialized, error)
Serialize returns JSON-serialized []byte. Used as a wrapper over json.Marshal and json.MarshalIndent functions.
In order to serialize with indent make sure to follow these guidelines:
- First argument -> prefix
- Second argument -> indent
type PCIDevice ¶
type PCIDevice struct {
// contains filtered or unexported fields
}
Structure for creating request to PCI device
Click to show internal directories.
Click to hide internal directories.