-
Notifications
You must be signed in to change notification settings - Fork 151
/
custom.go
23 lines (18 loc) · 992 Bytes
/
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
package vpcgw
import (
"github.com/scaleway/scaleway-cli/v2/internal/core"
"github.com/scaleway/scaleway-cli/v2/internal/human"
"github.com/scaleway/scaleway-sdk-go/api/vpcgw/v1"
)
func GetCommands() *core.Commands {
cmds := GetGeneratedCommands()
human.RegisterMarshalerFunc(vpcgw.GatewayNetworkStatus(""), human.EnumMarshalFunc(gatewayNetworkStatusMarshalSpecs))
human.RegisterMarshalerFunc(vpcgw.GatewayStatus(""), human.EnumMarshalFunc(gatewayStatusMarshalSpecs))
human.RegisterMarshalerFunc(vpcgw.Gateway{}, gatewayMarshalerFunc)
human.RegisterMarshalerFunc(vpcgw.GatewayNetwork{}, gatewayNetworkMarshalerFunc)
cmds.MustFind("vpc-gw", "gateway-type", "list").Override(vpcgwGatewayTypeListBuilder)
cmds.MustFind("vpc-gw", "gateway", "create").Override(gatewayCreateBuilder)
cmds.MustFind("vpc-gw", "gateway-network", "create").Override(gatewayNetworkCreateBuilder)
cmds.MustFind("vpc-gw", "gateway-network", "delete").Override(gatewayNetworkDeleteBuilder)
return cmds
}