Documentation
¶
Index ¶
- func DeleteSliceElement[E comparable](s []E, elem E) []E
- func GetAnnotationsAnnotation(o Metadata, key string) (map[string]string, error)
- func GetLabelsAnnotation(o Metadata, key string) (map[string]string, error)
- func SetAnnotationsAnnotation(o Object, key string, annotations map[string]string) error
- func SetLabelsAnnotation(o Object, key string, labels map[string]string) error
- func Zero[E any]() E
- type Metadata
- func (m *Metadata) GetAnnotations() map[string]string
- func (m *Metadata) GetCreatedAt() time.Time
- func (m *Metadata) GetDeletedAt() *time.Time
- func (m *Metadata) GetFinalizers() []string
- func (m *Metadata) GetGeneration() int64
- func (m *Metadata) GetID() string
- func (m *Metadata) GetLabels() map[string]string
- func (m *Metadata) GetResourceVersion() uint64
- func (m *Metadata) IncrementResourceVersion()
- func (m *Metadata) SetAnnotations(annotations map[string]string)
- func (m *Metadata) SetCreatedAt(createdAt time.Time)
- func (m *Metadata) SetDeletedAt(deleted *time.Time)
- func (m *Metadata) SetFinalizers(finalizers []string)
- func (m *Metadata) SetGeneration(generation int64)
- func (m *Metadata) SetID(id string)
- func (m *Metadata) SetLabels(labels map[string]string)
- type Object
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeleteSliceElement ¶
func DeleteSliceElement[E comparable](s []E, elem E) []E
func GetLabelsAnnotation ¶
func SetLabelsAnnotation ¶
Types ¶
type Metadata ¶
type Metadata struct {
ID string `json:"id"`
Annotations map[string]string `json:"annotations"`
Labels map[string]string `json:"labels"`
CreatedAt time.Time `json:"createdAt"`
DeletedAt *time.Time `json:"deletedAt,omitempty"`
Generation int64 `json:"generation"`
ResourceVersion uint64 `json:"resourceVersion"`
Finalizers []string `json:"finalizers,omitempty"`
}
func (*Metadata) GetAnnotations ¶
func (*Metadata) GetCreatedAt ¶
func (*Metadata) GetDeletedAt ¶
func (*Metadata) GetFinalizers ¶
func (*Metadata) GetGeneration ¶
func (*Metadata) GetResourceVersion ¶
func (*Metadata) IncrementResourceVersion ¶
func (m *Metadata) IncrementResourceVersion()
func (*Metadata) SetAnnotations ¶
func (*Metadata) SetCreatedAt ¶
func (*Metadata) SetDeletedAt ¶
func (*Metadata) SetFinalizers ¶
func (*Metadata) SetGeneration ¶
type Object ¶
type Object interface {
GetID() string
GetAnnotations() map[string]string
GetLabels() map[string]string
GetCreatedAt() time.Time
GetDeletedAt() *time.Time
GetGeneration() int64
GetFinalizers() []string
GetResourceVersion() uint64
SetID(id string)
SetAnnotations(annotations map[string]string)
SetLabels(labels map[string]string)
SetCreatedAt(createdAt time.Time)
SetDeletedAt(deleted *time.Time)
SetGeneration(generation int64)
SetFinalizers(finalizers []string)
IncrementResourceVersion()
}
Click to show internal directories.
Click to hide internal directories.