cli

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2023 License: Apache-2.0 Imports: 49 Imported by: 0

Documentation

Index

Constants

View Source

Generated From https://patorjk.com/software/taag/#p=display&f=ANSI%20Shadow&t=Klotho

Variables

This section is empty.

Functions

func CloseTreeSitter

func CloseTreeSitter(result *core.CompilationResult)

func GetLanguagesUsed

func GetLanguagesUsed(result *core.CompilationResult) []core.ExecutableType

func GetResourceTypeCount

func GetResourceTypeCount(result *core.CompilationResult, cfg *config.Application) (resourceCounts []string)

func OutputAST

func OutputAST(input *core.InputFiles, outDir string) error

func OutputCapabilities

func OutputCapabilities(input *core.InputFiles, outDir string) error

func OutputResources

func OutputResources(result *core.CompilationResult, outDir string) (resourceCounts map[string]int, err error)

func SetOptions

func SetOptions(options map[string]string) error

func ShouldCheckForUpdate added in v0.6.1

func ShouldCheckForUpdate(updateStreamOverride string, defaultUpdateStream string, currVersion string) bool

Types

type Authorizer added in v0.6.3

type Authorizer interface {

	// Authorize tries to authorize the user. The LoginInfo may have content even if the error is non-nil. That means
	// that we got information from the user, but were not able to verify it. succeeds. You can use
	// that information provisionally (and specifically, in analytics) even if the error is non-nil, as long as you
	// don't rely on it for anything related to things like security or privacy.
	Authorize() (auth.LoginInfo, error)
}

type ErrorHandler

type ErrorHandler struct {
	InternalDebug bool
	Verbose       bool
	PostPrintHook func()
}

func (ErrorHandler) PrintErr

func (h ErrorHandler) PrintErr(err error)

type FlagsProvider added in v0.6.3

type FlagsProvider interface {
	SetUpCliFlags(flags *pflag.FlagSet)
}

type KlothoMain

type KlothoMain struct {
	DefaultUpdateStream string
	Version             string
	VersionQualifier    string
	PluginSetup         func(*PluginSetBuilder) error
	// Authorizer is an optional authorizer override. If this also conforms to FlagsProvider, those flags will be added.
	Authorizer Authorizer
}

func (KlothoMain) Main

func (km KlothoMain) Main()

type OptionalBool added in v0.6.3

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

OptionalBool is useful when you want to differentiate between "unset" and "false".

func (*OptionalBool) MarshalYAML added in v0.6.3

func (b *OptionalBool) MarshalYAML() (interface{}, error)

func (OptionalBool) OrDefault added in v0.6.3

func (b OptionalBool) OrDefault(defValue bool) bool

func (*OptionalBool) UnmarshalYAML added in v0.6.3

func (b *OptionalBool) UnmarshalYAML(unmarshal func(interface{}) error) error

type OptionalString added in v0.6.3

type OptionalString string

func (OptionalString) OrDefault added in v0.6.3

func (s OptionalString) OrDefault(defValue string) string

type Options

type Options struct {
	Update UpdateOptions `yaml:",omitempty"`
	UI     UIOptions     `yaml:",omitempty"`
}

func ReadOptions

func ReadOptions() (Options, error)

type PluginSetBuilder

type PluginSetBuilder struct {
	Cfg       *config.Application
	Parse     []core.Plugin
	Units     []core.Plugin
	Transform []core.Plugin
	Topology  []core.Plugin
	Infra     []core.Plugin
	// contains filtered or unexported fields
}

PluginSetBuilder is a crude "plugin dependency" helper struct for managing the order of plugins via stages. TODO improve the flexibility and expressivity to capture the real dependencies between plugins.

func (*PluginSetBuilder) AddAll

func (b *PluginSetBuilder) AddAll() error

func (*PluginSetBuilder) AddCSharp added in v0.6.2

func (b *PluginSetBuilder) AddCSharp() error

func (*PluginSetBuilder) AddExecUnit

func (b *PluginSetBuilder) AddExecUnit() error

func (*PluginSetBuilder) AddGo

func (b *PluginSetBuilder) AddGo() error

func (*PluginSetBuilder) AddJavascript

func (b *PluginSetBuilder) AddJavascript() error

func (*PluginSetBuilder) AddPostCompilation

func (b *PluginSetBuilder) AddPostCompilation() error

func (*PluginSetBuilder) AddPulumi

func (b *PluginSetBuilder) AddPulumi() error

func (*PluginSetBuilder) AddPython

func (b *PluginSetBuilder) AddPython() error

func (PluginSetBuilder) Plugins

func (b PluginSetBuilder) Plugins() []core.Plugin

type UIOptions added in v0.6.3

type UIOptions struct {
}

type UpdateOptions

type UpdateOptions struct {
	Stream OptionalString `yaml:",omitempty"`
}

Jump to

Keyboard shortcuts

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