eden-zip

command module
v0.0.0-...-e3b3201 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2021 License: MIT Imports: 5 Imported by: 0

README

eden-zip

online superfast zipper

eden-zip

Usage

  • Try EdenZip
  • Run in localhost environment
    git clone https://github.com/zinirun/eden-zip.git
    cd ./eden-zip
    go run main.go
    

Logic

  1. Client request with urls string and filename string
    1. Split \r\n urls string to urls []string
    2. Call the zipper.Zipper() method
  2. Download urls overall and write zip file
    1. Make random string value using uriuri and define the path
    2. Download files and append filenames using go-routines
      • Download and append only with StatusOK response
      • call the downloadFile() with channel
    3. Write zip using two sync.WaitGroup and channel
      1. open files and declare os.File to channel
      2. call the writeZip() with path, files, outFilename
      3. Delete all downloaded files
      4. Return path
  3. Return file attachment to client

Dependencies

github.com/labstack/echo v3.3.10+incompatible
github.com/labstack/gommon v0.3.0 // indirect
golang.org/x/crypto v0.0.0-20201221181555-eec23a3978ad // indirect

and uriuri by dchest

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
src

Jump to

Keyboard shortcuts

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