-
Notifications
You must be signed in to change notification settings - Fork 23
/
meta.go
75 lines (55 loc) · 1.45 KB
/
meta.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
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
package compdesc
import (
"time"
metav1 "github.com/open-component-model/ocm/pkg/contexts/ocm/compdesc/meta/v1"
)
type (
ObjectMeta = metav1.ObjectMeta
Timestamp = metav1.Timestamp
Provider = metav1.Provider
ProviderName = metav1.ProviderName
Labels = metav1.Labels
Label = metav1.Label
LabelOption = metav1.LabelOption
Identity = metav1.Identity
DigestSpec = metav1.DigestSpec
ResourceRelation = metav1.ResourceRelation
Signatures = metav1.Signatures
Signature = metav1.Signature
SignatureSpec = metav1.SignatureSpec
)
const (
LocalRelation = metav1.LocalRelation
ExternalRelation = metav1.ExternalRelation
NoDigest = metav1.NoDigest
)
func NewIdentity(name string, extras ...string) Identity {
return metav1.NewIdentity(name, extras...)
}
func NewExtraIdentity(extras ...string) Identity {
return metav1.NewExtraIdentity(extras...)
}
func IsIdentity(s string) bool {
return metav1.IsIdentity(s)
}
func WithSigning(b ...bool) {
metav1.WithSigning(b...)
}
func WithVersion(v string) {
metav1.WithVersion(v)
}
func NewExcludeFromSignatureDigest() *DigestSpec {
return metav1.NewExcludeFromSignatureDigest()
}
func NewTimestamp() Timestamp {
return metav1.NewTimestamp()
}
func NewTimestampP() *Timestamp {
return metav1.NewTimestampP()
}
func NewTimestampFor(t time.Time) Timestamp {
return metav1.NewTimestampFor(t)
}
func NewTimestampPFor(t time.Time) *Timestamp {
return metav1.NewTimestampPFor(t)
}