Documentation
¶
Index ¶
- Variables
- func AppendToEnvFile(envfile string, envs []env.EnvLineComment) ([]env.EnvLineComment, error)
- func DescriptionLookingLikeASecret(description string) bool
- func DetermineEnvFilename(dir string, isLocalDev bool) (string, error)
- func HandleMissingProjectEnvs(ctx context.Context, logger logger.Logger, le []env.EnvLineComment, ...) *project.ProjectData
- func HandleMissingTemplateEnvs(logger logger.Logger, dir, envfilename string, le []env.EnvLineComment, ...) ([]env.EnvLineComment, error)
- func LoadOSEnv() map[string]string
- func ParseAndProcessEnvFile(logger logger.Logger, dir, envfilename string, force bool) (*deployer.EnvFile, error)
- func ProcessEnvFiles(ctx context.Context, logger logger.Logger, dir string, ...) (*deployer.EnvFile, *project.ProjectData)
- func PromptForEnv(logger logger.Logger, key string, isSecret bool, localenv map[string]string, ...) string
- func ReadPossibleEnvTemplateFiles(baseDir string) map[string][]env.EnvLineComment
- func ShouldSyncToProduction(isLocalDev bool) bool
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 ¶
DescriptionLookingLikeASecret checks if a description looks like a secret
func DetermineEnvFilename ¶ added in v0.0.167
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 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 ReadPossibleEnvTemplateFiles ¶
func ReadPossibleEnvTemplateFiles(baseDir string) map[string][]env.EnvLineComment
ReadPossibleEnvTemplateFiles reads .env.example and .env.template files
func ShouldSyncToProduction ¶ added in v0.0.167
ShouldSyncToProduction determines if env vars should be synced to production based on mode
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.