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 (
7
7
"reflect"
8
8
"strings"
9
9
10
+ "github.com/fatih/color"
10
11
"github.com/scaleway/scaleway-cli/v2/internal/args"
11
12
"github.com/scaleway/scaleway-cli/v2/internal/core"
13
+ "github.com/scaleway/scaleway-cli/v2/internal/human"
12
14
"github.com/scaleway/scaleway-cli/v2/internal/interactive"
13
15
iam "github.com/scaleway/scaleway-sdk-go/api/iam/v1alpha1"
14
16
"github.com/scaleway/scaleway-sdk-go/scw"
15
17
)
16
18
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
+
17
28
func GetCommands () * core.Commands {
18
29
cmds := GetGeneratedCommands ()
19
30
31
+ human .RegisterMarshalerFunc (iam .LogAction ("" ), human .EnumMarshalFunc (logActionMarshalSpecs ))
32
+
20
33
cmds .Merge (core .NewCommands (
21
34
initWithSSHCommand (),
22
35
))
You can’t perform that action at this time.
0 commit comments