go-my-info

module
v0.0.0-...-bf028c8 Latest Latest
Warning

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

Go to latest
Published: Dec 12, 2024 License: MIT

README

My Info Backend

Written in Go for Reduces Latency.

Things Supported:

  • CRUD Operation
  • JWT Based Authentication
  • JSON Validation
  • Paginated Response
  • SQLC For modules generation
  • Goose for Database Migration
  • Air Integration to Test in Dev ENV
  • Swagger Integration

Swagger (Limited)

http://localhost:8000/swagger/index.html

Swagger Documentation

Swagger Documentation

Swagger Documentation of Models

Setup
go install github.com/air-verse/air@latest
go get github.com/go-chi/jwtauth/v5
go get github.com/go-chi/chi/v5
go get golang.org/x/crypto/bcrypt
go get github.com/joho/godotenv

Update Database

cd sql/schema
goose postgres postgres://<user_id>:<user_password>@localhost:5432/go_my_info up

Generate Internal DB

sqlc generate

Start Application

go build ./cmd/main.go && ./main

Start Dev Environment

air

Generate Swagger Documentation

go install github.com/swaggo/swag/cmd/swag@latest
swag init -o './api' -g './cmd/main.go' --parseDependency
swag fmt

Directories

Path Synopsis
Package api Code generated by swaggo/swag.
Package api Code generated by swaggo/swag.
This example demonstrates a HTTP REST web service with some fixture data.
This example demonstrates a HTTP REST web service with some fixture data.
internal

Jump to

Keyboard shortcuts

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