env

package
v0.0.39 Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2026 License: MIT Imports: 8 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	ScopeGlobal     = "global"
	ScopeBee        = "bee"
	ScopeDepartment = "department"
	ScopeWorker     = "worker"
)

Valid scope values for env configs.

Variables

View Source
var ErrNotFound = errors.New("env config not found")

ErrNotFound is returned when an env config does not exist.

View Source
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) Create

func (s *Service) Create(scope, scopeID, key, plainValue string) (*model.EnvConfig, error)

func (*Service) Delete

func (s *Service) Delete(id string) error

func (*Service) List

func (s *Service) List(scope string, scopeID *string) ([]*model.EnvConfig, error)

func (*Service) ResolveBeeEnv

func (s *Service) ResolveBeeEnv(beeID string) ([]string, error)

ResolveBeeEnv returns complete env vars for Bee execution (KEY=VALUE slice). Resolution chain: global <- bee

func (*Service) ResolveWorkerEnv

func (s *Service) ResolveWorkerEnv(workerID string) ([]string, error)

ResolveWorkerEnv returns complete env vars for Worker execution (KEY=VALUE slice). Resolution chain: global <- department (last dept alphabetically by ID wins) <- worker

func (*Service) UpdateValue

func (s *Service) UpdateValue(id, plainValue string) error

Jump to

Keyboard shortcuts

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