codestack-api

command module
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 11, 2018 License: MIT Imports: 8 Imported by: 0

README

Codestack-Api

GitHub version TeamCity CodeBetter license

A REST-ful API for CodeStack application with Go (golang)

alternativetext

Quick Start

Get dependencies

$ cd codestack-api/

$ go get

Run

$ go run main.go

Browse

http://localhost:8000

Structure

├── data
├── database              // Database
│   └──db.go
├── endpoints             // Endpoints
│   ├── handlers          // API core handlers
│   │   ├── course.go
│   │   ├── favorite.go
│   │   ├── survey.go
│   │   └── user.go
│   ├── auth.go
│   └── middleware.go
├── errors                // Errors
│   └──error.go
├── model                 // Models for our application
│   ├── course.go
│   ├── favorite.go
│   ├── survey.go
│   └── user.go
├── repository            // Repository
│   ├── user.go
├── router                // Routes
│   ├── router.go
├── server                // Server
│   ├── server.go
└── main.go

API

/people
  • GET : Get all users
  • POST : Create a new user
/people/{id}
  • GET : Get user
  • PUT PATCH : Update user
  • DELETE : Delete user
/people/{id}/update
  • PUT PATCH : Update user password
/people/{id}/reset
  • POST : Reset user password
/favorite
  • GET : Get favorite
  • POST : Create favorite
/favorite{id}
  • DELETE : Detele favorite
/courses
  • GET : Get all courses
  • POST : Create a new course
/courses/{id}
  • GET : Get course
  • PUT PATCH : Update course
  • DELETE : Delete course
/courses/{id}/status
  • PUT PATCH : Update course status
/courses/{id}/open
  • GET : Open course
/survey
  • GET : Get surveys
  • POST : Create a new survey

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