Documentation
¶
Index ¶
- Variables
- func ConvertToDBEnv(env menv.Env) gen.Environment
- func ConvertToDBVar(v menv.Variable) gen.Variable
- func ConvertToModelEnv(env gen.Environment) *menv.Env
- func ConvertToModelVar(v gen.Variable) *menv.Variable
- type EnvReader
- func (r *EnvReader) CheckWorkspaceID(ctx context.Context, envID, ownerID idwrap.IDWrap) (bool, error)
- func (r *EnvReader) GetEnvironment(ctx context.Context, id idwrap.IDWrap) (*menv.Env, error)
- func (r *EnvReader) GetWorkspaceID(ctx context.Context, envID idwrap.IDWrap) (idwrap.IDWrap, error)
- func (r *EnvReader) ListEnvironments(ctx context.Context, workspaceID idwrap.IDWrap) ([]menv.Env, error)
- type EnvService
- type EnvWriter
- type EnvironmentService
- func (s EnvironmentService) CheckWorkspaceID(ctx context.Context, envID, ownerID idwrap.IDWrap) (bool, error)
- func (s EnvironmentService) Create(ctx context.Context, env menv.Env) error
- func (s EnvironmentService) CreateEnvironment(ctx context.Context, env *menv.Env) error
- func (s EnvironmentService) Delete(ctx context.Context, id idwrap.IDWrap) error
- func (s EnvironmentService) DeleteEnvironment(ctx context.Context, id idwrap.IDWrap) error
- func (s EnvironmentService) Get(ctx context.Context, id idwrap.IDWrap) (*menv.Env, error)
- func (s EnvironmentService) GetByWorkspace(ctx context.Context, workspaceID idwrap.IDWrap) ([]menv.Env, error)
- func (s EnvironmentService) GetEnvironment(ctx context.Context, id idwrap.IDWrap) (*menv.Env, error)
- func (s EnvironmentService) GetWorkspaceID(ctx context.Context, envID idwrap.IDWrap) (idwrap.IDWrap, error)
- func (s EnvironmentService) ListEnvironments(ctx context.Context, workspaceID idwrap.IDWrap) ([]menv.Env, error)
- func (s EnvironmentService) Reader() *EnvReader
- func (s EnvironmentService) TX(tx *sql.Tx) EnvironmentService
- func (s EnvironmentService) Update(ctx context.Context, env *menv.Env) error
- func (s EnvironmentService) UpdateEnvironment(ctx context.Context, env *menv.Env) error
- type VariableReader
- func (r *VariableReader) CheckEnvironmentBoundaries(ctx context.Context, varID, envID idwrap.IDWrap) (bool, error)
- func (r *VariableReader) Get(ctx context.Context, id idwrap.IDWrap) (*menv.Variable, error)
- func (r *VariableReader) GetEnvID(ctx context.Context, varID idwrap.IDWrap) (idwrap.IDWrap, error)
- func (r *VariableReader) GetVariableByEnvID(ctx context.Context, envID idwrap.IDWrap) ([]menv.Variable, error)
- func (r *VariableReader) GetVariablesByEnvIDOrdered(ctx context.Context, envID idwrap.IDWrap) ([]menv.Variable, error)
- func (r *VariableReader) GetVariablesByEnvironmentID(ctx context.Context, envID idwrap.IDWrap) ([]menv.Variable, error)
- type VariableService
- func (s VariableService) CheckEnvironmentBoundaries(ctx context.Context, varID, envID idwrap.IDWrap) (bool, error)
- func (s VariableService) Create(ctx context.Context, variable menv.Variable) error
- func (s VariableService) Delete(ctx context.Context, id idwrap.IDWrap) error
- func (s VariableService) Get(ctx context.Context, id idwrap.IDWrap) (*menv.Variable, error)
- func (s VariableService) GetEnvID(ctx context.Context, varID idwrap.IDWrap) (idwrap.IDWrap, error)
- func (s VariableService) GetVariableByEnvID(ctx context.Context, envID idwrap.IDWrap) ([]menv.Variable, error)
- func (s VariableService) GetVariablesByEnvIDOrdered(ctx context.Context, envID idwrap.IDWrap) ([]menv.Variable, error)
- func (s VariableService) MoveVariableAfter(ctx context.Context, varID, targetVarID idwrap.IDWrap) error
- func (s VariableService) MoveVariableBefore(ctx context.Context, varID, targetVarID idwrap.IDWrap) error
- func (s VariableService) Reader() *VariableReader
- func (s VariableService) TX(tx *sql.Tx) VariableService
- func (s VariableService) Update(ctx context.Context, variable *menv.Variable) error
- func (s VariableService) Upsert(ctx context.Context, variable menv.Variable) error
- type VariableWriter
- func (w *VariableWriter) Create(ctx context.Context, variable menv.Variable) error
- func (w *VariableWriter) Delete(ctx context.Context, id idwrap.IDWrap) error
- func (w *VariableWriter) MoveVariableAfter(ctx context.Context, varID, targetVarID idwrap.IDWrap) error
- func (w *VariableWriter) MoveVariableBefore(ctx context.Context, varID, targetVarID idwrap.IDWrap) error
- func (w *VariableWriter) Update(ctx context.Context, variable *menv.Variable) error
- func (w *VariableWriter) Upsert(ctx context.Context, variable menv.Variable) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNoEnvironmentFound = sql.ErrNoRows // Older call-sites use ErrNoEnvFound; keep the alias so we do not break them. ErrNoEnvFound = ErrNoEnvironmentFound )
Functions ¶
func ConvertToDBEnv ¶
func ConvertToDBEnv(env menv.Env) gen.Environment
func ConvertToModelEnv ¶
func ConvertToModelEnv(env gen.Environment) *menv.Env
Types ¶
type EnvReader ¶
type EnvReader struct {
// contains filtered or unexported fields
}
func NewEnvReaderFromQueries ¶
func (*EnvReader) CheckWorkspaceID ¶
func (*EnvReader) GetEnvironment ¶
func (*EnvReader) GetWorkspaceID ¶
type EnvService ¶
type EnvService = EnvironmentService
Backwards compatible alias for legacy code paths.
type EnvWriter ¶
type EnvWriter struct {
// contains filtered or unexported fields
}
func NewEnvWriter ¶
func NewEnvWriterFromQueries ¶
func (*EnvWriter) CreateEnvironment ¶
func (*EnvWriter) DeleteEnvironment ¶
type EnvironmentService ¶
type EnvironmentService struct {
// contains filtered or unexported fields
}
func NewEnvironmentService ¶
func NewEnvironmentService(queries *gen.Queries, logger *slog.Logger) EnvironmentService
func NewEnvironmentServiceTX ¶
func (EnvironmentService) CheckWorkspaceID ¶
func (EnvironmentService) CreateEnvironment ¶
func (EnvironmentService) DeleteEnvironment ¶
func (EnvironmentService) GetByWorkspace ¶
func (EnvironmentService) GetEnvironment ¶
func (EnvironmentService) GetWorkspaceID ¶
func (EnvironmentService) ListEnvironments ¶
func (EnvironmentService) Reader ¶
func (s EnvironmentService) Reader() *EnvReader
func (EnvironmentService) TX ¶
func (s EnvironmentService) TX(tx *sql.Tx) EnvironmentService
func (EnvironmentService) UpdateEnvironment ¶
type VariableReader ¶
type VariableReader struct {
// contains filtered or unexported fields
}
func NewVariableReader ¶
func NewVariableReader(db *sql.DB, logger *slog.Logger) *VariableReader
func NewVariableReaderFromQueries ¶
func NewVariableReaderFromQueries(queries *gen.Queries, logger *slog.Logger) *VariableReader
func (*VariableReader) CheckEnvironmentBoundaries ¶
func (*VariableReader) GetVariableByEnvID ¶
func (*VariableReader) GetVariablesByEnvIDOrdered ¶
func (*VariableReader) GetVariablesByEnvironmentID ¶
type VariableService ¶
type VariableService struct {
// contains filtered or unexported fields
}
func NewVariableService ¶
func NewVariableService(queries *gen.Queries, logger *slog.Logger) VariableService
func NewVariableServiceTX ¶
func (VariableService) CheckEnvironmentBoundaries ¶
func (VariableService) GetVariableByEnvID ¶
func (VariableService) GetVariablesByEnvIDOrdered ¶
func (VariableService) MoveVariableAfter ¶
func (VariableService) MoveVariableBefore ¶
func (VariableService) Reader ¶
func (s VariableService) Reader() *VariableReader
func (VariableService) TX ¶
func (s VariableService) TX(tx *sql.Tx) VariableService
type VariableWriter ¶
type VariableWriter struct {
// contains filtered or unexported fields
}
func NewVariableWriter ¶
func NewVariableWriter(tx gen.DBTX) *VariableWriter
func NewVariableWriterFromQueries ¶
func NewVariableWriterFromQueries(queries *gen.Queries) *VariableWriter
func (*VariableWriter) MoveVariableAfter ¶
func (w *VariableWriter) MoveVariableAfter(ctx context.Context, varID, targetVarID idwrap.IDWrap) error
MoveVariableAfter moves a variable after the target variable
func (*VariableWriter) MoveVariableBefore ¶
func (w *VariableWriter) MoveVariableBefore(ctx context.Context, varID, targetVarID idwrap.IDWrap) error
MoveVariableBefore moves a variable before the target variable
Click to show internal directories.
Click to hide internal directories.