File tree Expand file tree Collapse file tree 1 file changed +13
-0
lines changed
internal/namespaces/iam/v1alpha1 Expand file tree Collapse file tree 1 file changed +13
-0
lines changed Original file line number Diff line number Diff line change @@ -7,16 +7,29 @@ import (
77 "reflect"
88 "strings"
99
10+ "github.com/fatih/color"
1011 "github.com/scaleway/scaleway-cli/v2/internal/args"
1112 "github.com/scaleway/scaleway-cli/v2/internal/core"
13+ "github.com/scaleway/scaleway-cli/v2/internal/human"
1214 "github.com/scaleway/scaleway-cli/v2/internal/interactive"
1315 iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1"
1416 "github.com/scaleway/scaleway-sdk-go/scw"
1517)
1618
19+ var (
20+ logActionMarshalSpecs = human.EnumMarshalSpecs {
21+ iam .LogActionUnknownAction : & human.EnumMarshalSpec {Attribute : color .Faint },
22+ iam .LogActionCreated : & human.EnumMarshalSpec {Attribute : color .FgGreen },
23+ iam .LogActionUpdated : & human.EnumMarshalSpec {Attribute : color .FgBlue },
24+ iam .LogActionDeleted : & human.EnumMarshalSpec {Attribute : color .FgRed },
25+ }
26+ )
27+
1728func GetCommands () * core.Commands {
1829 cmds := GetGeneratedCommands ()
1930
31+ human .RegisterMarshalerFunc (iam .LogAction ("" ), human .EnumMarshalFunc (logActionMarshalSpecs ))
32+
2033 cmds .Merge (core .NewCommands (
2134 initWithSSHCommand (),
2235 ))
You can’t perform that action at this time.
0 commit comments