generated from dogmatiq/template-go
-
Notifications
You must be signed in to change notification settings - Fork 1
/
crd.go
47 lines (37 loc) 路 1.31 KB
/
crd.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
package crd
import (
"github.com/dogmatiq/dyad"
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
"k8s.io/apimachinery/pkg/runtime"
)
const (
// GroupName is the API group name used by Proclaim.
GroupName = "proclaim.dogmatiq.io"
// FinalizerName is the name of the finalizer used by Proclaim to ensure
// that DNS-SD services are unadvertised when they're underlying resource
// is deleted.
FinalizerName = GroupName + "/unadvertise"
// Version is the version of the API/CRDs.
Version = "v1"
)
// DNSSDServiceInstance is a resource that represents a DNS-SD service instance.
type DNSSDServiceInstance struct {
metav1.TypeMeta `json:",inline"`
metav1.ObjectMeta `json:"metadata,omitempty"`
Spec DNSSDServiceInstanceSpec `json:"spec,omitempty"`
Status DNSSDServiceInstanceStatus `json:"status,omitempty"`
}
// DeepCopyObject returns a deep clone of i.
func (i *DNSSDServiceInstance) DeepCopyObject() runtime.Object {
return dyad.Clone(i)
}
// DNSSDServiceInstanceList is a list of DNS-SD service instances.
type DNSSDServiceInstanceList struct {
metav1.TypeMeta `json:",inline"`
metav1.ListMeta `json:"metadata,omitempty"`
Items []DNSSDServiceInstance `json:"items"`
}
// DeepCopyObject returns a deep clone of l.
func (l *DNSSDServiceInstanceList) DeepCopyObject() runtime.Object {
return dyad.Clone(l)
}