workspaces

package
v0.0.86 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ClearLocalConfiguration

func ClearLocalConfiguration() error

func GetRunConfig added in v0.0.47

func GetRunConfig(cfg api.Config, workspace Manifest) (types.RunConfig, error)

GetRunConfig loads the effective run config for a workspace This does the following:

  1. Pull the latest run config for the workspace
  2. Scan module in local file system for `ns_connection` that have not been added to run config

func HasLocalConfigured

func HasLocalConfigured() bool

func Init

func Init(ctx context.Context) error

func ScanLocal added in v0.0.47

func ScanLocal(dir string) (*config.Manifest, error)

ScanLocal scans the working directory to build a module manifest This is useful if a user is actively making changes to a module that have not been published

func Select added in v0.0.47

func Select(ctx context.Context, cfg api.Config, workspace Manifest, runConfig types.RunConfig) error

func WriteBackendTf

func WriteBackendTf(cfg api.Config, workspaceUid string, filename string) error

Types

type CapabilitiesGenerator added in v0.0.47

type CapabilitiesGenerator struct {
	RegistryAddress  string
	Manifest         Manifest
	TemplateFilename string
	TargetFilename   string
}

func (CapabilitiesGenerator) Generate added in v0.0.47

func (g CapabilitiesGenerator) Generate(runConfig types.RunConfig) error

func (CapabilitiesGenerator) ShouldGenerate added in v0.0.47

func (g CapabilitiesGenerator) ShouldGenerate() bool

type Manifest

type Manifest struct {
	OrgName string `json:"orgName" yaml:"org_name"`

	StackId   int64  `json:"stackId" yaml:"stack_id"`
	StackName string `json:"stackName" yaml:"stack_name"`

	BlockId   int64  `json:"blockId" yaml:"block_id"`
	BlockName string `json:"blockName" yaml:"block_name"`
	BlockRef  string `json:"blockRef" yaml:"block_ref"`

	EnvId   int64  `json:"envId" yaml:"env_id"`
	EnvName string `json:"envName" yaml:"env_name"`

	WorkspaceUid string `json:"workspaceUid" yaml:"workspace_uid"`

	CapabilityId int64 `json:"capabilityId,omitempty" yaml:"capability_id,omitempty"`

	Connections ManifestConnections `json:"connections" yaml:"connections"`
}

func (Manifest) WriteToFile

func (m Manifest) WriteToFile(filename string) error

type ManifestConnectionTarget added in v0.0.46

type ManifestConnectionTarget struct {
	StackId   int64  `json:"stackId" yaml:"stack_id"`
	BlockId   int64  `json:"blockId" yaml:"block_id"`
	BlockName string `json:"blockName" yaml:"block_name"`
	EnvId     *int64 `json:"envId,omitempty" yaml:"env_id,omitempty"`
}

type ManifestConnections added in v0.0.46

type ManifestConnections map[string]ManifestConnectionTarget

Jump to

Keyboard shortcuts

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