summaryrefslogtreecommitdiff
path: root/service/env/environment.go
blob: ab8febf79f86a8c64eda12ae55a0a1ae0de11b9a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package env

// Environment aggregates list of environment variables. This interface can be used in custom implementation to drive
// values from external sources.
type Environment interface {
	Setter
	Getter

	// Copy all environment values.
	Copy(setter Setter) error
}

// Setter provides ability to set environment value.
type Setter interface {
	// SetEnv sets or creates environment value.
	SetEnv(key, value string)
}

// Getter provides ability to set environment value.
type Getter interface {
	// GetEnv must return list of env variables.
	GetEnv() (map[string]string, error)
}