service

package
v0.0.0-...-0366c93 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2021 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 File

type File interface {
	GetAll(userCode string) ([]common.File, error)
	Create(files []common.UploadedFile, userCode string) error
	UpdateStatus(userCode, errorMess string, status common.ProcessStatus) error
	DeleteAll(userCode string) error
	GetByCode(userCode string) (common.File, error)
}

type FileService

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

func NewFileService

func NewFileService(repo repository.File) *FileService

func (*FileService) Create

func (s *FileService) Create(files []common.UploadedFile, userCode string) error

func (*FileService) DeleteAll

func (s *FileService) DeleteAll(userCode string) error

func (*FileService) GetAll

func (s *FileService) GetAll(userCode string) ([]common.File, error)

func (*FileService) GetByCode

func (s *FileService) GetByCode(userCode string) (common.File, error)

func (*FileService) UpdateStatus

func (s *FileService) UpdateStatus(userCode, errorMess string, status common.ProcessStatus) error

type Service

type Service struct {
	User
	File
}

func NewService

func NewService(repos *repository.Repository) *Service

type User

type User interface {
	CreateUser() (uuid.UUID, error)
	GenerateToken(userCode uuid.UUID) (string, error)
	ParseToken(accessToken string) (uuid.UUID, error)
}

type UserService

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

func NewUserService

func NewUserService(repo repository.User) *UserService

func (*UserService) CreateUser

func (s *UserService) CreateUser() (uuid.UUID, error)

func (*UserService) GenerateToken

func (s *UserService) GenerateToken(userCode uuid.UUID) (string, error)

func (*UserService) ParseToken

func (s *UserService) ParseToken(accessToken string) (uuid.UUID, error)

Jump to

Keyboard shortcuts

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