filestream

package
v1.7.1 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	FileType  = "file"
	ErrorType = "error"
)

Variables

This section is empty.

Functions

func ReadFilesFromStream

func ReadFilesFromStream(multipartReader *multipart.Reader, fileWritersFunc FileWriterFunc) error

func WriteFilesToStream

func WriteFilesToStream(multipartWriter *multipart.Writer, filesList []*FileInfo) (err error)

Types

type FileInfo

type FileInfo struct {
	Name string
	Path string
}

type FileWriterFunc

type FileWriterFunc func(fileName string) (writers []io.WriteCloser, err error)

The expected type of function that should be provided to the ReadFilesFromStream func, that returns the writer that should handle each file

type MultipartError

type MultipartError struct {
	FileName   string `json:"file_name"`
	ErrMessage string `json:"error_message"`
}

Jump to

Keyboard shortcuts

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