common

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddonGVR

func AddonGVR() schema.GroupVersionResource

AddonGVR returns the schema representation of the addon resource

func CRDGVR

CRDGVR returns the schema representation for customresourcedefinitions

func ContainsString

func ContainsString(slice []string, s string) bool

ContainsString helper function to check string in a slice of strings.

func FromUnstructured added in v0.5.0

func FromUnstructured(un *unstructured.Unstructured) (*addonv1.Addon, error)

func FromUnstructuredObj added in v0.5.0

func FromUnstructuredObj(un *unstructured.Unstructured, v interface{}) error

FromUnstructuredObj convert unstructured to objects

func GetAddonMgrScheme added in v0.5.0

func GetAddonMgrScheme() *runtime.Scheme

func GetCurretTimestamp added in v0.1.0

func GetCurretTimestamp() int64

GetCurretTimestamp -- get current timestamp in millisecond

func IsExpired added in v0.1.0

func IsExpired(startTime int64, ttlTime int64) bool

IsExpired --- check if reached ttl time

func NewAddonClient added in v0.5.0

func NewAddonClient(cfg *rest.Config) addonv1versioned.Interface

NewAddonClient - declare new addon client

func NewWFClient added in v0.5.0

func NewWFClient(cfg *rest.Config) wfv1versioned.Interface

NewWFClient -- declare new workflow client

func NewWorkflowInformer added in v0.5.0

func NewWorkflowInformer(dclient dynamic.Interface, ns string, resyncPeriod time.Duration) cache.SharedIndexInformer

func RemoveString

func RemoveString(slice []string, s string) (result []string)

RemoveString helper function to remove a string in a slice of strings.

func SecretGVR

func SecretGVR() schema.GroupVersionResource

SecretGVR returns the schema representation of the secret resource

func ToUnstructured added in v0.5.0

func ToUnstructured(wf *wfv1.Workflow) (*unstructured.Unstructured, error)

ToUnstructured converts an workflow to an Unstructured object

func WorkFlowFromUnstructured added in v0.5.0

func WorkFlowFromUnstructured(un *unstructured.Unstructured) (*wfv1.Workflow, error)

func WorkflowGVR

func WorkflowGVR() schema.GroupVersionResource

WorkflowGVR returns the schema representation of the workflow resource

func WorkflowType

func WorkflowType() *unstructured.Unstructured

WorkflowType return an unstructured workflow type object

Types

type Validator

type Validator interface {
	Validate() (bool, error)
	ValidateDependencies() error
}

Validator is a common interface for validators

Jump to

Keyboard shortcuts

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