payment

module
v0.0.0-...-80d4866 Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2020 License: MIT

README

A Event Driven Go Payment Microservice

Other language:

中文

This is a project to show case how to do event driven Microservice in Go. It includes two Microservices, one is "Order" service, the other is this one. The Order service calls the Payment service to make a payment. You need to run both projects together to make it work.

Getting Started

Installation
Download Code
go get github.com/jfeng45/payment
Set Up MySQL
Install MySQL
run SQL script in script folder to create database and table
Install NATS

Install NATS

Start Application
Start MySQL Server
cd [MySQLroot]/bin
mysqld
Run main
cd [rootOfProject]/cmd
go run main.go
Run "Order" Service

"Order"

License

MIT License

Directories

Path Synopsis
app
config
Package config reasd configurations from a YAML file and load them into a AppConfig type to save the configuration information for the application.
Package config reasd configurations from a YAML file and load them into a AppConfig type to save the configuration information for the application.
container
package container use dependency injection to create concrete type and wire the whole application together
package container use dependency injection to create concrete type and wire the whole application together
logger
Package logger represents a generic logging interface
Package logger represents a generic logging interface
applicationservice
dataservice/paymentdata/sqldb
Package sql represents SQL database implementation of the user data persistence layer
Package sql represents SQL database implementation of the user data persistence layer
domain
tool
gdbc
package gdbc is created to represents low level database interfaces in order to have an unified way to access database handler.
package gdbc is created to represents low level database interfaces in order to have an unified way to access database handler.
gdbc/databasehandler
Package handles low level database access including transaction through *sql.Tx or *sql.DB
Package handles low level database access including transaction through *sql.Tx or *sql.DB

Jump to

Keyboard shortcuts

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