environment

package
v0.17.0 Latest Latest
Warning

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

Go to latest
Published: Nov 11, 2026 License: Apache-2.0 Imports: 12 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

This section is empty.

Variables

View Source
var ErrHasChild = errors.New("environment already has a child")

ErrHasChild is returned when cloning an environment that already has a child; the promotion chain is linear.

Functions

This section is empty.

Types

type Environment

type Environment struct {
	Id            string                 `json:"id"`
	Name          string                 `json:"name"`
	EnvironmentId string                 `json:"environment_id"`
	AgentId       string                 `json:"agent_id"`
	Enabled       bool                   `json:"enabled"`
	Level         int                    `json:"level"`
	CanPromote    bool                   `json:"canPromote"`
	SecretMenu    *secretmenu.SecretMenu `json:"secret_menu,omitempty"`
	Flags         []flags.Flag           `json:"flags,omitempty"`
	ProjectName   string                 `json:"project_name,omitempty"`
	AgentName     string                 `json:"agent_name,omitempty"`
}

type System

type System struct {
	Config *ConfigBuilder.Config
}

func NewSystem

func NewSystem(cfg *ConfigBuilder.Config) *System

func (*System) CloneAgentEnvironment

func (s *System) CloneAgentEnvironment(w http.ResponseWriter, r *http.Request)

func (*System) CloneChildEnvironmentInDB added in v0.15.5

func (s *System) CloneChildEnvironmentInDB(ctx context.Context, envId, newEnvId, agentId, name string) error

CloneChildEnvironmentInDB copies an environment and its flags and links the copy as its child, all or nothing.

func (*System) CreateAgentEnvironment

func (s *System) CreateAgentEnvironment(w http.ResponseWriter, r *http.Request)

func (*System) CreateEnvironmentInDB

func (s *System) CreateEnvironmentInDB(ctx context.Context, name, agentId string) (*Environment, error)

func (*System) DeleteAllEnvironmentsForAgent

func (s *System) DeleteAllEnvironmentsForAgent(ctx context.Context, agentId string) error

func (*System) DeleteEnvironment

func (s *System) DeleteEnvironment(w http.ResponseWriter, r *http.Request)

func (*System) DeleteEnvironmentFromDB

func (s *System) DeleteEnvironmentFromDB(ctx context.Context, envId string) error

func (*System) GetAgentEnvironments

func (s *System) GetAgentEnvironments(w http.ResponseWriter, r *http.Request)

func (*System) GetAgentEnvironmentsFromDB

func (s *System) GetAgentEnvironmentsFromDB(ctx context.Context, agentId, companyId string) ([]*Environment, error)

func (*System) GetEnvironment

func (s *System) GetEnvironment(w http.ResponseWriter, r *http.Request)

func (*System) GetEnvironmentFromDB

func (s *System) GetEnvironmentFromDB(ctx context.Context, envId, companyId string) (*Environment, error)

func (*System) GetEnvironments

func (s *System) GetEnvironments(w http.ResponseWriter, r *http.Request)

func (*System) GetEnvironmentsFromDB

func (s *System) GetEnvironmentsFromDB(ctx context.Context, companyId string) ([]*Environment, error)

func (*System) UpdateEnvironment

func (s *System) UpdateEnvironment(w http.ResponseWriter, r *http.Request)

func (*System) UpdateEnvironmentInDB

func (s *System) UpdateEnvironmentInDB(ctx context.Context, env Environment) error

Jump to

Keyboard shortcuts

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