events-api2

module
v0.0.0-...-fdd12d1 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2020 License: Apache-2.0

README

cards-api

  • Start a PostgreSQL server running in a docker container
  • Setup schema
  • Seed database
  • Connect to database from service

Notes:

## Compile api and events-admin
go isntall ./...

## Start postgres:
docker-compose up -d

## Generate key
./cards-admin keygen private.pem

## Create the schema and insert some seed data.
./cards-admin --db-disable-tls=1 migrate 
./cards-admin --db-disable-tls=1 seed

## Run the app then make requests.
./cards-api --db-disable-tls=1

Info

All the endpoint addresses can be found in the Postman collection or in cmd/cards-api/internal/handlers/routes.go

Directories

Path Synopsis
cmd
Package cmd contains the executable commands generated for this project.
Package cmd contains the executable commands generated for this project.
cards-admin
The cards-admin program is a CLI tool for administering the Cards project.
The cards-admin program is a CLI tool for administering the Cards project.
cards-api
The cards-api program is a service for managing inventory and cards at the Cards project.
The cards-api program is a service for managing inventory and cards at the Cards project.
cards-api/internal
Package internal contains packages that are only relevant to the cards-api command.
Package internal contains packages that are only relevant to the cards-api command.
cards-api/internal/handlers
Package handlers provides the translation between the HTTP layer and application business logic.
Package handlers provides the translation between the HTTP layer and application business logic.
cards-api/tests
Package tests provides integration tests for the cards-api project.
Package tests provides integration tests for the cards-api project.
Package internal defines application packages used by multiple programs in this project.
Package internal defines application packages used by multiple programs in this project.
card
Package card implements all business logic regarding cards and related types.
Package card implements all business logic regarding cards and related types.
menu
Package menu implements all business logic regarding menus and related types.
Package menu implements all business logic regarding menus and related types.
mid
Package mid provides middleware that can be used by any service in this project.
Package mid provides middleware that can be used by any service in this project.
platform
Package platform holds foundational packages for this project.
Package platform holds foundational packages for this project.
platform/auth
Package auth provides authentication behavior.
Package auth provides authentication behavior.
platform/conf
Package conf provides support for using environmental variables and command line arguments for configuration.
Package conf provides support for using environmental variables and command line arguments for configuration.
platform/database
Package database helps with SQL database interactions.
Package database helps with SQL database interactions.
platform/database/databasetest
Package databasetest provides tools for launching and preparing databases in Docker containers to be used in tests.
Package databasetest provides tools for launching and preparing databases in Docker containers to be used in tests.
platform/web
Package web provides a minimal framework for common HTTP related tasks.
Package web provides a minimal framework for common HTTP related tasks.
schema
Package schema defines the database schema, migrations, and seed data for persisting records in the project.
Package schema defines the database schema, migrations, and seed data for persisting records in the project.
tests
Package tests provides helpers that should only be used in testing.
Package tests provides helpers that should only be used in testing.
user
Package users implements all business logic regarding users.
Package users implements all business logic regarding users.

Jump to

Keyboard shortcuts

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