1 Star 0 Fork 1

mysnapcore/mysnapd

forked from tupelo-shen/mysnapd 
加入 Gitee
与超过 1400万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
storetest.go 3.91 KB
一键复制 编辑 原始数据 按行查看 历史
tupelo-shen 提交于 2022-11-08 17:56 +08:00 . fix: store commit
// -*- Mode: Go; indent-tabs-mode: t -*-
/*
* Copyright (C) 2014-2018 Canonical Ltd
*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 3 as
* published by the Free Software Foundation.
*
* This program is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <http://www.gnu.org/licenses/>.
*
*/
package storetest
import (
"context"
"io"
"gitee.com/mysnapcore/mysnapd/asserts"
"gitee.com/mysnapcore/mysnapd/client"
"gitee.com/mysnapcore/mysnapd/overlord/auth"
"gitee.com/mysnapcore/mysnapd/overlord/snapstate"
"gitee.com/mysnapcore/mysnapd/progress"
"gitee.com/mysnapcore/mysnapd/snap"
"gitee.com/mysnapcore/mysnapd/snap/channel"
"gitee.com/mysnapcore/mysnapd/snap/naming"
"gitee.com/mysnapcore/mysnapd/store"
)
// Store implements a snapstate.StoreService where every single method panics.
//
// Embed in your own fakeStore to avoid having to keep up with that interface's
// evolution when it's unrelated to your code.
type Store struct{}
// ensure we conform
var _ snapstate.StoreService = Store{}
func (Store) EnsureDeviceSession() error {
panic("Store.EnsureDeviceSession not expected")
}
func (Store) SnapInfo(context.Context, store.SnapSpec, *auth.UserState) (*snap.Info, error) {
panic("Store.SnapInfo not expected")
}
func (Store) SnapExists(context.Context, store.SnapSpec, *auth.UserState) (naming.SnapRef, *channel.Channel, error) {
panic("Store.SnapExists not expected")
}
func (Store) Find(context.Context, *store.Search, *auth.UserState) ([]*snap.Info, error) {
panic("Store.Find not expected")
}
func (Store) SnapAction(context.Context, []*store.CurrentSnap, []*store.SnapAction, store.AssertionQuery, *auth.UserState, *store.RefreshOptions) ([]store.SnapActionResult, []store.AssertionResult, error) {
panic("Store.SnapAction not expected")
}
func (Store) Download(context.Context, string, string, *snap.DownloadInfo, progress.Meter, *auth.UserState, *store.DownloadOptions) error {
panic("Store.Download not expected")
}
func (Store) DownloadStream(ctx context.Context, name string, downloadInfo *snap.DownloadInfo, resume int64, user *auth.UserState) (io.ReadCloser, int, error) {
panic("Store.DownloadStream not expected")
}
func (Store) SuggestedCurrency() string {
panic("Store.SuggestedCurrency not expected")
}
func (Store) Buy(*client.BuyOptions, *auth.UserState) (*client.BuyResult, error) {
panic("Store.Buy not expected")
}
func (Store) ReadyToBuy(*auth.UserState) error {
panic("Store.ReadyToBuy not expected")
}
func (Store) Sections(context.Context, *auth.UserState) ([]string, error) {
panic("Store.Sections not expected")
}
func (Store) Assertion(*asserts.AssertionType, []string, *auth.UserState) (asserts.Assertion, error) {
panic("Store.Assertion not expected")
}
func (Store) SeqFormingAssertion(*asserts.AssertionType, []string, int, *auth.UserState) (asserts.Assertion, error) {
panic("Store.SeqFormingAssertion not expected")
}
func (Store) DownloadAssertions([]string, *asserts.Batch, *auth.UserState) error {
panic("Store.DownloadAssertions not expected")
}
func (Store) WriteCatalogs(context.Context, io.Writer, store.SnapAdder) error {
panic("fakeStore.WriteCatalogs not expected")
}
func (Store) ConnectivityCheck() (map[string]bool, error) {
panic("ConnectivityCheck not expected")
}
func (Store) CreateCohorts(context.Context, []string) (map[string]string, error) {
panic("CreateCohort not expected")
}
func (Store) LoginUser(username, password, otp string) (string, string, error) {
panic("LoginUser not expected")
}
func (Store) UserInfo(email string) (userinfo *store.User, err error) {
panic("UserInfo not expected")
}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
Go
1
https://gitee.com/mysnapcore/mysnapd.git
git@gitee.com:mysnapcore/mysnapd.git
mysnapcore
mysnapd
mysnapd
v0.1.0

搜索帮助