resources

package
v0.28.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BytesSource added in v0.22.0

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

func NewBytesSource added in v0.22.0

func NewBytesSource(bs []byte) BytesSource

func (BytesSource) Bytes added in v0.22.0

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

func (BytesSource) Description added in v0.22.0

func (s BytesSource) Description() string

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 Path added in v0.21.0

type Path []*PathPart

func NewPathFromInterfaces added in v0.21.0

func NewPathFromInterfaces(parts []interface{}) Path

func NewPathFromStrings added in v0.21.0

func NewPathFromStrings(strs []string) Path

func (Path) AsString added in v0.21.0

func (p Path) AsString() string

func (Path) AsStrings added in v0.21.0

func (p Path) AsStrings() []string

func (Path) ContainsNonMapKeys added in v0.21.0

func (p Path) ContainsNonMapKeys() bool

func (Path) HasMatchingSuffix added in v0.21.0

func (p Path) HasMatchingSuffix(ending Path) bool

func (Path) MarshalJSON added in v0.21.0

func (p Path) MarshalJSON() ([]byte, error)

func (Path) Matches added in v0.21.0

func (p Path) Matches(p2 Path) bool

type PathPart added in v0.21.0

type PathPart struct {
	MapKey     *string             `json:"mapKey,omitempty"`
	ArrayIndex *PathPartArrayIndex `json:"arrayIndex,omitempty"`
}

func NewPathPartFromIndex added in v0.21.0

func NewPathPartFromIndex(i int) *PathPart

func NewPathPartFromIndexAll added in v0.21.0

func NewPathPartFromIndexAll() *PathPart

func NewPathPartFromString added in v0.21.0

func NewPathPartFromString(str string) *PathPart

func (*PathPart) AsString added in v0.21.0

func (p *PathPart) AsString() string

func (*PathPart) Matches added in v0.21.0

func (p *PathPart) Matches(p2 *PathPart) bool

func (*PathPart) UnmarshalJSON added in v0.21.0

func (p *PathPart) UnmarshalJSON(data []byte) error

type PathPartArrayIndex added in v0.21.0

type PathPartArrayIndex struct {
	Index *int  `json:"index,omitempty"`
	All   *bool `json:"allIndexes,omitempty"`
}

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