command

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2026 License: MPL-2.0 Imports: 40 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetParentType added in v0.5.0

func GetParentType(resourceType string) string

func LastSegment added in v0.5.0

func LastSegment(input string) string

func NormalizeObject added in v0.5.0

func NormalizeObject(input interface{}) interface{}

func ParseResourceJson added in v0.5.0

func ParseResourceJson(content string) (*hclwrite.Block, error)

Types

type ARMTemplateModel added in v0.5.0

type ARMTemplateModel struct {
	Schema         string                               `json:"$schema"`
	ContentVersion string                               `json:"contentVersion"`
	Parameters     map[string]ARMTemplateParameterModel `json:"parameters"`
	Variables      interface{}                          `json:"variables"`
	Resources      []map[string]interface{}             `json:"resources"`
}

type ARMTemplateParameterModel added in v0.5.0

type ARMTemplateParameterModel struct {
	DefaultValue string `json:"defaultValue"`
	Type         string `json:"type"`
}

type AztfAuthorizeCommand

type AztfAuthorizeCommand struct{}

func (AztfAuthorizeCommand) Handle

func (c AztfAuthorizeCommand) Handle(ctx context.Context, arguments []json.RawMessage) (interface{}, error)

type AztfMigrateCommand added in v0.5.0

type AztfMigrateCommand struct{}

func (AztfMigrateCommand) Handle added in v0.5.0

func (c AztfMigrateCommand) Handle(ctx context.Context, arguments []json.RawMessage) (interface{}, error)

type CommandArgs

type CommandArgs map[string]interface{}

func ParseCommandArgs

func ParseCommandArgs(arguments []json.RawMessage) CommandArgs

func (CommandArgs) GetBool

func (c CommandArgs) GetBool(variable string) (bool, bool)

func (CommandArgs) GetNumber

func (c CommandArgs) GetNumber(variable string) (float64, bool)

func (CommandArgs) GetString

func (c CommandArgs) GetString(variable string) (string, bool)

type CommandHandler

type CommandHandler interface {
	Handle(ctx context.Context, params []json.RawMessage) (interface{}, error)
}

type Context added in v0.5.0

type Context struct {
	File *hclwrite.File
	// contains filtered or unexported fields
}

func NewContext added in v0.5.0

func NewContext() *Context

func (*Context) AppendBlock added in v0.5.0

func (c *Context) AppendBlock(block *hclwrite.Block)

func (*Context) String added in v0.5.0

func (c *Context) String() string

type ConvertJsonCommand added in v0.5.0

type ConvertJsonCommand struct{}

func (ConvertJsonCommand) Handle added in v0.5.0

func (c ConvertJsonCommand) Handle(ctx context.Context, arguments []json.RawMessage) (interface{}, error)

type ConvertJsonResponse added in v0.5.0

type ConvertJsonResponse struct {
	HCLContent string `json:"hclcontent"`
}

type TelemetryCommand

type TelemetryCommand struct{}

func (TelemetryCommand) Handle

func (t TelemetryCommand) Handle(ctx context.Context, arguments []json.RawMessage) (interface{}, error)

Jump to

Keyboard shortcuts

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