Documentation
¶
Index ¶
- func RegisterMaterializedVariables(api huma.API, variableService *VariableService, ...)
- func RegisterVariables(api huma.API, variableService *VariableService, ...)
- type CreateGlobalVariableInput
- type DeleteGlobalVariableInput
- type GetGlobalVariableSyncStatusInput
- type GlobalVariable
- type ListGlobalVariablesInput
- type Module
- type SyncGlobalVariablesInput
- type UpdateGlobalVariableInput
- type UpdateGlobalVariablesInput
- type VariableHandler
- func (h *VariableHandler) CreateVariable(ctx context.Context, input *CreateGlobalVariableInput) (*handlerutil.Out[types.GlobalVariableMutationResponse], error)
- func (h *VariableHandler) DeleteVariable(ctx context.Context, input *DeleteGlobalVariableInput) (*handlerutil.Out[types.GlobalVariableMutationResponse], error)
- func (h *VariableHandler) GetMaterializedVariables(ctx context.Context, input *types.EnvironmentInput) (*handlerutil.Out[[]types.EnvVariable], error)
- func (h *VariableHandler) GetSyncStatus(_ context.Context, _ *GetGlobalVariableSyncStatusInput) (*handlerutil.Out[[]types.EnvironmentSyncStatus], error)
- func (h *VariableHandler) ListVariables(ctx context.Context, _ *ListGlobalVariablesInput) (*handlerutil.Out[[]types.GlobalVariable], error)
- func (h *VariableHandler) SyncVariables(ctx context.Context, _ *SyncGlobalVariablesInput) (*handlerutil.Out[[]types.EnvironmentSyncStatus], error)
- func (h *VariableHandler) UpdateMaterializedVariables(ctx context.Context, input *UpdateGlobalVariablesInput) (*handlerutil.Out[types.MessageResponse], error)
- func (h *VariableHandler) UpdateVariable(ctx context.Context, input *UpdateGlobalVariableInput) (*handlerutil.Out[types.GlobalVariableMutationResponse], error)
- type VariableService
- func (s *VariableService) CreateVariable(ctx context.Context, req types.GlobalVariable) (*types.GlobalVariable, error)
- func (s *VariableService) DeleteVariable(ctx context.Context, id string) error
- func (s *VariableService) ForgetSyncState(envID string)
- func (s *VariableService) ListVariables(ctx context.Context) ([]types.GlobalVariable, error)
- func (s *VariableService) ReadLocalEnvFile(ctx context.Context) ([]types.EnvVariable, error)
- func (s *VariableService) SyncAll(ctx context.Context) []types.EnvironmentSyncStatus
- func (s *VariableService) SyncAllBackground(ctx context.Context) []types.EnvironmentSyncStatus
- func (s *VariableService) SyncEnvironment(ctx context.Context, envID string) error
- func (s *VariableService) SyncStatuses() []types.EnvironmentSyncStatus
- func (s *VariableService) UpdateVariable(ctx context.Context, id string, req types.GlobalVariable, ...) (*types.GlobalVariable, error)
- func (s *VariableService) WriteLocalEnvFile(ctx context.Context, vars []types.EnvVariable) error
- type VariableServiceParams
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) 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) CreateVariable ¶
func (h *VariableHandler) CreateVariable(ctx context.Context, input *CreateGlobalVariableInput) (*handlerutil.Out[types.GlobalVariableMutationResponse], error)
func (*VariableHandler) DeleteVariable ¶
func (h *VariableHandler) DeleteVariable(ctx context.Context, input *DeleteGlobalVariableInput) (*handlerutil.Out[types.GlobalVariableMutationResponse], error)
func (*VariableHandler) GetMaterializedVariables ¶
func (h *VariableHandler) GetMaterializedVariables(ctx context.Context, input *types.EnvironmentInput) (*handlerutil.Out[[]types.EnvVariable], error)
func (*VariableHandler) GetSyncStatus ¶
func (h *VariableHandler) GetSyncStatus(_ context.Context, _ *GetGlobalVariableSyncStatusInput) (*handlerutil.Out[[]types.EnvironmentSyncStatus], error)
func (*VariableHandler) ListVariables ¶
func (h *VariableHandler) ListVariables(ctx context.Context, _ *ListGlobalVariablesInput) (*handlerutil.Out[[]types.GlobalVariable], error)
func (*VariableHandler) SyncVariables ¶
func (h *VariableHandler) SyncVariables(ctx context.Context, _ *SyncGlobalVariablesInput) (*handlerutil.Out[[]types.EnvironmentSyncStatus], error)
func (*VariableHandler) UpdateMaterializedVariables ¶
func (h *VariableHandler) UpdateMaterializedVariables(ctx context.Context, input *UpdateGlobalVariablesInput) (*handlerutil.Out[types.MessageResponse], error)
func (*VariableHandler) UpdateVariable ¶
func (h *VariableHandler) UpdateVariable(ctx context.Context, input *UpdateGlobalVariableInput) (*handlerutil.Out[types.GlobalVariableMutationResponse], 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 (s *VariableService) SyncAll(ctx context.Context) []types.EnvironmentSyncStatus
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
}
Click to show internal directories.
Click to hide internal directories.