Categorygithub.com/revandpratama/go-elearning-api
modulepackage
0.0.0-20240616091406-c28b0e579523
Repository: https://github.com/revandpratama/go-elearning-api.git
Documentation: pkg.go.dev

# README

E-learning API

Simple API using repository pattern and GIN http library.

Features

  • User registration and login
  • Authentication and Authorization with JWT library
  • KRS and Score creation, update, and deletion

Installation

Packages needed

  • GIN
go get -u github.com/gin-gonic/gin
  • Gorm
go get -u gorm.io/gorm
go get -u gorm.io/driver/mysql
  • Viper
go get github.com/spf13/viper
  • JWT
go get -u github.com/golang-jwt/jwt/v5

Usage

Run the app

go run main.go

Routes

Auth

MethodActionURL
POSTLogin/api/login
POSTRegister User/api/register
POSTDelete Session/api/logout

User

MethodActionURL
GETGet KRS by userID/api/users/{userID}/krs
GETGet Score by userID/api/users/{userID}/score

KRS

MethodActionURL
GETGet all KRS/api/krs
GETGet KRS by ID/api/krs/{krsID}
POSTCreate KRS/api/krs
PUTUpdate KRS/api/krs/{krsID}
DELETEDelete KRS/api/krs/{krsID}

Score

MethodActionURL
GETGet all Score/api/score
GETGet Score by ID/api/score/{scoreID}
POSTCreate Score/api/score
PUTUpdate Score/api/score/{scoreID}
DELETEDelete Score/api/score/{scoreID}

Contributing

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

License

MIT

# Packages

No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author