operation

package
v0.0.0-...-540bb61 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 25, 2023 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Item

type Item struct {
	Operation Operation

	Group   string
	Version string
	Kind    string

	Namespace string
	Name      string
}

Item defines action in operator

func NewItem

func NewItem(operation Operation, group, version, kind, namespace, name string) (Item, error)

NewItem creates new Item

func NewItemFromObject

func NewItemFromObject(operation Operation, group, version, kind string, object meta.Object) (Item, error)

NewItemFromObject creates new item from Kubernetes Object

func NewItemFromString

func NewItemFromString(itemString string) (Item, error)

NewItemFromString creates new item from String

func (Item) String

func (i Item) String() string

func (Item) Validate

func (i Item) Validate() error

Validate item if all required fields are set

type Operation

type Operation string

Operation declares operation string representation

const (
	// Add define operation generated when object was created
	Add Operation = "ADD"
	// Update define operation generated when object was updated
	Update Operation = "UPDATE"
	// Delete define operation generated when object was deleted
	Delete Operation = "DELETE"
)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL