29 lines
694 B
Go
29 lines
694 B
Go
package catalog
|
|
|
|
import (
|
|
"context"
|
|
"errors"
|
|
)
|
|
|
|
var (
|
|
ErrTemplateNotFound = errors.New("template not found")
|
|
ErrImmutableSnapshot = errors.New("template version is immutable")
|
|
)
|
|
|
|
type Summary struct {
|
|
ID string `json:"id"`
|
|
Version string `json:"version"`
|
|
GameID string `json:"game_id"`
|
|
GameName string `json:"game_name"`
|
|
Description string `json:"description"`
|
|
TrustStatus string `json:"trust_status"`
|
|
Digest string `json:"digest"`
|
|
}
|
|
|
|
// Repository persists immutable catalog snapshots.
|
|
type Repository interface {
|
|
Sync(context.Context, []Snapshot) error
|
|
List(context.Context) ([]Summary, error)
|
|
Get(context.Context, string, string) (Snapshot, error)
|
|
}
|