Skip to content

is-hoku/goa-sample

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

72 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

goa-sample

This is a sample REST API using Goa v3.

Usage

Generate presentation layer code from design

After the design is done, run this in the /webapi directory to create files. Note that make goagen removes all client files generated by goa gen.

make goagen

Build and Run

Basically, air builds the code automatically, but if you want to build it manually, run this.

make build

And you can execute the binary.

make exec

Generate infrastructure layer code from SQL

After writing queries in SQL, run this to generate code. For more information, you can see the sqlc repository.

make sqlc-generate

Migrate

After writing atlas ddl, run this to execute the migration.

make migrate

You should generate SQL files of the table definition and run the sqlc command.
Run this and everything will be fine.

make db

Generate class diagram text

Run this in the app container to generate class diagram text compatible with plantuml.

make plantuml

About

Goa v3 sample API

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published