system-pembayaran-spp-go-api

command module
v0.0.0-...-ec625fb Latest Latest
Warning

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

Go to latest
Published: May 22, 2023 License: MIT Imports: 2 Imported by: 0

README

Go-Lang Fiber Project

System Pembayaran SPP API

How to use

  • Please clone or download this repository.
git clone https://github.com/destafajri/system-pembayaran-spp-go-api.git
  • Prepare postgres database, for this project i use SUPABASE
  • add .env file to setup your database connection and configuration
  • if you want to use docker, you can type
docker-compose up

OR

docker-compose up -d
  • migrator tools from golang migrate
  • to install the migration tools, you can type
go install -tags 'postgres,mysql,mongodb’ github.com/golang-migrate/migrate/v4/cmd/migrate@latest
  • to create, drop, and alter table migration you can read this link
  • to run your database schema
make migrate-up
  • to run the golang server
make run

or

go run main.go

Framework

  • Web : GoFiber
  • Validation : Go-Ozzo
  • Configuration : GoDotEnv
  • Database : Postgre(Supabase)

Architecture

Controller -> Service -> Repository

Project Structure example

.
├── config
├── exception
├── helper
│   ├── jwts
│   ├── password
│   └── timeutil
├── internal
│   ├── controller
│   │   ├── bayar
│   │   ├── guru
│   │   ├── kelas
│   │   ├── siswa
│   │   ├── spp
│   │   └── user
│   ├── domain
│   │   ├── entity
│   │   └── model
│   ├── middlewares
│   ├── repository
│   │   └── database
│   │       ├── mongo
│   │       ├── mysql
│   │       └── postgres
│   │           ├── bayar_repository
│   │           ├── guru_repository
│   │           ├── kelas_repository
│   │           ├── siswa_repository
│   │           ├── spp_repository
│   │           └── user_repository
│   ├── service
│   │   ├── bayar_service
│   │   ├── guru_service
│   │   ├── kelas_service
│   │   ├── siswa_service
│   │   ├── spp_service
│   │   └── user_service
│   └── validations
├── meta
│   └── param
├── migrations
│   ├── cmd
│   │   ├── down
│   │   └── up
│   ├── mysql
│   └── postgres
├── responses
└── vendor

Addition

  • Entity is representing database table
  • Model is representing payload and response
  • Helper is representing anything what you need to help your coding process

Documentation

The Go Gopher

There is no documentation for this package.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL