-
Notifications
You must be signed in to change notification settings - Fork 151
/
custom.go
35 lines (27 loc) · 1.46 KB
/
custom.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
package lb
import (
"github.com/scaleway/scaleway-cli/v2/internal/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-sdk-go/api/lb/v1"
)
func GetCommands() *core.Commands {
human.RegisterMarshalerFunc(lb.LBTypeStock(""), human.EnumMarshalFunc(lbTypeStockMarshalSpecs))
human.RegisterMarshalerFunc(lb.LBStatus(""), human.EnumMarshalFunc(lbStatusMarshalSpecs))
human.RegisterMarshalerFunc(lb.CertificateStatus(""), human.EnumMarshalFunc(certificateStatusMarshalSpecs))
human.RegisterMarshalerFunc(lb.ACLActionType(""), human.EnumMarshalFunc(aclMarshalSpecs))
human.RegisterMarshalerFunc(lb.BackendServerStatsHealthCheckStatus(""), human.EnumMarshalFunc(backendServerStatsHealthCheckStatusMarshalSpecs))
human.RegisterMarshalerFunc(lb.BackendServerStatsServerState(""), human.EnumMarshalFunc(backendServerStatsServerStateMarshalSpecs))
human.RegisterMarshalerFunc(lb.LB{}, lbMarshalerFunc)
human.RegisterMarshalerFunc(lb.Backend{}, lbBackendMarshalerFunc)
cmds := GetGeneratedCommands()
cmds.Add(
lbWaitCommand(),
)
cmds.MustFind("lb", "lb", "create").Override(lbCreateBuilder)
cmds.MustFind("lb", "lb", "get").Override(lbGetBuilder)
cmds.MustFind("lb", "lb", "migrate").Override(lbMigrateBuilder)
cmds.MustFind("lb", "lb", "get-stats").Override(lbGetStatsBuilder)
cmds.MustFind("lb", "frontend", "get").Override(frontendGetBuilder)
cmds.MustFind("lb", "certificate", "create").Override(certificateCreateBuilder)
return cmds
}