resource

package
v0.0.0-...-4d5a555 Latest Latest
Warning

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

Go to latest
Published: Oct 31, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Load

func Load(namespace string, base, atLeastOne string, more ...string) (map[string]resource.Resource, []string, error)

Load takes paths to directories or files, and creates an object set based on the file(s) therein. Resources are named according to the file content, rather than the file name of directory structure.

func ParseMultidoc

func ParseMultidoc(namespace string, multidoc []byte, source string) (map[string]resource.Resource, error)

ParseMultidoc takes a dump of config (a multidoc YAML) and constructs an object set from the resources represented therein.

Types

type BaseObject

type BaseObject struct {
	SourceName string
	BytesArray []byte
	Kind       string        `yaml:"kind"`
	Meta       resource.Meta `yaml:"metadata"`
}

struct to embed in objects, to provide default implementation

func (BaseObject) Bytes

func (o BaseObject) Bytes() []byte

func (BaseObject) Metas

func (o BaseObject) Metas() resource.Meta

func (BaseObject) ResourceID

func (o BaseObject) ResourceID() resource.ResourceID

func (BaseObject) Source

func (o BaseObject) Source() string

func (BaseObject) SourceKind

func (o BaseObject) SourceKind() string

type List

type List struct {
	BaseObject
	Items []resource.Resource
}

Jump to

Keyboard shortcuts

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