First batch
This commit is contained in:
@@ -1 +1,39 @@
|
||||
package oclib
|
||||
|
||||
type Datacenter struct {
|
||||
Resource
|
||||
ID string `json:"ID", required: "true"`
|
||||
Name string `json:"Name", required: "true" `
|
||||
|
||||
Owner string `json:"owner" `
|
||||
BookingPrice int `json:"bookingPrice" `
|
||||
|
||||
CPU DatacenterCpuModel `json:"cpu" required:"true"`
|
||||
RAM DatacenterMemoryModel `json:"ram" required:"true"`
|
||||
GPU []DatacenterGpuModel `json:"gpu" required:"true"`
|
||||
}
|
||||
|
||||
type DatacenterCpuModel struct {
|
||||
Cores uint `json:"cores" required:"true"` //TODO: validate
|
||||
Architecture string `json:"architecture"` //TOOD: enum
|
||||
Shared bool `json:"shared"`
|
||||
MinimumMemory uint `json:"minimum_memory"`
|
||||
Platform string `json:"platform"`
|
||||
}
|
||||
|
||||
type DatacenterMemoryModel struct {
|
||||
Size uint `json:"size" description:"Units in MB"`
|
||||
Ecc bool `json:"ecc"`
|
||||
}
|
||||
|
||||
type DatacenterGpuModel struct {
|
||||
CudaCores uint `json:"cuda_cores"`
|
||||
Model string `json:"model"`
|
||||
Memory uint `json:"memory" description:"Units in MB"`
|
||||
TensorCores uint `json:"tensor_cores"`
|
||||
}
|
||||
|
||||
|
||||
func (d *Datacenter) GetType() ResourceType{
|
||||
return DATACENTER
|
||||
}
|
||||
Reference in New Issue
Block a user