mirror of
https://github.com/k3s-io/kubernetes.git
synced 2026-01-05 15:37:24 +00:00
Use a strong type for UID fields
This commit is contained in:
@@ -18,6 +18,7 @@ package meta
|
||||
|
||||
import (
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/runtime"
|
||||
"github.com/GoogleCloudPlatform/kubernetes/pkg/util"
|
||||
)
|
||||
|
||||
// VersionInterfaces contains the interfaces one should use for dealing with types of a particular version.
|
||||
@@ -36,8 +37,8 @@ type Interface interface {
|
||||
SetNamespace(namespace string)
|
||||
Name() string
|
||||
SetName(name string)
|
||||
UID() string
|
||||
SetUID(uid string)
|
||||
UID() util.UID
|
||||
SetUID(uid util.UID)
|
||||
APIVersion() string
|
||||
SetAPIVersion(version string)
|
||||
Kind() string
|
||||
@@ -71,8 +72,8 @@ type MetadataAccessor interface {
|
||||
Name(obj runtime.Object) (string, error)
|
||||
SetName(obj runtime.Object, name string) error
|
||||
|
||||
UID(obj runtime.Object) (string, error)
|
||||
SetUID(obj runtime.Object, uid string) error
|
||||
UID(obj runtime.Object) (util.UID, error)
|
||||
SetUID(obj runtime.Object, uid util.UID) error
|
||||
|
||||
SelfLink(obj runtime.Object) (string, error)
|
||||
SetSelfLink(obj runtime.Object, selfLink string) error
|
||||
|
||||
Reference in New Issue
Block a user