plain

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2020 License: Apache-2.0, MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DeclareDefaultVersion

func DeclareDefaultVersion(gv schema.GroupVersion)

func DefaultScheme

func DefaultScheme() *runtime.Scheme

func DefaultVersion

func DefaultVersion(g string) string

func EqualsClusterObjectKey

func EqualsClusterObjectKey(a, b ClusterObjectKey) bool

func EqualsObjectKey

func EqualsObjectKey(a, b ObjectKey) bool

func EqualsObjectName

func EqualsObjectName(a, b ObjectName) bool

func NewGroupKind

func NewGroupKind(group, kind string) schema.GroupKind

func NewObjectName

func NewObjectName(names ...string) abstract.GenericObjectName

func ParseObjectName

func ParseObjectName(name string) (abstract.GenericObjectName, error)

func Register

func Register(builders ...runtime.SchemeBuilder)

Types

type ClusterObjectKey

type ClusterObjectKey = abstract.ClusterObjectKey

func NewClusterKey

func NewClusterKey(cluster string, groupKind schema.GroupKind, namespace, name string) ClusterObjectKey

func NewClusterKeyForObject

func NewClusterKeyForObject(cluster string, key ObjectKey) ClusterObjectKey

func ParseClusterObjectKey

func ParseClusterObjectKey(clusterid string, key string) (ClusterObjectKey, error)

type ClusterObjectKeySet

type ClusterObjectKeySet = abstract.ClusterObjectKeySet

func NewClusterObjectKeSetBySets

func NewClusterObjectKeSetBySets(sets ...ClusterObjectKeySet) ClusterObjectKeySet

func NewClusterObjectKeySet

func NewClusterObjectKeySet(a ...ClusterObjectKey) ClusterObjectKeySet

func NewClusterObjectKeySetByArray

func NewClusterObjectKeySetByArray(a []ClusterObjectKey) ClusterObjectKeySet

type Decoder

type Decoder = abstract.Decoder

type GenericObjectName

type GenericObjectName = abstract.GenericObjectName

type GroupKindProvider

type GroupKindProvider = abstract.GroupKindProvider

type GroupKindSet

type GroupKindSet = abstract.GroupKindSet

func NewGroupKindSet

func NewGroupKindSet(a ...schema.GroupKind) GroupKindSet

func NewGroupKindSetByArray

func NewGroupKindSetByArray(a []schema.GroupKind) GroupKindSet

func NewGroupKindSetBySets

func NewGroupKindSetBySets(sets ...GroupKindSet) GroupKindSet

type Interface

type Interface interface {
	GroupKindProvider
	ResourcesSource

	GroupVersionKind() schema.GroupVersionKind

	Wrap(ObjectData) (Object, error)
	New(ObjectName) Object
	IsUnstructured() bool

	ObjectType() reflect.Type
	ListType() reflect.Type
}

type Internal

type Internal interface {
	Interface

	CreateData(name ...ObjectDataName) ObjectData
	CreateListData() runtime.Object
	CheckOType(obj ObjectData, unstructured ...bool) error
}

type ModificationState

type ModificationState struct {
	*abstract.ModificationState
}

func NewModificationState

func NewModificationState(object Object, mod ...bool) *ModificationState

func (*ModificationState) AssureLabel

func (this *ModificationState) AssureLabel(name, value string) *ModificationState

func (*ModificationState) Object

func (this *ModificationState) Object() Object

type Object

type Object interface {
	abstract.Object
	// runtime.ObjectData
	ResourcesSource

	DeepCopy() Object
	GetResource() Interface

	ForCluster(cluster resources.Cluster) (resources.Object, error)

	CreateIn(cluster resources.Cluster) error
	CreateOrUpdateIn(cluster resources.Cluster) error
	UpdateIn(cluster resources.Cluster) error
	ModifiyIn(cluster resources.Cluster, modifier resources.Modifier) (bool, error)
	DeleteIn(cluster resources.Cluster) error
	SetFinalizerIn(cluster resources.Cluster, key string) error
}

type ObjectData

type ObjectData = abstract.ObjectData

type ObjectDataName

type ObjectDataName = abstract.ObjectDataName

type ObjectKey

type ObjectKey = abstract.ObjectKey

func NewKey

func NewKey(groupKind schema.GroupKind, namespace, name string) ObjectKey

func NewKeyForData

func NewKeyForData(data ObjectData) ObjectKey

type ObjectMatcher

type ObjectMatcher = abstract.ObjectMatcher

type ObjectName

type ObjectName = abstract.ObjectName

func NewObjectNameForData

func NewObjectNameForData(data ObjectData) ObjectName

type ObjectNameProvider

type ObjectNameProvider = abstract.ObjectNameProvider

type ObjectNameSet

type ObjectNameSet = abstract.ObjectNameSet

func NewObjectNameSet

func NewObjectNameSet(a ...ObjectName) ObjectNameSet

func NewObjectNameSetByArray

func NewObjectNameSetByArray(a []ObjectName) ObjectNameSet

func NewObjectNameSetBySets

func NewObjectNameSetBySets(sets ...ObjectNameSet) ObjectNameSet

type ResourceContext

type ResourceContext interface {
	abstract.ResourceContext
	Resources() Resources
}

func NewResourceContext

func NewResourceContext(ctx context.Context, scheme *runtime.Scheme) ResourceContext

type Resources

type Resources interface {
	ResourcesSource

	ResourceContext() ResourceContext

	Get(spec interface{}) (Interface, error)
	GetByExample(obj runtime.Object) (Interface, error)
	GetByGK(gk schema.GroupKind) (Interface, error)
	GetByGVK(gvk schema.GroupVersionKind) (Interface, error)

	GetUnstructured(spec interface{}) (Interface, error)
	GetUnstructuredByGK(gk schema.GroupKind) (Interface, error)
	GetUnstructuredByGVK(gvk schema.GroupVersionKind) (Interface, error)

	Wrap(obj ObjectData) (Object, error)
	Decode([]byte) (Object, error)
}

type ResourcesSource

type ResourcesSource interface {
	Resources() Resources
}

Jump to

Keyboard shortcuts

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