resources

package
v0.11.2 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2019 License: Apache-2.0 Imports: 9 Imported by: 99

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Key

func Key(resource Resource) string

func Kind

func Kind(resource Resource) string

func SplitKey

func SplitKey(key string) (string, string, string, error)

func UpdateListMetadata

func UpdateListMetadata(resources ResourceList, updateFunc func(meta *core.Metadata))

func UpdateMetadata

func UpdateMetadata(resource Resource, updateFunc func(meta *core.Metadata))

func UpdateStatus

func UpdateStatus(resource InputResource, updateFunc func(status *core.Status))

func Validate

func Validate(resource Resource) error

func ValidateName

func ValidateName(name string) error

Types

type CloneableResource

type CloneableResource interface {
	Resource
	Clone() Resource
}

type HashableResource

type HashableResource interface {
	Resource
	Hash() uint64
}

type InputResource

type InputResource interface {
	Resource
	GetStatus() core.Status
	SetStatus(status core.Status)
}

type InputResourceList

type InputResourceList []InputResource

func (InputResourceList) AsResourceList

func (list InputResourceList) AsResourceList() ResourceList

func (InputResourceList) Contains

func (list InputResourceList) Contains(list2 InputResourceList) bool

func (InputResourceList) Copy

func (InputResourceList) Equal

func (list InputResourceList) Equal(list2 InputResourceList) bool

func (InputResourceList) FilterByKind

func (list InputResourceList) FilterByKind(kind string) InputResourceList

func (InputResourceList) FilterByList

func (list InputResourceList) FilterByList(list2 InputResourceList) InputResourceList

func (InputResourceList) FilterByNames

func (list InputResourceList) FilterByNames(names []string) InputResourceList

func (InputResourceList) FilterByNamespaces

func (list InputResourceList) FilterByNamespaces(namespaces []string) InputResourceList

func (InputResourceList) Find

func (list InputResourceList) Find(namespace, name string) (InputResource, error)

func (InputResourceList) Names

func (list InputResourceList) Names() []string

func (InputResourceList) Namespaces

func (list InputResourceList) Namespaces() []string

type InputResourcesByKind

type InputResourcesByKind map[string]InputResourceList

func (InputResourcesByKind) Add

func (m InputResourcesByKind) Add(resource InputResource)

func (InputResourcesByKind) Get

func (InputResourcesByKind) List

type ProtoResource

type ProtoResource interface {
	Resource
	proto.Message
}

func ProtoCast

func ProtoCast(res Resource) (ProtoResource, error)

type Resource

type Resource interface {
	GetMetadata() core.Metadata
	SetMetadata(meta core.Metadata)
	Equal(that interface{}) bool
}

func Clone

func Clone(resource Resource) Resource

type ResourceList

type ResourceList []Resource

func (ResourceList) AsInputResourceList

func (list ResourceList) AsInputResourceList() InputResourceList

func (ResourceList) ByCluster

func (list ResourceList) ByCluster() map[string]ResourceList

func (ResourceList) Contains

func (list ResourceList) Contains(list2 ResourceList) bool

func (ResourceList) Copy

func (list ResourceList) Copy() ResourceList

func (ResourceList) Each

func (list ResourceList) Each(do func(resource Resource))

func (ResourceList) EachErr

func (list ResourceList) EachErr(do func(resource Resource) error) error

func (ResourceList) Equal

func (list ResourceList) Equal(list2 ResourceList) bool

func (ResourceList) FilterByKind

func (list ResourceList) FilterByKind(kind string) ResourceList

func (ResourceList) FilterByList

func (list ResourceList) FilterByList(list2 ResourceList) ResourceList

func (ResourceList) FilterByNames

func (list ResourceList) FilterByNames(names []string) ResourceList

func (ResourceList) FilterByNamespaces

func (list ResourceList) FilterByNamespaces(namespaces []string) ResourceList

func (ResourceList) Find

func (list ResourceList) Find(namespace, name string) (Resource, error)

func (ResourceList) Names

func (list ResourceList) Names() []string

func (ResourceList) Namespaces

func (list ResourceList) Namespaces() []string

func (ResourceList) Sort

func (list ResourceList) Sort() ResourceList

type ResourcesById

type ResourcesById map[string]Resource

func (ResourcesById) List

func (m ResourcesById) List() ResourceList

type ResourcesByKind

type ResourcesByKind map[string]ResourceList

func (ResourcesByKind) Add

func (m ResourcesByKind) Add(resources ...Resource)

func (ResourcesByKind) Get

func (m ResourcesByKind) Get(resource Resource) []Resource

func (ResourcesByKind) List

func (m ResourcesByKind) List() ResourceList

type VersionedResource added in v0.10.4

type VersionedResource interface {
	Resource
	GroupVersionKind() schema.GroupVersionKind
}

Directories

Path Synopsis
common

Jump to

Keyboard shortcuts

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