-
Notifications
You must be signed in to change notification settings - Fork 151
/
custom.go
28 lines (22 loc) · 1.24 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
package container
import (
"github.com/scaleway/scaleway-cli/v2/internal/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
container "github.com/scaleway/scaleway-sdk-go/api/container/v1beta1"
)
func GetCommands() *core.Commands {
cmds := GetGeneratedCommands()
human.RegisterMarshalerFunc(container.NamespaceStatus(""), human.EnumMarshalFunc(namespaceStatusMarshalSpecs))
human.RegisterMarshalerFunc(container.ContainerStatus(""), human.EnumMarshalFunc(containerStatusMarshalSpecs))
human.RegisterMarshalerFunc(container.CronStatus(""), human.EnumMarshalFunc(cronStatusMarshalSpecs))
cmds.MustFind("container", "container", "deploy").Override(containerContainerDeployBuilder)
cmds.MustFind("container", "container", "create").Override(containerContainerCreateBuilder)
cmds.MustFind("container", "container", "update").Override(containerContainerUpdateBuilder)
cmds.MustFind("container", "namespace", "create").Override(containerNamespaceCreateBuilder)
cmds.MustFind("container", "namespace", "update").Override(containerNamespaceUpdateBuilder)
cmds.MustFind("container", "namespace", "delete").Override(containerNamespaceDeleteBuilder)
if cmdDeploy := containerDeployCommand(); cmdDeploy != nil {
cmds.Add(cmdDeploy)
}
return cmds
}