files

package
v0.0.0-...-722a0d2 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type FileStorage

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

FileStorage defines the location and allocate the size of storage to store data file

func NewFileStorage

func NewFileStorage(basePath string, maxSize int) (*FileStorage, error)

NewFileStorage return a new FileStorage with intended location and maximum file size allowed

func (*FileStorage) Write

func (fs *FileStorage) Write(path string, contents io.Reader) error

Save is a thing It implements StorageIO interface

type StorageIO

type StorageIO interface {
	Write(path string, file io.Reader) error
}

StorageIO defines the behavior of file operations

Jump to

Keyboard shortcuts

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