glaze

package module
v0.0.0-...-42efa20 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2024 License: MIT Imports: 16 Imported by: 0

README

glaze

Not even remotely ready for production use.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildEvalContext

func BuildEvalContext(variables map[string]cty.Value) *hcl.EvalContext

func CollectVariables

func CollectVariables(flaggedVariables []string) (map[string]cty.Value, error)

func ContainsDiagnostic

func ContainsDiagnostic(field string, value cty.Value, list []string) hcl.Diagnostics

func DirectoryDiagnostic

func DirectoryDiagnostic(field string, value cty.Value) hcl.Diagnostics

func ExpandPath

func ExpandPath(path string) string

ExpandPath expands the given path. If the path starts with "~/", we replace it with the absolute path to the user's home directory.

func FileDiagnostic

func FileDiagnostic(field string, value cty.Value) hcl.Diagnostics

func FileExists

func FileExists(path string) bool

func IsInsideTmux

func IsInsideTmux() bool

IsInsideTmux checks if we are inside a tmux session. We assume we are in a tmux session when the `$TMUX` environment variable is set.

func IsInstalled

func IsInstalled() (bool, string)

IsInstalled returns true if tmux is installed on the system and also returns the path to the associated binary.

func JoinWithAnd

func JoinWithAnd(choices []string) string

func JoinWithOr

func JoinWithOr(choices []string) string

func Prettier

func Prettier(values ...any)

func ResolveProfilePath

func ResolveProfilePath(profilePath string) (string, error)

func WrongAttributeDiagnostic

func WrongAttributeDiagnostic(field, have, want string) hcl.Diagnostic

Types

type DiagnosticsManager

type DiagnosticsManager struct {
	Diagnostics      hcl.Diagnostics
	DiagnosticWriter hcl.DiagnosticWriter
}

func NewDiagnosticsManager

func NewDiagnosticsManager(filePath string) *DiagnosticsManager

func (*DiagnosticsManager) Append

func (dm *DiagnosticsManager) Append(diag *hcl.Diagnostic) hcl.Diagnostics

func (*DiagnosticsManager) Extend

func (dm *DiagnosticsManager) Extend(diags hcl.Diagnostics) hcl.Diagnostics

func (*DiagnosticsManager) HasErrors

func (dm *DiagnosticsManager) HasErrors() bool

func (*DiagnosticsManager) Write

func (dm *DiagnosticsManager) Write() error

type Parser

type Parser struct {
	File *hcl.File
	// contains filtered or unexported fields
}

func NewParser

func NewParser(path string) (*Parser, hcl.Diagnostics)

func (*Parser) Decode

func (p *Parser) Decode(spec hcldec.Spec, ctx *hcl.EvalContext) (*session.Session, hcl.Diagnostics)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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