Skip to content

dongmook-lee/edgecraft-api-fork

 
 

Repository files navigation

edgecraft-api

[참고자료] https://github.com/create-go-app/fiber-go-template https://github.com/golang-standards/project-layout https://gofiber.io/

go version go report license

구성 요소

  • golang 1.18
  • fiber 2.34 - web framework

📦 Used packages

Name Version Type
gofiber/fiber v2.34.0 core
gofiber/jwt v2.2.7 middleware
arsmn/fiber-swagger v2.31.1 middleware
stretchr/testify v1.7.1 tests
golang-jwt/jwt v4.4.1 auth
joho/godotenv v1.4.0 config
jmoiron/sqlx v1.3.5 database
jackc/pgx v4.16.1 database
go-sql-driver/mysql v1.6.0 database
gorm.io/gorm v1.23.6 database
go-redis/redis v8.11.5 cache
swaggo/swag v1.8.2 utils
google/uuid v1.3.0 utils
go-playground/validator v10.10.0 utils

Project workflow

Project Structure

🗄 Directory structure

./api

Folder with OpenAPI/Swagger 스펙들.

./cmd

Main applications for this project.

./internal

Private application and library code.. This is the code you don't want others importing in their applications or libraries.

  • ./internal/cache folder with in-memory cache setup functions (by default, Redis)
  • ./internal/database folder with database setup functions (by default, PostgreSQL)
  • ./internal/controllers folder for functional controllers (used in routes)
  • ./internal/entites folder for describe business models and methods of your project
  • ./internal/service folder for describe queries for models of your project
  • ./internal/routes folder for describe routes of your project

./pkg

Library code that's ok to use by external applications.. This directory contains all the project-specific code tailored only for your business use case, like configs, middleware, routes or utils.

  • ./pkg/configs folder for configuration functions
  • ./pkg/middleware folder for add middleware (Fiber built-in and yours)
  • ./pkg/repository folder for describe const of your project
  • ./pkg/utils folder with utility functions (server starter, error checker, etc)

./docs

Folder with 사용자 문서들.

./scripts

빌드, 설치, 분석, 기타 작업을 위한 스크립트들.


⚡️ Quick start

  1. Rename .env.example to .env and fill it with your environment values.

  2. Install Docker and the following useful Go tools to your system:

3. Run project by this command:

make docker.run

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Go 95.7%
  • Makefile 2.1%
  • Shell 1.5%
  • Dockerfile 0.7%