format

package
v0.0.0-...-437b0eb Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2017 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataExtractor

type DataExtractor struct {
	Kind     string "kind"
	Metadata struct {
		Name string "name"
	} "metadata"
}

DataExtractor is a type for extracting data relevant for wrap tool from serialized k8s objects

type Format

type Format interface {
	ExtractData(k8sObject string) (DataExtractor, error)
	Wrap(k8sObject string) (string, error)
	IndentLevel() int
}

Format is an interface for data formats for wrapper

type JSON

type JSON struct {
}

JSON implements format.Format interface

func (JSON) ExtractData

func (f JSON) ExtractData(k8sObject string) (DataExtractor, error)

ExtractData returns data relevant for wrap tool from serialized k8s object

func (JSON) IndentLevel

func (f JSON) IndentLevel() int

IndentLevel returns indent level for JSON format

func (JSON) Wrap

func (f JSON) Wrap(k8sObject string) (string, error)

Wrap wraps k8sObject into Definition ThirdPArtyResource

type Yaml

type Yaml struct {
}

Yaml implements format.Format interface

func (Yaml) ExtractData

func (f Yaml) ExtractData(k8sObject string) (DataExtractor, error)

ExtractData returns data relevant for wrap tool from serialized k8s object

func (Yaml) IndentLevel

func (f Yaml) IndentLevel() int

IndentLevel returns indent level for Yaml format

func (Yaml) Wrap

func (f Yaml) Wrap(k8sObject string) (string, error)

Wrap wraps k8sObject into Definition ThirdPArtyResource

Jump to

Keyboard shortcuts

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