service

package
v0.0.0-...-028896a Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FilesService

type FilesService interface {
	ListFiles(ctx context.Context, userID, filePath string) ([]*pb.FileInfo, error)
	UploadFile(ctx context.Context, reader io.Reader, userID, filePath string) (bool, error)
	DownloadFile(ctx context.Context, userID, filePath string, w *io.PipeWriter) error
	RemoveFile(ctx context.Context, userID, filePath string) (bool, error)
}

func NewFilesService

func NewFilesService(client pb.FileServiceClient) FilesService

type Services

type Services struct {
	UserService
	FilesService
	ShareService
}

type ShareService

type ShareService interface {
	Share()
	Unshare()
}

func NewShareService

func NewShareService() ShareService

type UserService

type UserService interface {
	RegisterUser(ctx context.Context, username, password string) (bool, error)
	LoginUser(ctx context.Context, username, password string) (accessToken, refreshToken string, err error)
	RefreshToken(ctx context.Context, refreshToken string) (string, error)
	Logout(ctx context.Context, accessToken string) (bool, error)

	GetGrpcClient() pb.AuthServiceClient
}

func NewUserService

func NewUserService(client pb.AuthServiceClient) UserService

Jump to

Keyboard shortcuts

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