
Security News
How Enterprise Security Is Adapting to AI-Accelerated Threats
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.
*** Disclaimer *** There are no guarantees of API stability until the first major version is released. Think of the current state as an alpha-phase product looking for validation from users about what features make sense and what the best UX is for those features.
/whereveryouinstalled/go/bingo get golang.org/x/tools/cmd/goimports
go get -u github.com/go-generation/go-mvc/cmd/gomvc
gomvc application Generate application filesgomvc help Help about any commandgomvc oa Generate controllers from an OpenAPI yml filegomvc resource Generate resource filesgomvc seed Generate seed filesgomvc swagger Generate controllers from a v2 Swagger yml fileCreate an application:
$ mkdir yourapplication && cd yourapplication
$ gomvc application yourapplication
Optionally create controllers from your OpenAPI or Swagger 2.0 yaml spec (json support is coming):
$ gomvc oa --spec path/to/openapi.yml
or
$ gomvc swagger --spec path/to/swagger.yml
Create more resources:
$ gomvc resource dogs
For ease of parsing, the gomvc swagger command currently converts the Swagger spec into an OpenAPI 3 spec. This is done by an underlying library gomvc uses which attempts to convert backwards compatible aspects of the spec. As such there may be some side effects or ignored properties. For example, a Swagger spec lists its reused parameters in a top level section called "parameters". In OA3, everything is nested under the "components" section. When resolving object/schema refs, you may find missing elements because it will try to look for parameters under "#/components/parameters" and not #/parameters".
As of now, gomvc assumes you will want to use the following dependencies:
gomvc application petstore --dest ~/Code/petstoremigrate create -ext sql -dir migrations -seq create_users_tableCREATE USERS (etc...)migrate -database YOUR_DATBASE_URL -path PATH_TO_YOUR_MIGRATIONS upmake dev-dependenciesdocker-compose upsqlboiler psqlgomvc resource {{tableName}} for each of the tables you want to create an endpoint for.gomvc seed.If you're managing your schema independently, you can completely remove the migrate dependency from both your workflow and the app but you can still use sqlboiler regardless.
FAQs
Unknown package
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Security News
Socket CTO Ahmad Nassri discusses why supply chain attacks now target developer machines and what AI means for the future of enterprise security.

Security News
Learn the essential steps every developer should take to stay secure on npm and reduce exposure to supply chain attacks.

Security News
Experts push back on new claims about AI-driven ransomware, warning that hype and sponsored research are distorting how the threat is understood.