v1

package
v0.0.0-...-a39f72a Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Dec 5, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package v1 can implement more conflex bussiness logic.

Package v1 is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileSrv

type FileSrv interface {
	Create(ctx context.Context, file *rp.File) (uint, error)
	Find(ctx context.Context, filesha1 string) (*rp.File, error)
	FindFilesByUserAndFolder(ctx context.Context, userid, folderid uint) (files []*rp.File, err error)
	Update(ctx context.Context, file *rp.File) error
	MoveFileToFolder(ctx context.Context, filesha1 string, folderid uint) error
	Delete(ctx context.Context, filesha1 string) error
}

FileSrv defines functions used to handle file request.

type FolderSrv

type FolderSrv interface {
	Create(ctx context.Context, folder *rp.Folder) (uint, error)
	Update(ctx context.Context, folder *rp.Folder) error
	Find(ctx context.Context, id, userid uint) (*rp.Folder, error)
	FindByUserID(ctx context.Context, userid uint) (folders []*rp.Folder, err error)
	Delete(ctx context.Context, id, userid uint) error
}

FolderSrv defines functions used to handle folder request.

type MockService

type MockService struct {
	// contains filtered or unexported fields
}

MockService is a mock of Service interface.

func NewMockService

func NewMockService(ctrl *gomock.Controller) *MockService

NewMockService creates a new mock instance.

func (*MockService) EXPECT

func (m *MockService) EXPECT() *MockServiceMockRecorder

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockService) Users

func (m *MockService) Users() UserSrv

Users mocks base method.

type MockServiceMockRecorder

type MockServiceMockRecorder struct {
	// contains filtered or unexported fields
}

MockServiceMockRecorder is the mock recorder for MockService.

func (*MockServiceMockRecorder) Users

func (mr *MockServiceMockRecorder) Users() *gomock.Call

Users indicates an expected call of Users.

type Service

type Service interface {
	Users() UserSrv
	Folders() FolderSrv
	Files() FileSrv
}

func NewService

func NewService(store store.Factory) Service

NewService returns Service interface.

type UserSrv

type UserSrv interface {
	Create(ctx context.Context, user *rp.User) (uint, error)
	Update(ctx context.Context, user *rp.User) error
	ChangePassword(ctx context.Context, id uint, password string) error
	Delete(ctx context.Context, id uint) error
	Find(ctx context.Context, id uint) (*rp.User, error)
	FindUserByName(ctx context.Context, username string) (*rp.User, error)
}

UserSrv defines functions used to handle user request.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL