manifest

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2020 License: Apache-2.0 Imports: 7 Imported by: 13

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type List

type List []Manifest

List of individual Manifests

func (List) String

func (m List) String() string

String returns the List as a yaml stream. In case of an error, it is returned as a string instead.

type Manifest

type Manifest map[string]interface{}

Manifest represents a Kubernetes API object. The fields `apiVersion` and `kind` are required, `metadata.name` should be present as well

func New

func New(raw map[string]interface{}) (Manifest, error)

New creates a new Manifest

func NewFromObj

func NewFromObj(raw objx.Map) (Manifest, error)

NewFromObj creates a new Manifest from an objx.Map

func (Manifest) APIVersion

func (m Manifest) APIVersion() string

APIVersion returns the version of the API this object uses

func (Manifest) Kind

func (m Manifest) Kind() string

Kind returns the kind of the API object

func (Manifest) Metadata

func (m Manifest) Metadata() Metadata

Metadata returns the metadata of this object

func (Manifest) String

func (m Manifest) String() string

String returns the Manifest in yaml representation

func (*Manifest) UnmarshalJSON

func (m *Manifest) UnmarshalJSON(data []byte) error

UnmarshalJSON validates the Manifest during json parsing

func (*Manifest) UnmarshalYAML

func (m *Manifest) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML validates the Manifest during yaml parsing

func (Manifest) Verify

func (m Manifest) Verify() error

Verify checks whether the manifest is correctly structured

type Metadata

type Metadata map[string]interface{}

Metadata is the metadata object from the Manifest

func (Metadata) Annotations

func (m Metadata) Annotations() map[string]interface{}

Annotations of the manifest

func (Metadata) HasAnnotations

func (m Metadata) HasAnnotations() bool

HasAnnotations returns whether the manifest has annotations

func (Metadata) HasLabels

func (m Metadata) HasLabels() bool

HasLabels returns whether the manifest has labels

func (Metadata) HasNamespace

func (m Metadata) HasNamespace() bool

HasNamespace returns whether the manifest has a namespace set

func (Metadata) Labels

func (m Metadata) Labels() map[string]interface{}

Labels of the manifest

func (Metadata) Name

func (m Metadata) Name() string

Name of the manifest

func (Metadata) Namespace

func (m Metadata) Namespace() string

Namespace of the manifest

type SchemaError

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

SchemaError means that some expected fields were missing

func (*SchemaError) Error

func (s *SchemaError) Error() string

Error returns the fields the manifest at the path is missing

func (*SchemaError) Missing

func (s *SchemaError) Missing(field string) bool

Missing returns whether a field is missing

func (*SchemaError) WithName

func (s *SchemaError) WithName(name string) *SchemaError

WithName inserts a path into the error message

Jump to

Keyboard shortcuts

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