gin-go-pg

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

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

Go to latest
Published: Apr 18, 2020 License: Apache-2.0 Imports: 1 Imported by: 0

README

CircleCI Maintainability Test Coverage Go Report Card GitHub

golang gin with go-pg orm

An example project that uses golang gin as webserver, and go-pg library for connecting with a PostgreSQL database.

Get started

# postgresql config
cp .env.sample .env
source .env
# get dependencies and run
go get -v ./...
go run .

Tests and coverage

go test -coverprofile c.out ./...
go tool cover -html=c.out

# or simply
./test.sh

Schema migration and cli management commands

# create a new database based on config values in .env
go run . create_db

# create our database schema
go run . create_schema

# create our superadmin user, which is used to administer our API server
go run . create_superadmin

# schema migration and subcommands are available in the migrate subcommand
# go run . migrate [command]

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