util

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Dec 22, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DataSourceSchemaWrap added in v0.3.0

func DataSourceSchemaWrap(s map[string]*schema.Schema) map[string]*schema.Schema

func HasDeleted added in v0.6.0

func HasDeleted(events watch.Interface) bool

func If

func If(condition bool, trueVal, falseVal interface{}) interface{}

func IsValidName

func IsValidName(i interface{}, k string) ([]string, []error)

func MapMerge added in v0.6.0

func MapMerge(dst map[string]string, prefix string, values map[string]interface{}) map[string]string

func NamespacedSchemaWrap

func NamespacedSchemaWrap(s map[string]*schema.Schema, system bool)

func NewObjectMeta

func NewObjectMeta(namespace, name string) metav1.ObjectMeta

func NonNamespacedSchemaWrap

func NonNamespacedSchemaWrap(s map[string]*schema.Schema)

func ResourceConstruct

func ResourceConstruct(d *schema.ResourceData, c Constructor) (interface{}, error)

func ResourceStatesSet

func ResourceStatesSet(d *schema.ResourceData, getter *importer.StateGetter) error

func WatchOptions added in v0.6.0

func WatchOptions(name string, timeoutSeconds int64) metav1.ListOptions

Types

type Constructor

type Constructor interface {
	Setup() Processors
	Result() (interface{}, error)
	Validate() error
}

type Processor

type Processor struct {
	Parser   func(interface{}) error
	Field    string
	Required bool
}

type Processors

type Processors []Processor

func NewProcessors

func NewProcessors() Processors

func (Processors) Bool

func (p Processors) Bool(key string, dst *bool, required bool) Processors

func (Processors) Description

func (p Processors) Description(annotations *map[string]string) Processors

func (Processors) String

func (p Processors) String(key string, dst *string, required bool) Processors

func (Processors) Tags

func (p Processors) Tags(labels *map[string]string) Processors

Jump to

Keyboard shortcuts

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