envutil

package
v0.0.171 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2025 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var EnvTemplateFileNames = []string{".env.example", ".env.template"}
View Source
var IsAgentuityEnv = isAgentuityEnv
View Source
var LooksLikeSecret = looksLikeSecret

Functions

func AppendToEnvFile

func AppendToEnvFile(envfile string, envs []env.EnvLineComment) ([]env.EnvLineComment, error)

AppendToEnvFile appends envs to the .env file

func DescriptionLookingLikeASecret

func DescriptionLookingLikeASecret(description string) bool

DescriptionLookingLikeASecret checks if a description looks like a secret

func DetermineEnvFilename added in v0.0.167

func DetermineEnvFilename(dir string, isLocalDev bool) (string, error)

DetermineEnvFilename determines which env file to use based on isLocalDev flag

func HandleMissingProjectEnvs

func HandleMissingProjectEnvs(ctx context.Context, logger logger.Logger, le []env.EnvLineComment, projectData *project.ProjectData, theproject *project.Project, apiUrl, token string, force bool, envFilename string) *project.ProjectData

HandleMissingProjectEnvs handles missing envs in project

func HandleMissingTemplateEnvs

func HandleMissingTemplateEnvs(logger logger.Logger, dir, envfilename string, le []env.EnvLineComment, templateEnvs map[string][]env.EnvLineComment, force bool) ([]env.EnvLineComment, error)

HandleMissingTemplateEnvs handles missing envs from template files

func LoadOSEnv

func LoadOSEnv() map[string]string

LoadOSEnv loads the OS environment variables

func ParseAndProcessEnvFile added in v0.0.167

func ParseAndProcessEnvFile(logger logger.Logger, dir, envfilename string, force bool) (*deployer.EnvFile, error)

ParseAndProcessEnvFile parses an env file and processes template envs

func ProcessEnvFiles

func ProcessEnvFiles(ctx context.Context, logger logger.Logger, dir string, theproject *project.Project, projectData *project.ProjectData, apiUrl, token string, force bool, isLocalDev bool) (*deployer.EnvFile, *project.ProjectData)

ProcessEnvFiles handles .env and template env processing

func PromptForEnv

func PromptForEnv(logger logger.Logger, key string, isSecret bool, localenv map[string]string, osenv map[string]string, defaultValue string, placeholder string) string

func ReadPossibleEnvTemplateFiles

func ReadPossibleEnvTemplateFiles(baseDir string) map[string][]env.EnvLineComment

ReadPossibleEnvTemplateFiles reads .env.example and .env.template files

func ShouldSyncToProduction added in v0.0.167

func ShouldSyncToProduction(isLocalDev bool) bool

ShouldSyncToProduction determines if env vars should be synced to production based on mode

Types

This section is empty.

Jump to

Keyboard shortcuts

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