http

package
v0.0.0-...-2b752c9 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2020 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckingAccount

type CheckingAccount struct {
	Number         string `json:"number"`
	Name           string `json:"name"`
	OverDraftLimit string `json:"over_draft_limit"`
	Balance        string `json:"balance"`
	Pin            string `json:"pin"`
}

type Customer

type Customer struct {
	ID        string `json:"id"`
	FirstName string `json:"first_name"`
	LastName  string `json:"last_name"`
	Gender    string `json:"gender"`
	Birthdate string `json:"birthdate"`
}

type Debit

type Debit struct {
	Pin    string `json:"pin"`
	Amount string `json:"amount"`
}

type Deposit

type Deposit struct {
	Pin    string `json:"pin"`
	Amount string `json:"amount"`
}

type Mapping

type Mapping struct {
	CustomerID            string `json:"customer_id"`
	CheckingAccountNumber string `json:"checking_account_number"`
}

type Router

type Router struct {
	CustomerManager          *customer_management.UseCase
	CheckingAccountManager   *checking_account_management.UseCase
	Debit                    *debit.UseCase
	Deposit                  *deposit.UseCase
	Mapper                   *assign_customer_to_checking_account.UseCase
	Port                     int
	GracefullyShutdownTimout time.Duration
}

Router is a basic http router with ezb specific REST API

func (*Router) StartRouter

func (r *Router) StartRouter(stopChan <-chan struct{}, errChan chan<- error)

StartRouter inits a new HTTP router which implements a REST API for interacting with the ezb service

Jump to

Keyboard shortcuts

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