2 Star 0 Fork 0

TeamsHub/backend-gopkg

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
mock.go 950 Bytes
一键复制 编辑 原始数据 按行查看 历史
HCY 提交于 2024-05-10 13:07 . edit pkg
package remoteclientmock
import (
"context"
"gitee.com/wuzheng0709/backend-gopkg/infrastructure/pkg/filesystem/fsctx"
"gitee.com/wuzheng0709/backend-gopkg/infrastructure/pkg/serializer"
"github.com/stretchr/testify/mock"
)
type RemoteClientMock struct {
mock.Mock
}
func (r *RemoteClientMock) CreateUploadSession(ctx context.Context, session *serializer.UploadSession, ttl int64, overwrite bool) error {
return r.Called(ctx, session, ttl, overwrite).Error(0)
}
func (r *RemoteClientMock) GetUploadURL(ttl int64, sessionID string) (string, string, error) {
args := r.Called(ttl, sessionID)
return args.String(0), args.String(1), args.Error(2)
}
func (r *RemoteClientMock) Upload(ctx context.Context, file fsctx.FileHeader) error {
args := r.Called(ctx, file)
return args.Error(0)
}
func (r *RemoteClientMock) DeleteUploadSession(ctx context.Context, sessionID string) error {
args := r.Called(ctx, sessionID)
return args.Error(0)
}
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/wuzheng0709/backend-gopkg.git
git@gitee.com:wuzheng0709/backend-gopkg.git
wuzheng0709
backend-gopkg
backend-gopkg
v1.2.7

搜索帮助