Documentation ¶
Index ¶
- func ConvertStatusCondition(in *unikornv1.Condition) openapi.ResourceProvisioningStatus
- func OrganizationScopedResourceReadMetadata(in metav1.Object, status openapi.ResourceProvisioningStatus) openapi.OrganizationScopedResourceReadMetadata
- func ProjectScopedResourceReadMetadata(in metav1.Object, status openapi.ResourceProvisioningStatus) openapi.ProjectScopedResourceReadMetadata
- func ResourceReadMetadata(in metav1.Object, status openapi.ResourceProvisioningStatus) openapi.ResourceReadMetadata
- func UpdateObjectMetadata(out, in metav1.Object)
- type ObjectMetadata
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertStatusCondition ¶
func ConvertStatusCondition(in *unikornv1.Condition) openapi.ResourceProvisioningStatus
ConvertStatusCondition translates from Kubernetes status conditions to API ones.
func OrganizationScopedResourceReadMetadata ¶
func OrganizationScopedResourceReadMetadata(in metav1.Object, status openapi.ResourceProvisioningStatus) openapi.OrganizationScopedResourceReadMetadata
OrganizationScopedResourceReadMetadata extracts organization scoped metdata from a resource for GET APIS.
func ProjectScopedResourceReadMetadata ¶
func ProjectScopedResourceReadMetadata(in metav1.Object, status openapi.ResourceProvisioningStatus) openapi.ProjectScopedResourceReadMetadata
ProjectScopedResourceReadMetadata extracts project scoped metdata from a resource for GET APIs.
func ResourceReadMetadata ¶
func ResourceReadMetadata(in metav1.Object, status openapi.ResourceProvisioningStatus) openapi.ResourceReadMetadata
ResourceReadMetadata extracts generic metadata from a resource for GET APIs.
func UpdateObjectMetadata ¶
UpdateObjectMetadata abstracts away metadata updates e.g. name and description changes.
Types ¶
type ObjectMetadata ¶
type ObjectMetadata struct {
// contains filtered or unexported fields
}
ObjectMetadata implements a builder pattern.
func NewObjectMetadata ¶
func NewObjectMetadata(metadata *openapi.ResourceWriteMetadata, namespace string) *ObjectMetadata
NewObjectMetadata requests the bare minimum to build an object metadata object.
func (*ObjectMetadata) Get ¶
func (o *ObjectMetadata) Get(ctx context.Context) metav1.ObjectMeta
Get renders the object metadata ready for inclusion into a Kubernetes resource.
func (*ObjectMetadata) WithLabel ¶
func (o *ObjectMetadata) WithLabel(key, value string) *ObjectMetadata
WithLabel allows non-generic labels to be attached to a resource.
func (*ObjectMetadata) WithOrganization ¶
func (o *ObjectMetadata) WithOrganization(id string) *ObjectMetadata
WithOrganization adds an organization for scoped resources.
func (*ObjectMetadata) WithProject ¶
func (o *ObjectMetadata) WithProject(id string) *ObjectMetadata
WithProject adds a project for scoped resources.