github.com/unionj-cloud/go-doudou@v1.3.8-0.20221011095552-0088008e5b31/cmd/internal/svc/testdata/svcp.go (about) 1 package service 2 3 import ( 4 "context" 5 v3 "github.com/unionj-cloud/go-doudou/toolkit/openapi/v3" 6 "github.com/unionj-cloud/go-doudou/framework/testdata/vo" 7 "os" 8 ) 9 10 // 用户服务接口 11 // v1版本 12 type UsersvcPanic interface { 13 // You can define your service methods as your need. Below is an example. 14 PageUsers(ctx context.Context, query vo.PageQuery) (code int, data vo.PageRet, msg error) 15 16 // comment1 17 // comment2 18 GetUser(ctx context.Context, 19 // 用户ID 20 userId string, 21 // 图片地址 22 photo string, 23 ) (code int, data string, msg error) 24 25 // comment3 26 SignUp(ctx context.Context, username string, password int, actived bool, score float64) (code int, data string, msg error) 27 28 // comment4 29 UploadAvatar(context.Context, []v3.FileModel, string) (int, string, error) 30 31 // comment5 32 DownloadAvatar(ctx context.Context, userId string) (*os.File, error) 33 34 // Wrong1 35 Wrong1(ctx context.Context, userId string, query vo.PageQuery, files []v3.FileModel) (*os.File, error) 36 37 // Wrong2 38 Wrong2(ctx context.Context, ch chan string) (*os.File, error) 39 40 // Wrong3 41 Wrong3(ctx context.Context, fun func()) (*os.File, error) 42 }