go-api

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

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

Go to latest
Published: Jun 22, 2018 License: MIT Imports: 5 Imported by: 0

README

Go Report Card

Go-Api

Simple REST API written in Golang using MongoDB.

Method URI Description
GET /album List of music albums
GET /album/:id Get a single album
POST /album Add a new album
PUT /album/:id Update an album by ID
DELETE /album/:id Delete an album by ID

Run application

# Make sure "dep" is installed
go get -u github.com/golang/dep/cmd/dep

dep ensure

go run main.go

Note: This API defines the MongoDB connection details under album/repository.go

const (
	SERVER  = "127.0.0.1:27017"
	DBNAME  = "musicstore"
	DOCNAME = "albums"
)

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