env

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2025 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvName

func GetEnvName(env string) (string, error)

func GetEnvNameFromFile

func GetEnvNameFromFile(fileName string) (string, error)

func GetEnvironmentID

func GetEnvironmentID() (string, error)

func GetEnvsInDirectory

func GetEnvsInDirectory() ([]string, error)

func GetFileName

func GetFileName(env string) (string, error)

func GetLocalEncryptedEnv

func GetLocalEncryptedEnv(envName string, envCompletePath *string, s models.Secret) (models.Env, error)

func GetLocalEnvContents

func GetLocalEnvContents(envName string) (string, error)

func IsEnvVar

func IsEnvVar(line string) bool

func New

func New(fileName string) (models.Env, error)

func NewWithEncryptedData

func NewWithEncryptedData(fileName string, secret models.Secret) (models.Env, error)

Types

type EnvService

type EnvService struct {
	// contains filtered or unexported fields
}

func NewService

func NewService() *EnvService

func (*EnvService) GetEnvironment

func (es *EnvService) GetEnvironment(organizationId, projectId, environmentId string) (models.Environment, bool, error)

func (*EnvService) GetEnvironmentEnv

func (es *EnvService) GetEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId *int64, version *int) (models.Env, error)

func (*EnvService) ListEnvVersions

func (es *EnvService) ListEnvVersions(organizationId, appId, environmentId string, size, page int) ([]models.Env, error)

func (*EnvService) ListEnvironments

func (es *EnvService) ListEnvironments(organizationId, projectId string, size, page int) ([]models.Environment, error)

func (*EnvService) ListEnvs

func (es *EnvService) ListEnvs(organizationId, appId string, size, page int) ([]models.Env, error)

func (*EnvService) PutEnvironmentEnv

func (es *EnvService) PutEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId int64, env models.Env) error

type EnvServicer

type EnvServicer interface {
	GetEnvironment(organizationId, projectId, environment string) (models.Environment, bool, error)
	PutEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId int64, env models.Env) error
	GetEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId *int64, version *int) (models.Env, error)
	ListEnvs(organizationId, appId string, size, page int) ([]models.Env, error)
	ListEnvVersions(organizationId, appId, environmentId string, size, page int) ([]models.Env, error)
	ListEnvironments(organizationId, projectId string, size, page int) ([]models.Environment, error)
}

type MockEnvService

type MockEnvService struct {
	mock.Mock
}

MockEnvService is a mock implementation of the EnvServicer interface

func NewMockEnvService

func NewMockEnvService() *MockEnvService

NewMockEnvService creates a new instance of MockEnvService

func (*MockEnvService) GetEnv

func (m *MockEnvService) GetEnv(organizationId, appId, env string) (models.Env, error)

GetEnv mocks the GetEnv method

func (*MockEnvService) GetEnvironment

func (m *MockEnvService) GetEnvironment(organizationId, appId, env string) (models.Environment, bool, error)

GetEnvironment mocks the GetEnvironment method

func (*MockEnvService) ListEnvs

func (m *MockEnvService) ListEnvs(organizationId, appId string, size, page int) ([]models.Env, error)

ListEnvs mocks the ListEnvs method

func (*MockEnvService) PutEnv

func (m *MockEnvService) PutEnv(organizationId, appId, env string) error

PutEnv mocks the PutEnv method

Jump to

Keyboard shortcuts

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