-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Tamal Saha <tamal@appscode.com>
- Loading branch information
Showing
20 changed files
with
175 additions
and
608 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,108 @@ | ||
package v1 | ||
|
||
import ( | ||
v1 "k8s.io/api/core/v1" | ||
metav1 "k8s.io/apimachinery/pkg/apis/meta/v1" | ||
"k8s.io/apimachinery/pkg/types" | ||
) | ||
|
||
func (obj *ObjectMeta) GetObjectMeta() metav1.Object { return obj } | ||
|
||
// Namespace implements metav1.Object for any object with an ObjectMeta typed field. Allows | ||
// fast, direct access to metadata fields for API objects. | ||
func (meta *ObjectMeta) GetNamespace() string { return meta.Namespace } | ||
func (meta *ObjectMeta) SetNamespace(namespace string) { meta.Namespace = namespace } | ||
func (meta *ObjectMeta) GetName() string { return meta.Name } | ||
func (meta *ObjectMeta) SetName(name string) { meta.Name = name } | ||
func (meta *ObjectMeta) GetGenerateName() string { return meta.GenerateName } | ||
func (meta *ObjectMeta) SetGenerateName(generateName string) { meta.GenerateName = generateName } | ||
func (meta *ObjectMeta) GetUID() types.UID { return meta.UID } | ||
func (meta *ObjectMeta) SetUID(uid types.UID) { meta.UID = uid } | ||
func (meta *ObjectMeta) GetResourceVersion() string { return meta.ResourceVersion } | ||
func (meta *ObjectMeta) SetResourceVersion(version string) { meta.ResourceVersion = version } | ||
func (meta *ObjectMeta) GetGeneration() int64 { return meta.Generation } | ||
func (meta *ObjectMeta) SetGeneration(generation int64) { meta.Generation = generation } | ||
func (meta *ObjectMeta) GetSelfLink() string { return meta.SelfLink } | ||
func (meta *ObjectMeta) SetSelfLink(selfLink string) { meta.SelfLink = selfLink } | ||
func (meta *ObjectMeta) GetCreationTimestamp() metav1.Time { return meta.CreationTimestamp } | ||
func (meta *ObjectMeta) SetCreationTimestamp(creationTimestamp metav1.Time) { | ||
meta.CreationTimestamp = creationTimestamp | ||
} | ||
func (meta *ObjectMeta) GetDeletionTimestamp() *metav1.Time { return meta.DeletionTimestamp } | ||
func (meta *ObjectMeta) SetDeletionTimestamp(deletionTimestamp *metav1.Time) { | ||
meta.DeletionTimestamp = deletionTimestamp | ||
} | ||
|
||
func (meta *ObjectMeta) GetDeletionGracePeriodSeconds() *int64 { | ||
return meta.DeletionGracePeriodSeconds | ||
} | ||
|
||
func (meta *ObjectMeta) SetDeletionGracePeriodSeconds(deletionGracePeriodSeconds *int64) { | ||
meta.DeletionGracePeriodSeconds = deletionGracePeriodSeconds | ||
} | ||
func (meta *ObjectMeta) GetLabels() map[string]string { return meta.Labels } | ||
func (meta *ObjectMeta) SetLabels(labels map[string]string) { meta.Labels = labels } | ||
func (meta *ObjectMeta) GetAnnotations() map[string]string { return meta.Annotations } | ||
func (meta *ObjectMeta) SetAnnotations(annotations map[string]string) { meta.Annotations = annotations } | ||
func (meta *ObjectMeta) GetFinalizers() []string { return meta.Finalizers } | ||
func (meta *ObjectMeta) SetFinalizers(finalizers []string) { meta.Finalizers = finalizers } | ||
func (meta *ObjectMeta) GetOwnerReferences() []metav1.OwnerReference { return meta.OwnerReferences } | ||
func (meta *ObjectMeta) SetOwnerReferences(references []metav1.OwnerReference) { | ||
meta.OwnerReferences = references | ||
} | ||
func (meta *ObjectMeta) GetManagedFields() []metav1.ManagedFieldsEntry { return meta.ManagedFields } | ||
func (meta *ObjectMeta) SetManagedFields(managedFields []metav1.ManagedFieldsEntry) { | ||
meta.ManagedFields = managedFields | ||
} | ||
|
||
func (meta *ObjectMeta) ToAPI() metav1.ObjectMeta { | ||
return metav1.ObjectMeta{ | ||
Name: meta.Name, | ||
GenerateName: meta.GenerateName, | ||
Namespace: meta.Namespace, | ||
SelfLink: meta.SelfLink, | ||
UID: meta.UID, | ||
ResourceVersion: meta.ResourceVersion, | ||
Generation: meta.Generation, | ||
CreationTimestamp: meta.CreationTimestamp, | ||
DeletionTimestamp: meta.DeletionTimestamp, | ||
DeletionGracePeriodSeconds: meta.DeletionGracePeriodSeconds, | ||
Labels: meta.Labels, | ||
Annotations: meta.Annotations, | ||
OwnerReferences: meta.OwnerReferences, | ||
Finalizers: meta.Finalizers, | ||
ManagedFields: meta.ManagedFields, | ||
} | ||
} | ||
|
||
func (meta *ObjectMeta) FromAPI(other metav1.ObjectMeta) { | ||
meta.Name = other.Name | ||
meta.GenerateName = other.GenerateName | ||
meta.Namespace = other.Namespace | ||
meta.SelfLink = other.SelfLink | ||
meta.UID = other.UID | ||
meta.ResourceVersion = other.ResourceVersion | ||
meta.Generation = other.Generation | ||
meta.CreationTimestamp = other.CreationTimestamp | ||
meta.DeletionTimestamp = other.DeletionTimestamp | ||
meta.DeletionGracePeriodSeconds = other.DeletionGracePeriodSeconds | ||
meta.Labels = other.Labels | ||
meta.Annotations = other.Annotations | ||
meta.OwnerReferences = other.OwnerReferences | ||
meta.Finalizers = other.Finalizers | ||
meta.ManagedFields = other.ManagedFields | ||
} | ||
|
||
func (meta *PersistentVolumeClaim) ToAPI() v1.PersistentVolumeClaim { | ||
return v1.PersistentVolumeClaim{ | ||
ObjectMeta: meta.ObjectMeta.ToAPI(), | ||
Spec: meta.Spec, | ||
Status: meta.Status, | ||
} | ||
} | ||
|
||
func (meta *PersistentVolumeClaim) FromAPI(other v1.PersistentVolumeClaim) { | ||
meta.ObjectMeta.FromAPI(other.ObjectMeta) | ||
meta.Spec = other.Spec | ||
meta.Status = other.Status | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
client/clientset/versioned/typed/apps/v1/fake/fake_apps_client.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
141 changes: 0 additions & 141 deletions
141
client/clientset/versioned/typed/apps/v1/fake/fake_persistentvolumeclaim.go
This file was deleted.
Oops, something went wrong.
2 changes: 0 additions & 2 deletions
2
client/clientset/versioned/typed/apps/v1/generated_expansion.go
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.