infrastructure

package
v0.0.0-...-b05fc82 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2020 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitTracer

func InitTracer(zipkinURL string, zipkinBridge bool) (stdopentracing.Tracer, zipkinreporter.Reporter)

Types

type CustomerRepository

type CustomerRepository struct {
	Customers map[string]*domain.Customer
}

func (*CustomerRepository) CreateCustomer

func (c *CustomerRepository) CreateCustomer(name string, creditLimit float64) (string, error)

func (*CustomerRepository) GetCustomerByName

func (c *CustomerRepository) GetCustomerByName(name string) (*domain.Customer, error)

func (*CustomerRepository) Ping

func (c *CustomerRepository) Ping() error

type CustomerRepositoryInterface

type CustomerRepositoryInterface interface {
	CreateCustomer(string, float64) (string, error)
	GetCustomerByName(string) (*domain.Customer, error)
	Ping() error
}

func NewCustomerRepository

func NewCustomerRepository() CustomerRepositoryInterface

type MockEventBus

type MockEventBus struct {
}

MockEventBus is a mock implementation of an event bus.

func (MockEventBus) Publish

func (ev MockEventBus) Publish(queueName string, evt domain.Event) error

Publish sends a new message to the event bus.

Jump to

Keyboard shortcuts

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