variable

package
v3.1.1 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2026 License: BSD-3-Clause Imports: 38 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

This section is empty.

Functions

func RegisterMaterializedVariables

func RegisterMaterializedVariables(api huma.API, variableService *VariableService, proxyRemoteJSON handlerutil.RemoteJSONProxy)

func RegisterVariables

func RegisterVariables(api huma.API, variableService *VariableService, proxyRemoteJSON handlerutil.RemoteJSONProxy)

Types

type CreateGlobalVariableInput

type CreateGlobalVariableInput struct {
	types.Create[types.GlobalVariable]
}

type DeleteGlobalVariableInput

type DeleteGlobalVariableInput struct {
	ID string `path:"id" doc:"Variable ID"`
}

type GetGlobalVariableSyncStatusInput

type GetGlobalVariableSyncStatusInput struct{}

type GlobalVariable

type GlobalVariable struct {
	database.BaseModel

	Key          string                    `json:"key" gorm:"column:key" sortable:"true"`
	Value        string                    `json:"-" gorm:"column:value"`
	Environments []environment.Environment `json:"-" gorm:"many2many:global_variable_environments;joinForeignKey:GlobalVariableID;joinReferences:EnvironmentID"`
	IsSecret     bool                      `json:"isSecret" gorm:"column:is_secret"`
	// No gorm default tag: a default:true tag would make GORM omit false on
	// insert and the column default would silently win.
	AllEnvironments      bool `json:"allEnvironments" gorm:"column:all_environments"`
	InjectIntoContainers bool `json:"injectIntoContainers" gorm:"column:inject_into_containers"`
}

func (GlobalVariable) TableName

func (GlobalVariable) TableName() string

type ListGlobalVariablesInput

type ListGlobalVariablesInput struct{}

type Module

type Module struct {
	// contains filtered or unexported fields
}

func New

func New(service *VariableService, environments environment.RemoteProxy) *Module

func (*Module) RegisterRoutes

func (m *Module) RegisterRoutes(api huma.API, cfg *config.Config)

func (*Module) Service

func (m *Module) Service() *VariableService

type SyncGlobalVariablesInput

type SyncGlobalVariablesInput struct{}

type UpdateGlobalVariableInput

type UpdateGlobalVariableInput struct {
	ID string `path:"id" doc:"Variable ID"`
	types.Update[types.GlobalVariable]
}

type UpdateGlobalVariablesInput

type UpdateGlobalVariablesInput struct {
	EnvironmentID string `path:"id" doc:"Environment ID"`
	Body          types.EnvSummary
}

type VariableHandler

type VariableHandler struct {
	// contains filtered or unexported fields
}

func (*VariableHandler) GetMaterializedVariables

func (h *VariableHandler) GetMaterializedVariables(ctx context.Context, input *types.EnvironmentInput) (*handlerutil.Out[[]types.EnvVariable], error)

func (*VariableHandler) ListVariables

func (*VariableHandler) SyncVariables

func (*VariableHandler) UpdateMaterializedVariables

func (h *VariableHandler) UpdateMaterializedVariables(ctx context.Context, input *UpdateGlobalVariablesInput) (*handlerutil.Out[types.MessageResponse], error)

type VariableService

type VariableService struct {
	// contains filtered or unexported fields
}

func NewVariableService

func NewVariableService(p VariableServiceParams) *VariableService

func (*VariableService) CreateVariable

func (s *VariableService) CreateVariable(ctx context.Context, req types.GlobalVariable) (*types.GlobalVariable, error)

func (*VariableService) DeleteVariable

func (s *VariableService) DeleteVariable(ctx context.Context, id string) error

func (*VariableService) ForgetSyncState

func (s *VariableService) ForgetSyncState(envID string)

func (*VariableService) ListVariables

func (s *VariableService) ListVariables(ctx context.Context) ([]types.GlobalVariable, error)

func (*VariableService) ReadLocalEnvFile

func (s *VariableService) ReadLocalEnvFile(ctx context.Context) ([]types.EnvVariable, error)

func (*VariableService) SyncAll

func (*VariableService) SyncAllBackground

func (s *VariableService) SyncAllBackground(ctx context.Context) []types.EnvironmentSyncStatus

func (*VariableService) SyncEnvironment

func (s *VariableService) SyncEnvironment(ctx context.Context, envID string) error

func (*VariableService) SyncStatuses

func (s *VariableService) SyncStatuses() []types.EnvironmentSyncStatus

func (*VariableService) UpdateVariable

func (s *VariableService) UpdateVariable(ctx context.Context, id string, req types.GlobalVariable, submitted map[string]bool) (*types.GlobalVariable, error)

func (*VariableService) WriteLocalEnvFile

func (s *VariableService) WriteLocalEnvFile(ctx context.Context, vars []types.EnvVariable) error

type VariableServiceParams

type VariableServiceParams struct {
	fx.In

	DB              *database.DB
	Environments    environment.RemoteProxy
	Tunnels         *agent.TunnelRegistry
	SettingsService *settings.SettingsService
	KVService       *kv.KVService
}

Jump to

Keyboard shortcuts

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