_1_mocks

package
v0.0.0-...-ec98fb3 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bank

type Bank interface {
	Charge(ctx context.Context, customerName string, amount int64) (string, error)
}

type Order

type Order struct {
	CustomerName  string
	CustomerEmail string
	Amount        int64
}

type OrderManager

type OrderManager struct {
	// contains filtered or unexported fields
}

func NewOrderManager

func NewOrderManager(bank Bank, sender ReceiptSender) *OrderManager

func (*OrderManager) Process

func (o *OrderManager) Process(ctx context.Context, order Order) (string, error)

type Receipt

type Receipt struct {
	ID string
}

type ReceiptDecorator

type ReceiptDecorator interface {
	Decorate(receipt *Receipt) error
}

type ReceiptSender

type ReceiptSender interface {
	SendReceipt(ctx context.Context, customerEmail string, amount int64, receiptNo string) error
}

Jump to

Keyboard shortcuts

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