resources

package
v0.13.0 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2020 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileResource

type FileResource struct {
	// contains filtered or unexported fields
}

func NewFileResources

func NewFileResources(file string) ([]FileResource, error)

func (FileResource) Description

func (r FileResource) Description() string

func (FileResource) Resources

func (r FileResource) Resources() ([]Resource, error)

type FileSource

type FileSource interface {
	Description() string
	Bytes() ([]byte, error)
}

type HTTPFileSource

type HTTPFileSource struct {
	// contains filtered or unexported fields
}

func NewHTTPFileSource

func NewHTTPFileSource(path string) HTTPFileSource

func (HTTPFileSource) Bytes

func (s HTTPFileSource) Bytes() ([]byte, error)

func (HTTPFileSource) Description

func (s HTTPFileSource) Description() string

type LocalFileSource

type LocalFileSource struct {
	// contains filtered or unexported fields
}

func NewLocalFileSource

func NewLocalFileSource(path string) LocalFileSource

func (LocalFileSource) Bytes

func (s LocalFileSource) Bytes() ([]byte, error)

func (LocalFileSource) Description

func (s LocalFileSource) Description() string

type Resource

type Resource interface {
	GroupVersionResource() schema.GroupVersionResource
	Kind() string
	APIVersion() string
	APIGroup() string

	Name() string
	Description() string

	Annotations() map[string]string
	Labels() map[string]string

	Equal(res Resource) bool
	DeepCopy() Resource
	DeepCopyRaw() map[string]interface{}
	AsYAMLBytes() ([]byte, error)
	// contains filtered or unexported methods
}

func NewResourcesFromBytes

func NewResourcesFromBytes(data []byte) ([]Resource, error)

type ResourceImpl

type ResourceImpl struct {
	// contains filtered or unexported fields
}

func MustNewResourceFromBytes

func MustNewResourceFromBytes(data []byte) *ResourceImpl

func NewResourceFromBytes

func NewResourceFromBytes(data []byte) (*ResourceImpl, error)

func (*ResourceImpl) APIGroup

func (r *ResourceImpl) APIGroup() string

func (*ResourceImpl) APIVersion

func (r *ResourceImpl) APIVersion() string

func (*ResourceImpl) Annotations

func (r *ResourceImpl) Annotations() map[string]string

func (*ResourceImpl) AsYAMLBytes

func (r *ResourceImpl) AsYAMLBytes() ([]byte, error)

func (*ResourceImpl) DeepCopy

func (r *ResourceImpl) DeepCopy() Resource

func (*ResourceImpl) DeepCopyRaw

func (r *ResourceImpl) DeepCopyRaw() map[string]interface{}

func (*ResourceImpl) Description

func (r *ResourceImpl) Description() string

func (*ResourceImpl) Equal

func (r *ResourceImpl) Equal(res Resource) bool

func (*ResourceImpl) GroupVersionResource

func (r *ResourceImpl) GroupVersionResource() schema.GroupVersionResource

func (*ResourceImpl) Kind

func (r *ResourceImpl) Kind() string

func (*ResourceImpl) Labels

func (r *ResourceImpl) Labels() map[string]string

func (*ResourceImpl) Name

func (r *ResourceImpl) Name() string

func (*ResourceImpl) Namespace

func (r *ResourceImpl) Namespace() string

type StdinSource

type StdinSource struct{}

func NewStdinSource

func NewStdinSource() StdinSource

func (StdinSource) Bytes

func (s StdinSource) Bytes() ([]byte, error)

func (StdinSource) Description

func (s StdinSource) Description() string

type YAMLFile

type YAMLFile struct {
	// contains filtered or unexported fields
}

func NewYAMLFile

func NewYAMLFile(fileSrc FileSource) YAMLFile

func (YAMLFile) Docs

func (f YAMLFile) Docs() ([][]byte, error)

Jump to

Keyboard shortcuts

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