service

package
v0.0.0-...-7767b9c Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2022 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Deps

type Deps struct {
	Repos   *repository.Repositories
	Storage *storage.Storage
	Cache   *cache.Cache
}

type FileService

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

func NewFileService

func NewFileService(repo repository.Files, storage *storage.Storage) *FileService

func (*FileService) AllFiles

func (f *FileService) AllFiles(fType string) map[string][]int

func (*FileService) Delete

func (f *FileService) Delete(id int) (int, error)

func (*FileService) GetFile

func (f *FileService) GetFile(id int, params domain.FileParams) ([]byte, error)

func (*FileService) UploadFile

func (f *FileService) UploadFile(file *multipart.FileHeader) (uint, error)

type Files

type Files interface {
	UploadFile(file *multipart.FileHeader) (uint, error)
	GetFile(id int, params domain.FileParams) ([]byte, error)
	AllFiles(fType string) map[string][]int
	Delete(id int) (int, error)
}

type Service

type Service struct {
	Files Files
}

func NewServices

func NewServices(deps *Deps) *Service

Jump to

Keyboard shortcuts

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