command
module
Version:
v1.2.0
Opens a new window with list of versions in this module.
Published: Jul 11, 2018
License: MIT
Opens a new window with license information.
Imports: 8
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Codestack-Api
A REST-ful API for CodeStack application with Go (golang)
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}
/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
/survey
GET
: Get surveys
POST
: Create a new survey
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
Click to show internal directories.
Click to hide internal directories.