Documentation
¶
Index ¶
- func GetEnvName(env string) (string, error)
- func GetEnvNameFromFile(fileName string) (string, error)
- func GetEnvironmentID() (string, error)
- func GetEnvsInDirectory() ([]string, error)
- func GetFileName(env string) (string, error)
- func GetLocalEnvContents(envName string) (string, error)
- func HashData(data string) string
- func IsEnvVar(line string) bool
- type Env
- type EnvService
- func (es *EnvService) GetEnvironment(organizationId, projectId, environmentId string) (Environment, bool, error)
- func (es *EnvService) GetEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId *int64, version *int) (Env, error)
- func (es *EnvService) ListEnvVersions(organizationId, appId, environmentId string, size, page int) ([]Env, error)
- func (es *EnvService) ListEnvironments(organizationId, projectId string, size, page int) ([]Environment, error)
- func (es *EnvService) ListEnvs(organizationId, appId string, size, page int) ([]Env, error)
- func (es *EnvService) PutEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId int64, env Env) error
- type EnvServicer
- type Environment
- type MockEnvService
- func (m *MockEnvService) GetEnv(organizationId, appId, env string) (Env, error)
- func (m *MockEnvService) GetEnvironment(organizationId, appId, env string) (Environment, bool, error)
- func (m *MockEnvService) ListEnvs(organizationId, appId string, size, page int) ([]Env, error)
- func (m *MockEnvService) PutEnv(organizationId, appId, env string) error
- type Organization
- type Project
- type ProjectEnvironment
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetEnvName ¶
func GetEnvNameFromFile ¶
func GetEnvironmentID ¶
func GetEnvsInDirectory ¶
func GetFileName ¶
func GetLocalEnvContents ¶
Types ¶
type Env ¶
type Env struct {
Size string `json:"size"`
CountVariables int `json:"countVariables"`
Data string `json:"data"`
ID *string `json:"id,omitempty"`
Version *int `json:"version,omitempty"`
ProjectEnv *ProjectEnvironment `json:"projectEnvironment,omitempty"`
SecretKeyId *int64 `json:"secretKeyId,omitempty"`
Published *time.Time `json:"published,omitempty"`
}
func GetLocalEncryptedEnv ¶
func NewWithEncryptedData ¶
func NewWithEncryptedData(fileName string, key secretkey.SecretKeyer) (Env, error)
func (*Env) DecryptData ¶
func (e *Env) DecryptData(key secretkey.SecretKeyer) (string, error)
func (*Env) DecryptVarsAndSaveIntoFile ¶
func (*Env) EncryptData ¶
func (e *Env) EncryptData(key secretkey.SecretKeyer) (string, error)
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) (Environment, bool, error)
func (*EnvService) GetEnvironmentEnv ¶
func (*EnvService) ListEnvVersions ¶
func (es *EnvService) ListEnvVersions(organizationId, appId, environmentId string, size, page int) ([]Env, error)
func (*EnvService) ListEnvironments ¶
func (es *EnvService) ListEnvironments(organizationId, projectId string, size, page int) ([]Environment, error)
func (*EnvService) ListEnvs ¶
func (es *EnvService) ListEnvs(organizationId, appId string, size, page int) ([]Env, error)
func (*EnvService) PutEnvironmentEnv ¶
func (es *EnvService) PutEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId int64, env Env) error
type EnvServicer ¶
type EnvServicer interface {
GetEnvironment(organizationId, projectId, environment string) (Environment, bool, error)
PutEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId int64, env Env) error
GetEnvironmentEnv(organizationId, appId, environmentId string, secretKeyId *int64, version *int) (Env, error)
ListEnvs(organizationId, appId string, size, page int) ([]Env, error)
ListEnvVersions(organizationId, appId, environmentId string, size, page int) ([]Env, error)
ListEnvironments(organizationId, projectId string, size, page int) ([]Environment, error)
}
type Environment ¶
type MockEnvService ¶
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) (Env, error)
GetEnv mocks the GetEnv method
func (*MockEnvService) GetEnvironment ¶
func (m *MockEnvService) GetEnvironment(organizationId, appId, env string) (Environment, bool, error)
GetEnvironment mocks the GetEnvironment method
func (*MockEnvService) ListEnvs ¶
func (m *MockEnvService) ListEnvs(organizationId, appId string, size, page int) ([]Env, error)
ListEnvs mocks the ListEnvs method
func (*MockEnvService) PutEnv ¶
func (m *MockEnvService) PutEnv(organizationId, appId, env string) error
PutEnv mocks the PutEnv method
type Organization ¶
type ProjectEnvironment ¶
Click to show internal directories.
Click to hide internal directories.