Skip to content

m1ome/hooker

Repository files navigation

Hooker

Tool for easy s3 sftp file management

Hooker

Installation

go get github.com/m1ome/hooker

Usage

Usage of hooker:
  -check int
        Interval in seconds of file check (default 180)
  -clear
        Clear file after send (default true)
  -dir string
        Directory we should look for a new files (default "/Users/w1n2k/Work/Golang/src/github.com/m1ome/hooker")
  -interval int
        Time in seconds to sleep between checks (default 60)
  -listen string
        Server listen address (default ":8080")
  -out string
        Directory we should place zip files into (default "/Users/w1n2k/Work/Golang/src/github.com/m1ome/hooker")
  -patterns string
        Patterns we look files in directory (seperated by: ,) (default ".xml, .xlsx")
  -sep string
        Pattern separator (default ",")
  -timeout int
        Timeout waiting request from API (default 180)
  -token string
        Auth token for API
  -url string
        URL of reports API (default "http://localhost:3000/")
  -v    Verbose output
  -zip
        Zip file (default true)

Request [POST]

Body: gzipped data

Headers:

X-Access-Token: <TOKEN_HERE>
X-File-Name: GPS-CPSbalexp20170325.xml
Content-Encoding: gzip

Information request [GET]

Path: /

Response:

{
    "dir_files":[
        ".DS_Store",
        ".gitkeep",
        "GPS-CPSbalexp20170316 3.xml"
    ],
    "working_files":[
        "GPS-CPSbalexp20170316 3.xml"
    ]
}

About

CLI tool for a s3 file upload

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages