common

package
v0.4.0-rc2 Latest Latest
Warning

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

Go to latest
Published: Mar 11, 2021 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const InsertYAMLMarkerCatName = "insertYAMLMarkers"
View Source
const RemoteStateMarkerCatName = "RemoteStateMarkers"

RemoteStateMarkerCatName - name of markers category for remote states

Variables

This section is empty.

Functions

This section is empty.

Types

type Module

type Module struct {
	FilesList map[string][]byte
	// contains filtered or unexported fields
}

Module describe cluster.dev module to deploy/destroy terraform modules.

func (*Module) Apply

func (m *Module) Apply() error

Apply module.

func (*Module) ApplyDefault

func (m *Module) ApplyDefault() error

func (*Module) ApplyOutput

func (m *Module) ApplyOutput() []byte

ApplyOutput return output of last module applying.

func (*Module) Backend

func (m *Module) Backend() project.Backend

Backend return module backend.

func (*Module) BuildCommon

func (m *Module) BuildCommon() error

func (*Module) CreateCodeDir

func (m *Module) CreateCodeDir(projectCodeDir string) error

CreateCodeDir generate all terraform code for project.

func (*Module) Dependencies

func (m *Module) Dependencies() *[]*project.Dependency

Dependencies return slice of module dependencies.

func (*Module) Destroy

func (m *Module) Destroy() error

Destroy module.

func (*Module) ExpectedOutputs

func (m *Module) ExpectedOutputs() map[string]bool

func (*Module) GetStateCommon

func (m *Module) GetStateCommon() (StateSpecCommon, error)

func (*Module) GetTemplateDriver

func (m *Module) GetTemplateDriver() (string, project.TemplateDriver)

GetTemplateDriver return template driver to add template functions into the project.

func (*Module) InfraName

func (m *Module) InfraName() string

InfraName return module infrastructure name.

func (*Module) InfraPtr

func (m *Module) InfraPtr() *project.Infrastructure

InfraPtr return ptr to module infrastructure.

func (*Module) Key

func (m *Module) Key() string

Key return uniq module index (string key for maps).

func (*Module) Markers

func (m *Module) Markers() map[string]string

func (*Module) Name

func (m *Module) Name() string

Name return module name.

func (*Module) Outputs

func (m *Module) Outputs() (string, error)

Outputs module.

func (*Module) Plan

func (m *Module) Plan() error

Plan module.

func (*Module) ProjectPtr

func (m *Module) ProjectPtr() *project.Project

ProjectPtr return ptr to module project.

func (*Module) ReadConfigCommon

func (m *Module) ReadConfigCommon(spec map[string]interface{}, infra *project.Infrastructure) error

func (*Module) RemoteStatesScanner

func (m *Module) RemoteStatesScanner(data reflect.Value, module project.Module) (reflect.Value, error)

RemoteStatesScanner - project scanner function, witch process dependencies markers in module data setted by AddRemoteStateMarker template function.

func (*Module) YamlBlockMarkerScanner

func (m *Module) YamlBlockMarkerScanner(data reflect.Value, module project.Module) (reflect.Value, error)

type StateSpecCommon

type StateSpecCommon struct {
	InfraName    string            `json:"infra_name"`
	BackendState interface{}       `json:"backend"`
	Name         string            `json:"name"`
	PreHook      *hookSpec         `json:"pre_hook,omitempty"`
	PostHook     *hookSpec         `json:"post_hook,omitempty"`
	Providers    interface{}       `json:"providers,omitempty"`
	Markers      map[string]string `json:"markers,omitempty"`
}

type TerraformTemplateDriver

type TerraformTemplateDriver struct {
}

func (*TerraformTemplateDriver) AddTemplateFunctions

func (m *TerraformTemplateDriver) AddTemplateFunctions(p *project.Project)

func (*TerraformTemplateDriver) Name

func (m *TerraformTemplateDriver) Name() string

Jump to

Keyboard shortcuts

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