env

package
v0.7.1 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2025 License: AGPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InitiatDir          = ".initiat"
	EnvironmentsDir     = "environments"
	ActiveFile          = "active"
	SecretsFile         = "secrets.env"
	EnvrcFile           = ".envrc"
	WindowsOS           = "windows"
	GitignoreConfigured = "configured"
)
View Source
const (
	GitignorePerms = 0644
)

Variables

This section is empty.

Functions

func AllowDirenv

func AllowDirenv() error

func CheckDirenvHook

func CheckDirenvHook() bool

func CheckDirenvInstalled

func CheckDirenvInstalled() bool

func CheckGitignore

func CheckGitignore() (bool, error)

func CreateEnvironmentDir

func CreateEnvironmentDir(slug string) error

func CreateInitiatDir

func CreateInitiatDir() error

func EnsureGitignore

func EnsureGitignore() error

func GenerateEnvrc

func GenerateEnvrc() error

func GenerateEnvrcToPath added in v0.6.1

func GenerateEnvrcToPath(envrcPath string) error

func GetActiveEnvironment

func GetActiveEnvironment() (string, error)

func GetActivePath

func GetActivePath() (string, error)

func GetDirenvVersion

func GetDirenvVersion() (string, error)

func GetEnvironmentPath

func GetEnvironmentPath(slug string) (string, error)

func GetEnvironmentSecrets

func GetEnvironmentSecrets(envSlug string) ([]types.Secret, error)

func GetEnvironmentsPath

func GetEnvironmentsPath() (string, error)

func GetGitignoreStatus

func GetGitignoreStatus() (string, error)

func GetInitiatPath

func GetInitiatPath() (string, error)

func GetInstallInstructions

func GetInstallInstructions() string

func GetLastSyncTime

func GetLastSyncTime(envSlug string) (time.Time, error)

func GetSecretsPath

func GetSecretsPath(envSlug string) (string, error)

func IsGitRepository

func IsGitRepository() bool

func IsInitCompleted added in v0.6.1

func IsInitCompleted() bool

func LocalEnvironmentExists

func LocalEnvironmentExists(slug string) bool

func PromptForShellType added in v0.6.1

func PromptForShellType() (string, error)

func ReadSecrets

func ReadSecrets(envSlug string) (string, error)

func ReloadDirenv

func ReloadDirenv() error

func SetActiveEnvironment

func SetActiveEnvironment(slug string) error

func SyncAllEnvironments

func SyncAllEnvironments(orgSlug, projectSlug string) error

func SyncEnvironment

func SyncEnvironment(envSlug, orgSlug, projectSlug string) error

func UnsetActiveEnvironment added in v0.6.1

func UnsetActiveEnvironment() error

func WriteDirenvHookToShellConfig added in v0.6.1

func WriteDirenvHookToShellConfig(shellType string) error

func WriteSecrets

func WriteSecrets(envSlug string, content string) error

Types

type EnvironmentInfo

type EnvironmentInfo struct {
	Slug         string
	Name         string
	IsActive     bool
	Synced       time.Time
	HasSecrets   bool
	SecretsCount int
}

func ListLocalEnvironments

func ListLocalEnvironments() ([]EnvironmentInfo, error)

type LocalEnvironment

type LocalEnvironment struct {
	Slug       string
	Path       string
	Synced     time.Time
	HasSecrets bool
}

type State

type State struct {
	Active string
}

Jump to

Keyboard shortcuts

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