imagestore

command module
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2015 License: MIT Imports: 8 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

README

ImageStore GoDoc Build Status

An incredibly simple image store.

WARNING Don't run this in the wild! Images can be uploaded and deleted by unauthenticated users.

Current features:

  • Add files using HTTP POST
  • Get files using HTTP GET
  • Remove files using HTTP DELETE
  • Images are stored in an S3 bucket

Requirements:

  • Have AWS_ACCESS_KEY_ID and AWS_SECRET_ACCESS_KEY environment variables set
  • Have the correct permissions for the bucket you're using
    • You can disable the "upload" endpoint by removing S3 bucket write permissions

Install imagestore:

go get github.com/ian-kent/imagestore

Start the server:

# Default port 5253
imagestore -bucket="bucket-name" -prefix="optional/prefix"

# Custom interface/port
imagestore -bind=:5353 -bucket="bucket-name" -prefix="optional/prefix"

Upload something:

curl -v -X POST --data-binary "@Makefile" http://localhost:5253/images/Makefile

Get something:

curl -v http://localhost:5253/images/Makefile

Delete something:

curl -v -X DELETE http://localhost:5253/images/Makefile

Find something:

curl -v http://localhost:5253/find?q=images/app-name
Using Marathon

If you're using Mesos and Marathon, you can easily start imagestore:

Command:

AWS_ACCESS_KEY_ID=your-id AWS_SECRET_ACCESS_KEY=your-key ./imagestore -bucket="bucket-name" -bind=:$PORT

URI:

https://github.com/ian-kent/imagestore/releases/download/v1.0.4/imagestore-1.0.4_linux_amd64.zip

Licence

Copyright ©‎ 2015, Ian Kent (http://www.iankent.eu).

Released under MIT license, see LICENSE for details.

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

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