common

package
v0.4.4 Latest Latest
Warning

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

Go to latest
Published: May 14, 2021 License: AGPL-3.0 Imports: 13 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 {
	// contains filtered or unexported fields
}

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

func (*Module) AddRequiredProvider

func (m *Module) AddRequiredProvider(name, source, version string)

func (*Module) Apply

func (m *Module) Apply() error

Apply module.

func (*Module) ApplyCommon

func (m *Module) ApplyCommon() 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) CodeDir

func (m *Module) CodeDir() string

CodeDir return path to module code directory.

func (*Module) CreateCodeDir

func (m *Module) CreateCodeDir() 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) FilesList

func (m *Module) FilesList() map[string][]byte

func (*Module) GetStateCommon

func (m *Module) GetStateCommon() StateSpecCommon

func (*Module) GetStateDiffCommon

func (m *Module) GetStateDiffCommon() StateSpecDiffCommon

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) InitCommon

func (m *Module) InitCommon() error

func (*Module) Key

func (m *Module) Key() string

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

func (*Module) LoadStateBase

func (m *Module) LoadStateBase(spec StateCommon, modKey string, p *project.StateProject) error

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) ReplaceRemoteStatesForDiff

func (m *Module) ReplaceRemoteStatesForDiff(in, out interface{}) error

func (*Module) YamlBlockMarkerScanner

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

type RequiredProvider

type RequiredProvider struct {
	Source  string `json:"source"`
	Version string `json:"version"`
}

type StateCommon

type StateCommon interface {
}

type StateDep

type StateDep struct {
	Infra  string `json:"infra"`
	Module string `json:"module"`
}

type StateSpecCommon

type StateSpecCommon struct {
	BackendName      string                      `json:"backend_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"`
	Dependencies     []StateDep                  `json:"dependencies,omitempty"`
	RequiredProvider map[string]RequiredProvider `json:"required_providers,omitempty"`
}

type StateSpecDiffCommon

type StateSpecDiffCommon struct {
	// BackendName string      `json:"backend_name"`
	PreHook   *hookSpec   `json:"pre_hook,omitempty"`
	PostHook  *hookSpec   `json:"post_hook,omitempty"`
	Providers interface{} `json:"providers,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