Documentation
¶
Index ¶
- Variables
- func NewStageID() (string, error)
- type Action
- type CreateRequest
- type ListRequest
- type MarkCommittedRequest
- type MarkFailedRequest
- type MarkPreparedRequest
- type MemoryStore
- func (s *MemoryStore) Create(ctx context.Context, req CreateRequest) (Record, error)
- func (s *MemoryStore) Delete(ctx context.Context, stageID string) error
- func (*MemoryStore) Durable() bool
- func (s *MemoryStore) ExpireBefore(ctx context.Context, now time.Time) ([]Record, error)
- func (s *MemoryStore) Get(ctx context.Context, stageID string) (Record, error)
- func (s *MemoryStore) List(ctx context.Context, req ListRequest) ([]Record, error)
- func (s *MemoryStore) MarkCommitted(ctx context.Context, req MarkCommittedRequest) (Record, error)
- func (s *MemoryStore) MarkFailed(ctx context.Context, req MarkFailedRequest) (Record, error)
- func (s *MemoryStore) MarkPrepared(ctx context.Context, req MarkPreparedRequest) (Record, error)
- type Record
- type SQLiteStore
- func (s *SQLiteStore) Close() error
- func (s *SQLiteStore) Create(ctx context.Context, req CreateRequest) (Record, error)
- func (s *SQLiteStore) Delete(ctx context.Context, stageID string) error
- func (*SQLiteStore) Durable() bool
- func (s *SQLiteStore) ExpireBefore(ctx context.Context, now time.Time) ([]Record, error)
- func (s *SQLiteStore) Get(ctx context.Context, stageID string) (Record, error)
- func (s *SQLiteStore) List(ctx context.Context, req ListRequest) ([]Record, error)
- func (s *SQLiteStore) MarkCommitted(ctx context.Context, req MarkCommittedRequest) (Record, error)
- func (s *SQLiteStore) MarkFailed(ctx context.Context, req MarkFailedRequest) (Record, error)
- func (s *SQLiteStore) MarkPrepared(ctx context.Context, req MarkPreparedRequest) (Record, error)
- type Status
- type Store
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrNotFound = errors.New("install stage not found") ErrInvalidStage = errors.New("install stage is invalid") )
Functions ¶
func NewStageID ¶
Types ¶
type CreateRequest ¶
type CreateRequest struct {
StageID string `json:"stage_id"`
Action Action `json:"action"`
PluginInstanceID string `json:"plugin_instance_id"`
PublisherID string `json:"publisher_id"`
PluginID string `json:"plugin_id"`
Version string `json:"version"`
PackageHash string `json:"package_hash"`
ManifestHash string `json:"manifest_hash"`
EntriesHash string `json:"entries_hash"`
RequestedTrust string `json:"requested_trust,omitempty"`
ValidationSummary map[string]string `json:"validation_summary,omitempty"`
ExpiresAt time.Time `json:"expires_at"`
Now time.Time `json:"-"`
}
type ListRequest ¶
type MarkCommittedRequest ¶
type MarkFailedRequest ¶
type MarkPreparedRequest ¶
type MemoryStore ¶
type MemoryStore struct {
// contains filtered or unexported fields
}
func NewMemoryStore ¶
func NewMemoryStore() *MemoryStore
func (*MemoryStore) Create ¶
func (s *MemoryStore) Create(ctx context.Context, req CreateRequest) (Record, error)
func (*MemoryStore) Delete ¶
func (s *MemoryStore) Delete(ctx context.Context, stageID string) error
func (*MemoryStore) Durable ¶ added in v0.6.0
func (*MemoryStore) Durable() bool
func (*MemoryStore) ExpireBefore ¶
func (*MemoryStore) List ¶
func (s *MemoryStore) List(ctx context.Context, req ListRequest) ([]Record, error)
func (*MemoryStore) MarkCommitted ¶
func (s *MemoryStore) MarkCommitted(ctx context.Context, req MarkCommittedRequest) (Record, error)
func (*MemoryStore) MarkFailed ¶
func (s *MemoryStore) MarkFailed(ctx context.Context, req MarkFailedRequest) (Record, error)
func (*MemoryStore) MarkPrepared ¶
func (s *MemoryStore) MarkPrepared(ctx context.Context, req MarkPreparedRequest) (Record, error)
type Record ¶
type Record struct {
OwnerEnvHash string `json:"-"`
StageID string `json:"stage_id"`
Action Action `json:"action"`
Status Status `json:"status"`
PluginInstanceID string `json:"plugin_instance_id"`
PublisherID string `json:"publisher_id"`
PluginID string `json:"plugin_id"`
Version string `json:"version"`
PackageHash string `json:"package_hash"`
ManifestHash string `json:"manifest_hash"`
EntriesHash string `json:"entries_hash"`
RequestedTrust string `json:"requested_trust,omitempty"`
ResolvedTrust string `json:"resolved_trust,omitempty"`
ValidationSummary map[string]string `json:"validation_summary,omitempty"`
ErrorCode string `json:"error_code,omitempty"`
ErrorMessage string `json:"error_message,omitempty"`
ExpiresAt time.Time `json:"expires_at"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
FinishedAt *time.Time `json:"finished_at,omitempty"`
}
type SQLiteStore ¶
type SQLiteStore struct {
// contains filtered or unexported fields
}
func NewSQLiteStore ¶
func NewSQLiteStore(ctx context.Context, path string) (*SQLiteStore, error)
func (*SQLiteStore) Close ¶
func (s *SQLiteStore) Close() error
func (*SQLiteStore) Create ¶
func (s *SQLiteStore) Create(ctx context.Context, req CreateRequest) (Record, error)
func (*SQLiteStore) Delete ¶
func (s *SQLiteStore) Delete(ctx context.Context, stageID string) error
func (*SQLiteStore) Durable ¶ added in v0.6.0
func (*SQLiteStore) Durable() bool
func (*SQLiteStore) ExpireBefore ¶
func (*SQLiteStore) List ¶
func (s *SQLiteStore) List(ctx context.Context, req ListRequest) ([]Record, error)
func (*SQLiteStore) MarkCommitted ¶
func (s *SQLiteStore) MarkCommitted(ctx context.Context, req MarkCommittedRequest) (Record, error)
func (*SQLiteStore) MarkFailed ¶
func (s *SQLiteStore) MarkFailed(ctx context.Context, req MarkFailedRequest) (Record, error)
func (*SQLiteStore) MarkPrepared ¶
func (s *SQLiteStore) MarkPrepared(ctx context.Context, req MarkPreparedRequest) (Record, error)
type Store ¶
type Store interface {
Durable() bool
Create(ctx context.Context, req CreateRequest) (Record, error)
Get(ctx context.Context, stageID string) (Record, error)
List(ctx context.Context, req ListRequest) ([]Record, error)
MarkPrepared(ctx context.Context, req MarkPreparedRequest) (Record, error)
MarkCommitted(ctx context.Context, req MarkCommittedRequest) (Record, error)
MarkFailed(ctx context.Context, req MarkFailedRequest) (Record, error)
ExpireBefore(ctx context.Context, now time.Time) ([]Record, error)
Delete(ctx context.Context, stageID string) error
}
Click to show internal directories.
Click to hide internal directories.