command
module
Version:
v0.0.0-...-bc7015d
Opens a new window with list of versions in this module.
Published: Nov 4, 2021
License: MIT
Opens a new window with license information.
Imports: 19
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
¶
Go Sample API using Echo framework
Features
- Basic CRUD API utilizing sqlite database
- TTL Cache for database query results
- Open API Spec/Swagger endpoint
TODO
- initialize DB + migrations support
- stub external api call
- Unit + Integration tests
Requirements
- Install Go
https://golang.org/doc/install
- Table must exist in sqlite DB prior to using API. Create statement defined: 000001_create_items_table.up.sql
- TODO included to remove this manual step
Environment Variables
Required for DB connection
Defined: config.go
Running the server
Defined in Makefile
Run the server
make run
Build binary
make build
Run unit tests in Docker
make unit
Swagger
Update docs within /docs
directory: make build-swagger
Run server and navigate to url: localhost:1323/swagger/
Documentation
¶
There is no documentation for this package.
Source Files
¶
Directories
¶
|
|
|
|
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag
|
Package docs GENERATED BY THE COMMAND ABOVE; DO NOT EDIT This file was generated by swaggo/swag |
|
|
Package mocks is a generated GoMock package.
|
Package mocks is a generated GoMock package. |
|
|
|
|
Click to show internal directories.
Click to hide internal directories.