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 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117
|
package lb_domains
type RuleMethodMType string
const (
RuleMethodMTypeEntryA RuleMethodMType = "entry_a"
RuleMethodMTypeEntryAAAA RuleMethodMType = "entry_aaaa"
RuleMethodMTypeEntryCNAME RuleMethodMType = "entry_cname"
RuleMethodMTypeExitSite RuleMethodMType = "exit_site"
RuleMethodMTypeExitSorry RuleMethodMType = "exit_sorry"
RuleMethodMTypeFailover RuleMethodMType = "exit_failover"
)
// +k8s:deepcopy-gen:interfaces=github.com/mimuret/golang-iij-dpf/pkg/apis/dpf/v1/lb_domains.RuleMethodProps
type RuleMethodPropsCommon struct {
ResourceName string `read:"resource_name" create:"resource_name" apply:"resource_name"`
MType RuleMethodMType `read:"mtype" create:"mtype" apply:"mtype"`
Enabled bool `read:"enabled" create:"enabled" update:"enabled" apply:"enabled"`
LiveStatus Status `read:"live_status"`
ReadyStatus Status `read:"ready_status"`
}
func (r *RuleMethodPropsCommon) Fix() {}
func (r *RuleMethodPropsCommon) GetMType() RuleMethodMType {
return r.MType
}
func (r *RuleMethodPropsCommon) GetMethodResourceName() string {
return r.ResourceName
}
func (r *RuleMethodPropsCommon) SetMethodResourceName(resourceName string) {
r.ResourceName = resourceName
}
var _ RuleMethodProps = &RuleMethodEntryA{}
// +k8s:deepcopy-gen:interfaces=github.com/mimuret/golang-iij-dpf/pkg/apis/dpf/v1/lb_domains.RuleMethodProps
type RuleMethodEntryA struct {
RuleMethodPropsCommon
}
func (m *RuleMethodEntryA) Fix() {
m.RuleMethodPropsCommon.MType = RuleMethodMTypeEntryA
}
var _ RuleMethodProps = &RuleMethodEntryAAAA{}
// +k8s:deepcopy-gen:interfaces=github.com/mimuret/golang-iij-dpf/pkg/apis/dpf/v1/lb_domains.RuleMethodProps
type RuleMethodEntryAAAA struct {
RuleMethodPropsCommon
}
func (m *RuleMethodEntryAAAA) Fix() {
m.RuleMethodPropsCommon.MType = RuleMethodMTypeEntryAAAA
}
var _ RuleMethodProps = &RuleMethodEntryCNAME{}
// +k8s:deepcopy-gen:interfaces=github.com/mimuret/golang-iij-dpf/pkg/apis/dpf/v1/lb_domains.RuleMethodProps
type RuleMethodEntryCNAME struct {
RuleMethodPropsCommon
}
func (m *RuleMethodEntryCNAME) Fix() {
m.RuleMethodPropsCommon.MType = RuleMethodMTypeEntryCNAME
}
var _ RuleMethodProps = &RuleMethodExitSite{}
// +k8s:deepcopy-gen:interfaces=github.com/mimuret/golang-iij-dpf/pkg/apis/dpf/v1/lb_domains.RuleMethodProps
type RuleMethodExitSite struct {
RuleMethodPropsCommon
ParentResourceName string `read:"parent_resource_name" create:"parent_resource_name" apply:"parent_resource_name"`
SiteResourceName string `read:"site_resource_name" create:"site_resource_name" apply:"site_resource_name"`
}
func (m *RuleMethodExitSite) GetParentResourceName() string {
return m.ParentResourceName
}
func (m *RuleMethodExitSite) Fix() {
m.RuleMethodPropsCommon.MType = RuleMethodMTypeExitSite
}
var _ RuleMethodProps = &RuleMethodExitSorry{}
// +k8s:deepcopy-gen:interfaces=github.com/mimuret/golang-iij-dpf/pkg/apis/dpf/v1/lb_domains.RuleMethodProps
type RuleMethodExitSorry struct {
RuleMethodPropsCommon
ParentResourceName string `read:"parent_resource_name" create:"parent_resource_name" apply:"parent_resource_name"`
}
func (m *RuleMethodExitSorry) GetParentResourceName() string {
return m.ParentResourceName
}
func (m *RuleMethodExitSorry) Fix() {
m.RuleMethodPropsCommon.MType = RuleMethodMTypeExitSorry
}
var _ RuleMethodProps = &RuleMethodFailover{}
// +k8s:deepcopy-gen:interfaces=github.com/mimuret/golang-iij-dpf/pkg/apis/dpf/v1/lb_domains.RuleMethodProps
type RuleMethodFailover struct {
RuleMethodPropsCommon
ParentResourceName string `read:"parent_resource_name" create:"parent_resource_name" apply:"parent_resource_name"`
}
func (m *RuleMethodFailover) GetParentResourceName() string {
return m.ParentResourceName
}
func (m *RuleMethodFailover) Fix() {
m.RuleMethodPropsCommon.MType = RuleMethodMTypeFailover
}
|