-
Notifications
You must be signed in to change notification settings - Fork 151
/
custom_hosting.go
27 lines (23 loc) · 1.11 KB
/
custom_hosting.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
package webhosting
import (
"github.com/fatih/color"
"github.com/scaleway/scaleway-cli/v2/internal/human"
webhosting "github.com/scaleway/scaleway-sdk-go/api/webhosting/v1alpha1"
)
var (
hostingStatusMarshalSpecs = human.EnumMarshalSpecs{
webhosting.HostingStatusDeleting: &human.EnumMarshalSpec{Attribute: color.FgBlue},
webhosting.HostingStatusDelivering: &human.EnumMarshalSpec{Attribute: color.FgBlue},
webhosting.HostingStatusError: &human.EnumMarshalSpec{Attribute: color.FgRed},
webhosting.HostingStatusLocked: &human.EnumMarshalSpec{Attribute: color.FgRed},
webhosting.HostingStatusReady: &human.EnumMarshalSpec{Attribute: color.FgGreen},
}
hostingDNSMarshalSpecs = human.EnumMarshalSpecs{
webhosting.HostingDNSStatusValid: &human.EnumMarshalSpec{Attribute: color.FgGreen},
webhosting.HostingDNSStatusInvalid: &human.EnumMarshalSpec{Attribute: color.FgRed},
}
nameserverMarshalSpecs = human.EnumMarshalSpecs{
webhosting.NameserverStatusValid: &human.EnumMarshalSpec{Attribute: color.FgGreen},
webhosting.NameserverStatusInvalid: &human.EnumMarshalSpec{Attribute: color.FgRed},
}
)