service

command
v0.0.0-...-e069ee5 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2017 License: MIT Imports: 6 Imported by: 0

README

Upload.ly Service

The upload.ly service provides all the REST APIs that integrate with Google Cloud Platform.

Pre-requisites

Following are the pre-requisites to build and run on a local Mac.

  • Brew
/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"
  • Go 1.8 or higher
brew install go
  • An IDE of choice (maybe GoGland)
  • Set a suitable GOPATH. Ex: export GOPATH=$HOME/go
  • Pull the code locally:
go get github.com/vjsamuel/uploadly
  • Install govendor
go get -u github.com/kardianos/govendor
  • Pull in all vendored dependencies:
cd $GOPATH/src/github.com/vjsamuel/uploadly
govendor sync
  • Install memcache and start it up
brew install memcached
memcached &
  • Now a token file needs to be obtained from Google Cloud APIs console. Goto the API console.
  • Click on "Create credentials" and on the drop down "service account key".
  • Select the service account and click on create. This will download a json file which can be saved in service/token.json

Running the application

  • Export the following environment variables:
export GOOGLE_APPLICATION_CREDENTIALS=token.json 
export BUCKET=<bucket name>
export PROJECT_ID=<project id>
  • Start the application using:
go run main.go

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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