-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathload_balancer_pools.go
36 lines (31 loc) · 1.41 KB
/
load_balancer_pools.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
package cloudscale
import (
"time"
)
const loadBalancerPoolBasePath = "v1/load-balancers/pools"
type LoadBalancerPool struct {
TaggedResource
// Just use omitempty everywhere. This makes it easy to use restful. Errors
// will be coming from the API if something is disabled.
HREF string `json:"href,omitempty"`
UUID string `json:"uuid,omitempty"`
Name string `json:"name,omitempty"`
CreatedAt time.Time `json:"created_at,omitempty"`
LoadBalancer LoadBalancerStub `json:"load_balancer,omitempty"`
Algorithm string `json:"algorithm,omitempty"`
Protocol string `json:"protocol,omitempty"`
}
type LoadBalancerPoolRequest struct {
TaggedResourceRequest
Name string `json:"name,omitempty"`
LoadBalancer string `json:"load_balancer,omitempty"`
Algorithm string `json:"algorithm,omitempty"`
Protocol string `json:"protocol,omitempty"`
}
type LoadBalancerPoolService interface {
GenericCreateService[LoadBalancerPool, LoadBalancerPoolRequest, LoadBalancerPoolRequest]
GenericGetService[LoadBalancerPool, LoadBalancerPoolRequest, LoadBalancerPoolRequest]
GenericListService[LoadBalancerPool, LoadBalancerPoolRequest, LoadBalancerPoolRequest]
GenericUpdateService[LoadBalancerPool, LoadBalancerPoolRequest, LoadBalancerPoolRequest]
GenericDeleteService[LoadBalancerPool, LoadBalancerPoolRequest, LoadBalancerPoolRequest]
}