Documentation
¶
Index ¶
- Constants
- Variables
- type Service
- func (s *Service) Create(scope, scopeID, key, plainValue string) (*model.EnvConfig, error)
- func (s *Service) Delete(id string) error
- func (s *Service) List(scope string, scopeID *string) ([]*model.EnvConfig, error)
- func (s *Service) ResolveBeeEnv(beeID string) ([]string, error)
- func (s *Service) ResolveWorkerEnv(workerID string) ([]string, error)
- func (s *Service) UpdateValue(id, plainValue string) error
Constants ¶
const ( ScopeGlobal = "global" ScopeBee = "bee" ScopeDepartment = "department" ScopeWorker = "worker" )
Valid scope values for env configs.
Variables ¶
var ErrNotFound = errors.New("env config not found")
ErrNotFound is returned when an env config does not exist.
var ErrValidation = errors.New("validation error")
ErrValidation is returned for invalid input (bad scope, reserved key, missing scope_id).
Functions ¶
This section is empty.
Types ¶
type Service ¶
type Service struct {
// contains filtered or unexported fields
}
func NewService ¶
func NewService(envStore *store.EnvConfigStore, ds *store.DepartmentStore, encKey string) (*Service, error)
func (*Service) ResolveBeeEnv ¶
ResolveBeeEnv returns complete env vars for Bee execution (KEY=VALUE slice). Resolution chain: global <- bee
func (*Service) ResolveWorkerEnv ¶
ResolveWorkerEnv returns complete env vars for Worker execution (KEY=VALUE slice). Resolution chain: global <- department (last dept alphabetically by ID wins) <- worker