GoForge
Description
This tool is designed to be used for starting a project and editing the files later. It uses sqlc to generate all the sql related code. Make sure sqlc, goimports, gofmt, and docker are installed.
Prerequisites
snap install sqlc
go install golang.org/x/tools/cmd/goimports@latest
Installation
pip install goforge
Quick start
generate the project code
$ goforge -c example.yml
delete the project
$ goforge -c example.yml -d
API Configuration Documentation
edit the yaml as per your requirements
project_path: "example" # specifies the root directory for the project
schema_file: "example.sql" # defines the sql schema file for the project
project_mod: "example.com/my_crud_app" # go.mod project name
setup_postgres_local: true # setups a postgres docker instance for seamless testing
handlers:
- name: CreateUser # handler function name
path: "/v1/api/user" # api path
sql:
name: CreateUser # sqlc model method name
annotation: exec # annotations compatible with sqlc, for eg: "one", "many" and "exec"
query: "INSERT INTO users (name, email) VALUES ($1, $2)"
request:
method: "POST"
- name: GetUsers
path: "/v1/api/users"
sql:
name: GetUsers
annotation: many
query: "SELECT id, name, email FROM users LIMIT $1 AND OFFSET $2"
request:
method: "GET"
Metadata
Release files for goforge 0.2.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| goforge-0.2.0.tar.gz | 6.8 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| goforge-0.2.0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 16.5 kB
Release files / goforge-0.2.0.tar.gz
| Download URL | goforge-0.2.0.tar.gz |
|---|---|
| Size | 6.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
5a9b4c24cbfd2374ae9bc10e6552af6e92abcdca0b50fe269d1d81c875a1508a
|
|
BLAKE2b-256 checksum How to use checksums |
a074b348f569b3b834deaef3948ae6514cb5a31600274d4f2bbe7ded7095aa15
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Release files / goforge-0.2.0-py3-none-any.whl
| Download URL | goforge-0.2.0-py3-none-any.whl |
|---|---|
| Size | 9.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
5869b94041be1ad27816881051b538c4e5689a2a0f5cbf0bc5949c4a7a16dec3
|
|
BLAKE2b-256 checksum How to use checksums |
2f6ec2d02e1c0475fa95d6b4a80eea2f16db3b578bfed5bf4420dff9134fc336
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/5.1.1 CPython/3.10.12
|
Security for goforge 0.2.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.