ziputils

package
v0.0.0-...-fcb1268 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2018 License: MIT Imports: 12 Imported by: 0

Documentation

Index

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{})
}

Jump to

Keyboard shortcuts

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