Documentation
¶
Index ¶
- type EnvironmentArtifactRecord
- type EnvironmentBuildRecord
- type EnvironmentSpecRecord
- type ExecLogRecord
- type ProviderConfigRecord
- type RegistryConnectionRecord
- type SQLiteStore
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) CountSandboxesByVM(ctx context.Context, vmID string) (int, error)
- func (s *SQLiteStore) CreateEnvironmentBuild(ctx context.Context, build *EnvironmentBuildRecord) error
- func (s *SQLiteStore) CreateEnvironmentSpec(ctx context.Context, spec *EnvironmentSpecRecord) error
- func (s *SQLiteStore) CreateExecLog(ctx context.Context, log *ExecLogRecord) error
- func (s *SQLiteStore) CreateSandbox(ctx context.Context, sb *SandboxRecord) error
- func (s *SQLiteStore) CreateTemplate(ctx context.Context, t *TemplateRecord) error
- func (s *SQLiteStore) DeleteEnvironmentSpec(ctx context.Context, id string) error
- func (s *SQLiteStore) DeleteRegistryConnection(ctx context.Context, id string) error
- func (s *SQLiteStore) DeleteSandbox(ctx context.Context, id string) error
- func (s *SQLiteStore) DeleteTemplate(ctx context.Context, name string) error
- func (s *SQLiteStore) GetEnvironmentBuild(ctx context.Context, id string) (*EnvironmentBuildRecord, error)
- func (s *SQLiteStore) GetEnvironmentSpec(ctx context.Context, id string) (*EnvironmentSpecRecord, error)
- func (s *SQLiteStore) GetProviderConfig(ctx context.Context, name string) (*ProviderConfigRecord, error)
- func (s *SQLiteStore) GetRegistryConnection(ctx context.Context, id string) (*RegistryConnectionRecord, error)
- func (s *SQLiteStore) GetSandbox(ctx context.Context, id string) (*SandboxRecord, error)
- func (s *SQLiteStore) GetTemplate(ctx context.Context, name string) (*TemplateRecord, error)
- func (s *SQLiteStore) ListEnvironmentArtifacts(ctx context.Context, buildID string) ([]*EnvironmentArtifactRecord, error)
- func (s *SQLiteStore) ListEnvironmentBuilds(ctx context.Context, specID string) ([]*EnvironmentBuildRecord, error)
- func (s *SQLiteStore) ListEnvironmentSpecs(ctx context.Context, ownerID string) ([]*EnvironmentSpecRecord, error)
- func (s *SQLiteStore) ListExecLogs(ctx context.Context, sandboxID string) ([]*ExecLogRecord, error)
- func (s *SQLiteStore) ListExpiredSandboxes(ctx context.Context, before time.Time) ([]*SandboxRecord, error)
- func (s *SQLiteStore) ListProviderConfigs(ctx context.Context) ([]*ProviderConfigRecord, error)
- func (s *SQLiteStore) ListRegistryConnections(ctx context.Context, ownerID string) ([]*RegistryConnectionRecord, error)
- func (s *SQLiteStore) ListSandboxes(ctx context.Context) ([]*SandboxRecord, error)
- func (s *SQLiteStore) ListSandboxesByOwner(ctx context.Context, ownerID string) ([]*SandboxRecord, error)
- func (s *SQLiteStore) ListTemplates(ctx context.Context) ([]*TemplateRecord, error)
- func (s *SQLiteStore) SaveEnvironmentArtifact(ctx context.Context, artifact *EnvironmentArtifactRecord) error
- func (s *SQLiteStore) SaveProviderConfig(ctx context.Context, cfg *ProviderConfigRecord) error
- func (s *SQLiteStore) SaveRegistryConnection(ctx context.Context, conn *RegistryConnectionRecord) error
- func (s *SQLiteStore) UpdateEnvironmentBuild(ctx context.Context, build *EnvironmentBuildRecord) error
- func (s *SQLiteStore) UpdateEnvironmentSpec(ctx context.Context, spec *EnvironmentSpecRecord) error
- func (s *SQLiteStore) UpdateSandboxExpiresAt(ctx context.Context, id string, expiresAt time.Time) error
- func (s *SQLiteStore) UpdateSandboxState(ctx context.Context, id string, state string) error
- func (s *SQLiteStore) UpdateTemplate(ctx context.Context, t *TemplateRecord) error
- type SandboxRecord
- type Store
- type TemplateRecord
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type EnvironmentBuildRecord ¶
type EnvironmentSpecRecord ¶
type ExecLogRecord ¶
type ProviderConfigRecord ¶
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶
func NewSQLiteStore(path string) (*SQLiteStore, error)
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
func (*SQLiteStore) CountSandboxesByVM ¶
func (*SQLiteStore) CreateEnvironmentBuild ¶
func (s *SQLiteStore) CreateEnvironmentBuild(ctx context.Context, build *EnvironmentBuildRecord) error
func (*SQLiteStore) CreateEnvironmentSpec ¶
func (s *SQLiteStore) CreateEnvironmentSpec(ctx context.Context, spec *EnvironmentSpecRecord) error
func (*SQLiteStore) CreateExecLog ¶
func (s *SQLiteStore) CreateExecLog(ctx context.Context, log *ExecLogRecord) error
func (*SQLiteStore) CreateSandbox ¶
func (s *SQLiteStore) CreateSandbox(ctx context.Context, sb *SandboxRecord) error
func (*SQLiteStore) CreateTemplate ¶
func (s *SQLiteStore) CreateTemplate(ctx context.Context, t *TemplateRecord) error
func (*SQLiteStore) DeleteEnvironmentSpec ¶
func (s *SQLiteStore) DeleteEnvironmentSpec(ctx context.Context, id string) error
func (*SQLiteStore) DeleteRegistryConnection ¶
func (s *SQLiteStore) DeleteRegistryConnection(ctx context.Context, id string) error
func (*SQLiteStore) DeleteSandbox ¶
func (s *SQLiteStore) DeleteSandbox(ctx context.Context, id string) error
func (*SQLiteStore) DeleteTemplate ¶
func (s *SQLiteStore) DeleteTemplate(ctx context.Context, name string) error
func (*SQLiteStore) GetEnvironmentBuild ¶
func (s *SQLiteStore) GetEnvironmentBuild(ctx context.Context, id string) (*EnvironmentBuildRecord, error)
func (*SQLiteStore) GetEnvironmentSpec ¶
func (s *SQLiteStore) GetEnvironmentSpec(ctx context.Context, id string) (*EnvironmentSpecRecord, error)
func (*SQLiteStore) GetProviderConfig ¶
func (s *SQLiteStore) GetProviderConfig(ctx context.Context, name string) (*ProviderConfigRecord, error)
func (*SQLiteStore) GetRegistryConnection ¶
func (s *SQLiteStore) GetRegistryConnection(ctx context.Context, id string) (*RegistryConnectionRecord, error)
func (*SQLiteStore) GetSandbox ¶
func (s *SQLiteStore) GetSandbox(ctx context.Context, id string) (*SandboxRecord, error)
func (*SQLiteStore) GetTemplate ¶
func (s *SQLiteStore) GetTemplate(ctx context.Context, name string) (*TemplateRecord, error)
func (*SQLiteStore) ListEnvironmentArtifacts ¶
func (s *SQLiteStore) ListEnvironmentArtifacts(ctx context.Context, buildID string) ([]*EnvironmentArtifactRecord, error)
func (*SQLiteStore) ListEnvironmentBuilds ¶
func (s *SQLiteStore) ListEnvironmentBuilds(ctx context.Context, specID string) ([]*EnvironmentBuildRecord, error)
func (*SQLiteStore) ListEnvironmentSpecs ¶
func (s *SQLiteStore) ListEnvironmentSpecs(ctx context.Context, ownerID string) ([]*EnvironmentSpecRecord, error)
func (*SQLiteStore) ListExecLogs ¶
func (s *SQLiteStore) ListExecLogs(ctx context.Context, sandboxID string) ([]*ExecLogRecord, error)
func (*SQLiteStore) ListExpiredSandboxes ¶
func (s *SQLiteStore) ListExpiredSandboxes(ctx context.Context, before time.Time) ([]*SandboxRecord, error)
func (*SQLiteStore) ListProviderConfigs ¶
func (s *SQLiteStore) ListProviderConfigs(ctx context.Context) ([]*ProviderConfigRecord, error)
func (*SQLiteStore) ListRegistryConnections ¶
func (s *SQLiteStore) ListRegistryConnections(ctx context.Context, ownerID string) ([]*RegistryConnectionRecord, error)
func (*SQLiteStore) ListSandboxes ¶
func (s *SQLiteStore) ListSandboxes(ctx context.Context) ([]*SandboxRecord, error)
func (*SQLiteStore) ListSandboxesByOwner ¶
func (s *SQLiteStore) ListSandboxesByOwner(ctx context.Context, ownerID string) ([]*SandboxRecord, error)
func (*SQLiteStore) ListTemplates ¶
func (s *SQLiteStore) ListTemplates(ctx context.Context) ([]*TemplateRecord, error)
func (*SQLiteStore) SaveEnvironmentArtifact ¶
func (s *SQLiteStore) SaveEnvironmentArtifact(ctx context.Context, artifact *EnvironmentArtifactRecord) error
func (*SQLiteStore) SaveProviderConfig ¶
func (s *SQLiteStore) SaveProviderConfig(ctx context.Context, cfg *ProviderConfigRecord) error
func (*SQLiteStore) SaveRegistryConnection ¶
func (s *SQLiteStore) SaveRegistryConnection(ctx context.Context, conn *RegistryConnectionRecord) error
func (*SQLiteStore) UpdateEnvironmentBuild ¶
func (s *SQLiteStore) UpdateEnvironmentBuild(ctx context.Context, build *EnvironmentBuildRecord) error
func (*SQLiteStore) UpdateEnvironmentSpec ¶
func (s *SQLiteStore) UpdateEnvironmentSpec(ctx context.Context, spec *EnvironmentSpecRecord) error
func (*SQLiteStore) UpdateSandboxExpiresAt ¶
func (*SQLiteStore) UpdateSandboxState ¶
func (*SQLiteStore) UpdateTemplate ¶
func (s *SQLiteStore) UpdateTemplate(ctx context.Context, t *TemplateRecord) error
type SandboxRecord ¶
type Store ¶
type Store interface {
// Sandbox CRUD
CreateSandbox(ctx context.Context, sb *SandboxRecord) error
GetSandbox(ctx context.Context, id string) (*SandboxRecord, error)
ListSandboxes(ctx context.Context) ([]*SandboxRecord, error)
UpdateSandboxState(ctx context.Context, id string, state string) error
UpdateSandboxExpiresAt(ctx context.Context, id string, expiresAt time.Time) error
DeleteSandbox(ctx context.Context, id string) error
ListExpiredSandboxes(ctx context.Context, before time.Time) ([]*SandboxRecord, error)
ListSandboxesByOwner(ctx context.Context, ownerID string) ([]*SandboxRecord, error)
CountSandboxesByVM(ctx context.Context, vmID string) (int, error)
// Exec logs
CreateExecLog(ctx context.Context, log *ExecLogRecord) error
ListExecLogs(ctx context.Context, sandboxID string) ([]*ExecLogRecord, error)
// Provider configs
GetProviderConfig(ctx context.Context, name string) (*ProviderConfigRecord, error)
SaveProviderConfig(ctx context.Context, cfg *ProviderConfigRecord) error
ListProviderConfigs(ctx context.Context) ([]*ProviderConfigRecord, error)
// Templates
CreateTemplate(ctx context.Context, t *TemplateRecord) error
GetTemplate(ctx context.Context, name string) (*TemplateRecord, error)
ListTemplates(ctx context.Context) ([]*TemplateRecord, error)
UpdateTemplate(ctx context.Context, t *TemplateRecord) error
DeleteTemplate(ctx context.Context, name string) error
// Environment specs
CreateEnvironmentSpec(ctx context.Context, spec *EnvironmentSpecRecord) error
GetEnvironmentSpec(ctx context.Context, id string) (*EnvironmentSpecRecord, error)
ListEnvironmentSpecs(ctx context.Context, ownerID string) ([]*EnvironmentSpecRecord, error)
UpdateEnvironmentSpec(ctx context.Context, spec *EnvironmentSpecRecord) error
DeleteEnvironmentSpec(ctx context.Context, id string) error
// Environment builds
CreateEnvironmentBuild(ctx context.Context, build *EnvironmentBuildRecord) error
GetEnvironmentBuild(ctx context.Context, id string) (*EnvironmentBuildRecord, error)
ListEnvironmentBuilds(ctx context.Context, specID string) ([]*EnvironmentBuildRecord, error)
UpdateEnvironmentBuild(ctx context.Context, build *EnvironmentBuildRecord) error
// Environment artifacts
SaveEnvironmentArtifact(ctx context.Context, artifact *EnvironmentArtifactRecord) error
ListEnvironmentArtifacts(ctx context.Context, buildID string) ([]*EnvironmentArtifactRecord, error)
// Registry connections
SaveRegistryConnection(ctx context.Context, conn *RegistryConnectionRecord) error
GetRegistryConnection(ctx context.Context, id string) (*RegistryConnectionRecord, error)
ListRegistryConnections(ctx context.Context, ownerID string) ([]*RegistryConnectionRecord, error)
DeleteRegistryConnection(ctx context.Context, id string) error
// Lifecycle
Close() error
}
Store defines the persistence interface.
type TemplateRecord ¶
Click to show internal directories.
Click to hide internal directories.