File tree Expand file tree Collapse file tree
internal/namespaces/lb/v1 Expand file tree Collapse file tree Original file line number Diff line number Diff line change 88
99func GetCommands () * core.Commands {
1010 human .RegisterMarshalerFunc (lb .LBTypeStock (0 ), human .EnumMarshalFunc (lbTypeStockMarshalSpecs ))
11+ human .RegisterMarshalerFunc (lb .LBStatus (0 ), human .EnumMarshalFunc (lbStatusMarshalSpecs ))
1112 human .RegisterMarshalerFunc (lb .CertificateStatus (0 ), human .EnumMarshalFunc (certificateStatusMarshalSpecs ))
1213 human .RegisterMarshalerFunc (lb .ACLActionType (0 ), human .EnumMarshalFunc (aclMarshalSpecs ))
1314
Original file line number Diff line number Diff line change @@ -4,11 +4,25 @@ import (
44 "context"
55 "reflect"
66
7+ "github.com/fatih/color"
78 "github.com/scaleway/scaleway-cli/internal/core"
9+ "github.com/scaleway/scaleway-cli/internal/human"
810 "github.com/scaleway/scaleway-sdk-go/api/lb/v1"
911 "github.com/scaleway/scaleway-sdk-go/scw"
1012)
1113
14+ var (
15+ lbStatusMarshalSpecs = human.EnumMarshalSpecs {
16+ lb .LBStatusError : & human.EnumMarshalSpec {Attribute : color .FgRed , Value : "error" },
17+ lb .LBStatusLocked : & human.EnumMarshalSpec {Attribute : color .FgRed , Value : "locked" },
18+ lb .LBStatusMigrating : & human.EnumMarshalSpec {Attribute : color .FgBlue , Value : "migrating" },
19+ lb .LBStatusPending : & human.EnumMarshalSpec {Attribute : color .FgBlue , Value : "pending" },
20+ lb .LBStatusReady : & human.EnumMarshalSpec {Attribute : color .FgGreen , Value : "ready" },
21+ lb .LBStatusStopped : & human.EnumMarshalSpec {Attribute : color .Faint , Value : "stopped" },
22+ lb .LBStatusUnknown : & human.EnumMarshalSpec {Attribute : color .Faint , Value : "unknown" },
23+ }
24+ )
25+
1226func lbWaitCommand () * core.Command {
1327 return & core.Command {
1428 Short : `Wait for a load balancer to reach a stable state` ,
You can’t perform that action at this time.
0 commit comments