repositories

package
v0.0.0-...-226c3a4 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2020 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ProviderSet = wire.NewSet(NewFileManager)

Functions

This section is empty.

Types

type FileManager

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

func (*FileManager) CreateDirectory

func (m *FileManager) CreateDirectory(fileSpace, directory string) error

func (*FileManager) CreateFile

func (m *FileManager) CreateFile(fileSpace, fileName string, data []byte) error

func (*FileManager) CreateFileSpace

func (m *FileManager) CreateFileSpace(fileSpace string) error

func (*FileManager) FetchFile

func (m *FileManager) FetchFile(fileSpace, fileName string) ([]byte, error)

func (*FileManager) IsFileExists

func (m *FileManager) IsFileExists(fileSpace, fileName string) bool

type FilesRepository

type FilesRepository interface {
	CreateFileSpace(fileSpace string) error
	CreateDirectory(fileSpace, directory string) error
	CreateFile(fileSpace, fileName string, data []byte) error
	IsFileExists(fileSpace, fileName string) bool
	FetchFile(fileSpace, fileName string) ([]byte, error)
}

func CreateFileRepository

func CreateFileRepository(f string) (FilesRepository, error)

func NewFileManager

func NewFileManager(logger *zap.Logger, fm files.FileManager) FilesRepository

Jump to

Keyboard shortcuts

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