Documentation
¶
Index ¶
- type BuildNotFound
- type DB
- func (db *DB) CheckBaseEnvHasSnapshots(ctx context.Context, envID string) (result bool, err error)
- func (db *DB) Close() error
- func (db *DB) DeleteEnv(ctx context.Context, envID string) error
- func (db *DB) DeleteEnvAlias(ctx context.Context, alias string) error
- func (db *DB) EnvBuildSetStatus(ctx context.Context, envID string, buildID uuid.UUID, status envbuild.Status) error
- func (db *DB) FinishEnvBuild(ctx context.Context, envID string, buildID uuid.UUID, totalDiskSizeMB int64, ...) error
- func (db *DB) GetEnv(ctx context.Context, aliasOrEnvID string) (result *Template, build *models.EnvBuild, err error)
- func (db *DB) GetEnvs(ctx context.Context, teamID uuid.UUID) (result []*Template, err error)
- func (db *DB) GetLastSnapshot(ctx context.Context, sandboxID string, teamID uuid.UUID) (*models.Snapshot, *models.EnvBuild, error)
- func (db *DB) GetSnapshotBuilds(ctx context.Context, sandboxID string, teamID uuid.UUID) (*models.Env, []*models.EnvBuild, error)
- func (db *DB) GetTeamAuth(ctx context.Context, apiKey string) (*models.Team, *models.Tier, error)
- func (db *DB) GetTeamByIDAndUserIDAuth(ctx context.Context, teamID string, userID uuid.UUID) (*models.Team, *models.Tier, error)
- func (db *DB) GetTeams(ctx context.Context, userID uuid.UUID) ([]*models.Team, error)
- func (db *DB) GetUserID(ctx context.Context, token string) (*uuid.UUID, error)
- func (db *DB) NewSnapshotBuild(ctx context.Context, snapshotConfig *SnapshotInfo, teamID uuid.UUID) (*models.EnvBuild, error)
- func (db *DB) UpdateEnv(ctx context.Context, envID string, input UpdateEnvInput) error
- func (db *DB) UpdateEnvAlias(ctx context.Context, alias, envID string) error
- func (db *DB) UpdateEnvLastUsed(ctx context.Context, count int64, time time.Time, envID string) (err error)
- type EnvNotFound
- type ErrNotFound
- type SnapshotInfo
- type SnapshotNotFound
- type TeamUsageError
- type Template
- type TemplateCreator
- type TemplateNotFound
- type UpdateEnvInput
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildNotFound ¶
type BuildNotFound struct{ ErrNotFound }
func (BuildNotFound) Error ¶
func (BuildNotFound) Error() string
type DB ¶
func (*DB) CheckBaseEnvHasSnapshots ¶
func (*DB) EnvBuildSetStatus ¶
func (*DB) FinishEnvBuild ¶
func (*DB) GetLastSnapshot ¶
func (*DB) GetSnapshotBuilds ¶
func (*DB) GetTeamAuth ¶
func (*DB) GetTeamByIDAndUserIDAuth ¶
func (*DB) NewSnapshotBuild ¶
func (db *DB) NewSnapshotBuild( ctx context.Context, snapshotConfig *SnapshotInfo, teamID uuid.UUID, ) (*models.EnvBuild, error)
Check if there exists snapshot with the ID, if yes then return a new snapshot and env build. Otherwise create a new one.
func (*DB) UpdateEnvAlias ¶
type EnvNotFound ¶
type EnvNotFound struct{ ErrNotFound }
func (EnvNotFound) Error ¶
func (EnvNotFound) Error() string
type ErrNotFound ¶
type ErrNotFound error
type SnapshotInfo ¶
type SnapshotNotFound ¶
type SnapshotNotFound struct{ ErrNotFound }
func (SnapshotNotFound) Error ¶
func (SnapshotNotFound) Error() string
type TeamUsageError ¶
type TeamUsageError struct {
// contains filtered or unexported fields
}
func (*TeamUsageError) Error ¶
func (e *TeamUsageError) Error() string
type TemplateCreator ¶
type TemplateNotFound ¶
type TemplateNotFound struct{ ErrNotFound }
func (TemplateNotFound) Error ¶
func (TemplateNotFound) Error() string
type UpdateEnvInput ¶
type UpdateEnvInput struct {
Public bool
}
Click to show internal directories.
Click to hide internal directories.