format

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Factory

func Factory(name string, settings *print.Settings) (print.Format, error)

Factory initializes and returns the conceret implementation of print.Format based on the provided 'name', for example for name of 'json' it will return '*format.JSON' through 'format.NewJSON' function.

Types

type AsciidocDocument

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

AsciidocDocument represents AsciiDoc Document format.

func NewAsciidocDocument

func NewAsciidocDocument(settings *print.Settings) *AsciidocDocument

NewAsciidocDocument returns new instance of AsciidocDocument.

func (*AsciidocDocument) Print

func (d *AsciidocDocument) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as AsciiDoc document.

type AsciidocTable

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

AsciidocTable represents AsciiDoc Table format.

func NewAsciidocTable

func NewAsciidocTable(settings *print.Settings) *AsciidocTable

NewAsciidocTable returns new instance of AsciidocTable.

func (*AsciidocTable) Print

func (t *AsciidocTable) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as AsciiDoc tables.

type Document

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

Document represents Markdown Document format.

func NewDocument

func NewDocument(settings *print.Settings) *Document

NewDocument returns new instance of Document.

func (*Document) Print

func (d *Document) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as Markdown document.

type JSON

type JSON struct{}

JSON represents JSON format.

func NewJSON

func NewJSON(settings *print.Settings) *JSON

NewJSON returns new instance of JSON.

func (*JSON) Print

func (j *JSON) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as json.

type Pretty

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

Pretty represents colorized pretty format.

func NewPretty

func NewPretty(settings *print.Settings) *Pretty

NewPretty returns new instance of Pretty.

func (*Pretty) Print

func (p *Pretty) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module document.

type TOML

type TOML struct{}

TOML represents TOML format.

func NewTOML

func NewTOML(settings *print.Settings) *TOML

NewTOML returns new instance of TOML.

func (*TOML) Print

func (t *TOML) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as toml.

type Table

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

Table represents Markdown Table format.

func NewTable

func NewTable(settings *print.Settings) *Table

NewTable returns new instance of Table.

func (*Table) Print

func (t *Table) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as Markdown tables.

type TfvarsHCL

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

TfvarsHCL represents Terraform tfvars HCL format.

func NewTfvarsHCL

func NewTfvarsHCL(settings *print.Settings) *TfvarsHCL

NewTfvarsHCL returns new instance of TfvarsHCL.

func (*TfvarsHCL) Print

func (h *TfvarsHCL) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as Terraform tfvars HCL document.

type TfvarsJSON

type TfvarsJSON struct{}

TfvarsJSON represents Terraform tfvars JSON format.

func NewTfvarsJSON

func NewTfvarsJSON(settings *print.Settings) *TfvarsJSON

NewTfvarsJSON returns new instance of TfvarsJSON.

func (*TfvarsJSON) Print

func (j *TfvarsJSON) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as Terraform tfvars JSON document.

type XML

type XML struct{}

XML represents XML format.

func NewXML

func NewXML(settings *print.Settings) *XML

NewXML returns new instance of XML.

func (*XML) Print

func (x *XML) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as xml.

type YAML

type YAML struct{}

YAML represents YAML format.

func NewYAML

func NewYAML(settings *print.Settings) *YAML

NewYAML returns new instance of YAML.

func (*YAML) Print

func (y *YAML) Print(module *tfconf.Module, settings *print.Settings) (string, error)

Print prints a Terraform module as yaml.

Jump to

Keyboard shortcuts

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