resources

package
v0.13.8-patch1 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2020 License: Apache-2.0 Imports: 8 Imported by: 99

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Kind

func Kind(resource Resource) string

func MetadataCompare added in v0.11.4

func MetadataCompare(metai, metaj core.Metadata) int

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 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) Len added in v0.11.4

func (list InputResourceList) Len() int

func (InputResourceList) Less added in v0.11.4

func (list InputResourceList) Less(i, j int) bool

func (InputResourceList) Names

func (list InputResourceList) Names() []string

func (InputResourceList) Namespaces

func (list InputResourceList) Namespaces() []string

func (InputResourceList) Swap added in v0.11.4

func (list InputResourceList) Swap(i, j int)

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) Len added in v0.11.4

func (list ResourceList) Len() int

func (ResourceList) Less added in v0.11.4

func (list ResourceList) Less(i, j int) bool

func (ResourceList) Names

func (list ResourceList) Names() []string

func (ResourceList) Namespaces

func (list ResourceList) Namespaces() []string

func (ResourceList) Sort

func (list ResourceList) Sort() ResourceList

func (ResourceList) Swap added in v0.11.4

func (list ResourceList) Swap(i, j int)

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