File tree 4 files changed +25
-21
lines changed
4 files changed +25
-21
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,7 @@ func (o CertificateCreateOpts) validateUploaded() error {
260
260
return nil
261
261
}
262
262
263
- // Create creates a new certificate uploaded certificate.
263
+ // Create creates a new uploaded certificate.
264
264
//
265
265
// Create returns an error for certificates of any other type. Use
266
266
// CreateCertificate to create such certificates.
Original file line number Diff line number Diff line change @@ -278,15 +278,16 @@ func ServerPrivateNetFromSchema(s schema.ServerPrivateNet) ServerPrivateNet {
278
278
// ServerTypeFromSchema converts a schema.ServerType to a ServerType.
279
279
func ServerTypeFromSchema (s schema.ServerType ) * ServerType {
280
280
st := & ServerType {
281
- ID : s .ID ,
282
- Name : s .Name ,
283
- Description : s .Description ,
284
- Cores : s .Cores ,
285
- Memory : s .Memory ,
286
- Disk : s .Disk ,
287
- StorageType : StorageType (s .StorageType ),
288
- CPUType : CPUType (s .CPUType ),
289
- Architecture : Architecture (s .Architecture ),
281
+ ID : s .ID ,
282
+ Name : s .Name ,
283
+ Description : s .Description ,
284
+ Cores : s .Cores ,
285
+ Memory : s .Memory ,
286
+ Disk : s .Disk ,
287
+ StorageType : StorageType (s .StorageType ),
288
+ CPUType : CPUType (s .CPUType ),
289
+ Architecture : Architecture (s .Architecture ),
290
+ IncludedTraffic : s .IncludedTraffic ,
290
291
}
291
292
for _ , price := range s .Prices {
292
293
st .Pricings = append (st .Pricings , ServerTypeLocationPricing {
Original file line number Diff line number Diff line change @@ -2,16 +2,17 @@ package schema
2
2
3
3
// ServerType defines the schema of a server type.
4
4
type ServerType struct {
5
- ID int `json:"id"`
6
- Name string `json:"name"`
7
- Description string `json:"description"`
8
- Cores int `json:"cores"`
9
- Memory float32 `json:"memory"`
10
- Disk int `json:"disk"`
11
- StorageType string `json:"storage_type"`
12
- CPUType string `json:"cpu_type"`
13
- Architecture string `json:"architecture"`
14
- Prices []PricingServerTypePrice `json:"prices"`
5
+ ID int `json:"id"`
6
+ Name string `json:"name"`
7
+ Description string `json:"description"`
8
+ Cores int `json:"cores"`
9
+ Memory float32 `json:"memory"`
10
+ Disk int `json:"disk"`
11
+ StorageType string `json:"storage_type"`
12
+ CPUType string `json:"cpu_type"`
13
+ Architecture string `json:"architecture"`
14
+ IncludedTraffic int `json:"included_traffic"`
15
+ Prices []PricingServerTypePrice `json:"prices"`
15
16
}
16
17
17
18
// ServerTypeListResponse defines the schema of the response when
Original file line number Diff line number Diff line change @@ -20,7 +20,9 @@ type ServerType struct {
20
20
StorageType StorageType
21
21
CPUType CPUType
22
22
Architecture Architecture
23
- Pricings []ServerTypeLocationPricing
23
+ // IncludedTraffic is the free traffic per month in bytes
24
+ IncludedTraffic int
25
+ Pricings []ServerTypeLocationPricing
24
26
}
25
27
26
28
// StorageType specifies the type of storage.
You can’t perform that action at this time.
0 commit comments