Versions in this module Expand all Collapse all v0 v0.1.0 Nov 12, 2022 v0.0.1 Nov 10, 2022 Changes in this version + type CurrentSnap struct + Channel string + Epoch snap.Epoch + Revision snap.Revision + SnapID string + SnapName string + type DownloadManyOptions struct + BeforeDownloadFunc func(*snap.Info) (targetPath string, err error) + EnforceValidation bool + type DownloadSnapOptions struct + Basename string + Channel string + CohortKey string + LeavePartialOnError bool + Revision snap.Revision + TargetDir string + func (opts *DownloadSnapOptions) String() string + type DownloadedSnap struct + Info *snap.Info + Path string + RedirectChannel string + type SimpleCreds struct + Scheme string + Value string + func (c *SimpleCreds) Authorize(r *http.Request, _ store.DeviceAndAuthContext, user *auth.UserState, ...) error + func (c *SimpleCreds) CanAuthorizeForUser(_ *auth.UserState) bool + type SnapToDownload struct + Channel string + CohortKey string + Snap naming.SnapRef + type StoreImpl interface + Assertion func(assertType *asserts.AssertionType, primaryKey []string, user *auth.UserState) (asserts.Assertion, error) + Download func(ctx context.Context, name, targetFn string, downloadInfo *snap.DownloadInfo, ...) error + SnapAction func(context.Context, []*store.CurrentSnap, []*store.SnapAction, ...) ([]store.SnapActionResult, []store.AssertionResult, error) + type ToolingStore struct + Stdout io.Writer + func MockToolingStore(sto StoreImpl) *ToolingStore + func NewToolingStore() (*ToolingStore, error) + func NewToolingStoreFromModel(model *asserts.Model, fallbackArchitecture string) (*ToolingStore, error) + func (tsto *ToolingStore) AssertionFetcher(db *asserts.Database, save func(asserts.Assertion) error) asserts.Fetcher + func (tsto *ToolingStore) DownloadMany(toDownload []SnapToDownload, curSnaps []*CurrentSnap, opts DownloadManyOptions) (downloadedSnaps map[string]*DownloadedSnap, err error) + func (tsto *ToolingStore) DownloadSnap(name string, opts DownloadSnapOptions) (downloadedSnap *DownloadedSnap, err error) + func (tsto *ToolingStore) Find(at *asserts.AssertionType, headers map[string]string) (asserts.Assertion, error) + type UbuntuOneCreds struct + User auth.UserState + func (c *UbuntuOneCreds) Authorize(r *http.Request, _ store.DeviceAndAuthContext, _ *auth.UserState, ...) error + func (c *UbuntuOneCreds) CanAuthorizeForUser(_ *auth.UserState) bool + func (c *UbuntuOneCreds) RefreshAuth(_ store.AuthRefreshNeed, _ store.DeviceAndAuthContext, user *auth.UserState, ...) error + func (c *UbuntuOneCreds) UpdateUserAuth(user *auth.UserState, discharges []string) (*auth.UserState, error)