go-pg-generator

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

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

Go to latest
Published: Sep 14, 2023 License: MIT Imports: 8 Imported by: 0

README

Golang struct generator for PostgreSQL

CLI tool for generation Golang structures by table definition from PostgreSQL.

Build

Install Go vendor tool govendor and run

make build

Dependencies

For generated files

import "gopkg.in/guregu/null.v3" Provides support for null values.

import "github.com/satori/go.uuid" Provides support for uuid.UUID values.

Help

Usage:
  go-pg-generator [OPTIONS]

Application Options:
  -s, --server=         Server name or IP address (default: 127.0.0.1)
  -p, --port=           Port (default: 5432)
  -u, --user=           Database user.
  -w, --password=       Database password.
  -d, --database=       Database name.
  -t, --tables=         Tables to export.
      --ssl=            SSL mode (require|verify-full|verify-ca|disable) (default: disable)
  -f, --file-per-table  Save each structure to its own .go file.
      --package=        Package name for generated files.

Help Options:
  -h, --help            Show this help message

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