go-echo-crud

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

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

Go to latest
Published: Nov 4, 2021 License: MIT Imports: 19 Imported by: 0

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

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL