Skip to content

Kkmikaze/go-rest-api

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

18 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Rest API Documentation

Table Of Content

Prerequisites

What things you need to setup the application:

Spesification

This application uses:

  • Gin
  • Gorm
  • PostgreSQL

Layout

.
└── cmd
|   ├── migration
|   |   └── migration.go
|   └── main.go
├── config
|   ├── db
|   |   ├── db.go
|   |   └── postgresql.go
|   ├── cors.go
|   └── routers.go
├── internal
|   ├── contoller
|   |   ├── article
|   |   │   └── article.go
|   |   ├── root
|   |   │   └── root.go
|   |   └── user
|   |       └── auth.go
|   ├── domain
|   │   ├── article
|   │   │   ├── model
|   │   │   │   ├── article_request.go
|   │   │   │   ├── article_response.go
|   │   │   │   └── article.go
|   │   │   ├── repository
|   │   │   │   └── article.go
|   │   │   └── service
|   │   │       └── article.go
|   │   └── user
|   │       ├── model
|   │       │   ├── user_request.go
|   │       │   ├── user_response.go
|   │       │   └── user.go
|   │       ├── repository
|   │       │   └── user.go
|   │       └── service
|   │           └── user.go
|   ├── middleware
|   │   └── auth.go
|   └── router
|       └── main.go
├── lib
|   ├── auth
|   │   └── context.go
|   ├── constant
|   │   └── error.go
|   ├── encrypt
|   │   └── encrypt.go
|   ├── env
|   │   └── env.go
|   └── response
|       └── response.go
├── .env.example
├── .gitignore
├── go.mod
├── go.sum
├── LICENSE
├── Makefile
└── README.md

How To

Running The App

  • First get the dependencies with this command:
make mod
  • Copy the .env.example to .env with run this command:
make env
  • for migrate database schema use this command:
make migration
  • and for running the application can use this command:
make run

References

GIT Style

For commit message style or git style guide, use this doc

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages