Documentation ¶
Index ¶
- Constants
- func NewDirWalkContext(fileFilterPattern string) *dirWalkContext
- func SaveTarReaderToPath(logger SimpleLogger, bodyReader io.Reader, savePath string)
- func SaveZipDirectoryReaderToFolder(logger SimpleLogger, bodyReader io.Reader, saveFolderPath string)
- func SaveZipEntryToDisk(logger SimpleLogger, destinationFolder string, fileEntry *zip.File)
- func UploadDirectoryToHttpResponseWriter(logger SimpleLogger, writer http.ResponseWriter, directoryPath string, ...)
- func UploadDirectoryToUrl(logger SimpleLogger, url, bodyType, directoryPath string, ...)
- func UploadFileToHttpResponseWriter(logger SimpleLogger, writer http.ResponseWriter, filePath string)
- func UploadFileToUrl(logger SimpleLogger, url, bodyType, filePath string, ...)
- type SimpleLogger
Constants ¶
View Source
const END_OF_TAR_FILENAME = "END_OF_TAR"
Variables ¶
This section is empty.
Functions ¶
func NewDirWalkContext ¶
func NewDirWalkContext(fileFilterPattern string) *dirWalkContext
Creates a new instance of dirWalkContext.
For example to only filter and find .txt files, use:
wc := NewDirWalkContext("*.txt")
func SaveTarReaderToPath ¶
func SaveTarReaderToPath(logger SimpleLogger, bodyReader io.Reader, savePath string)
func SaveZipDirectoryReaderToFolder ¶
func SaveZipDirectoryReaderToFolder(logger SimpleLogger, bodyReader io.Reader, saveFolderPath string)
func SaveZipEntryToDisk ¶
func SaveZipEntryToDisk(logger SimpleLogger, destinationFolder string, fileEntry *zip.File)
func UploadDirectoryToHttpResponseWriter ¶
func UploadDirectoryToHttpResponseWriter(logger SimpleLogger, writer http.ResponseWriter, directoryPath string, walkContext *dirWalkContext)
func UploadDirectoryToUrl ¶
func UploadDirectoryToUrl(logger SimpleLogger, url, bodyType, directoryPath string, walkContext *dirWalkContext, checkResponse func(resp *http.Response) error)
func UploadFileToHttpResponseWriter ¶
func UploadFileToHttpResponseWriter(logger SimpleLogger, writer http.ResponseWriter, filePath string)
func UploadFileToUrl ¶
func UploadFileToUrl(logger SimpleLogger, url, bodyType, filePath string, checkResponse func(resp *http.Response) error)
Types ¶
type SimpleLogger ¶
type SimpleLogger interface {
Debug(msg string, msgArgs ...interface{})
}
Source Files ¶
- SaveTarReaderToPath.go
- SaveZipDirectoryReaderToFolder.go
- SaveZipEntryToDisk.go
- SimpleLogger.go
- UploadDirectoryToHttpResponseWriter.go
- UploadDirectoryToUrl.go
- UploadFileToHttpResponseWriter.go
- UploadFileToUrl.go
- addDirectoryToTarStream.go
- addDirectoryToZipStream.go
- dirWalkContext.go
- getFileSize.go
- writeEndOfTarStreamHeader.go
- writeFileToTarWriter.go
Click to show internal directories.
Click to hide internal directories.