payment

package
v0.0.0-...-e510c16 Latest Latest
Warning

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

Go to latest
Published: Mar 29, 2019 License: MIT Imports: 15 Imported by: 0

README

Payments Command Part

Payment service with HTTP REST API used for creation / updates of the payment model. It's implemented using Event Sourcing patter under the hood.

Configuration

Used env vars:

# possible env vars, below shown default vaules:
export PAYMENT_LISTEN_HOST="localhost"
export PAYMENT_LISTEN_PORT="8080"
export PAYMENT_POSTGRES_URL="postgres://usr:pwd@localhost:5432/events?sslmode=disable"
export PAYMENT_POSTGRES_MIGRATIONS_PATH="file://payment/adapters/store/migrations"

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Initialize

func Initialize(l logrus.FieldLogger, publisher eventflow.Publisher) (*http.Server, *sql.DB)

Initialize

Types

type Config

type Config struct {
	ListenHost string `envconfig:"payment_listen_host" default:"localhost"`
	ListenPort string `envconfig:"payment_listen_port" default:"8080"`
	// we could split user and password from below
	PostgresURL            string `envconfig:"payment_postgres_url" default:"postgres://usr:pwd@localhost:5432/events?sslmode=disable"`
	PostgresMigrationsPath string `envconfig:"payment_postgres_migrations_path" default:"file://payment/adapters/store/migrations"`
}

read env vars

Directories

Path Synopsis
adapters
api

Jump to

Keyboard shortcuts

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