application

package
v0.0.0-...-76fafce Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 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 App

type App interface {
	NotifyOrderCreated(ctx context.Context, notify OrderCreated) error
	NotifyOrderCanceled(ctx context.Context, notify OrderCanceled) error
	NotifyOrderReady(ctx context.Context, notify OrderReady) error
}

type Application

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

func New

func New(customers CustomerRepository) *Application

func (Application) NotifyOrderCanceled

func (a Application) NotifyOrderCanceled(ctx context.Context, notify OrderCanceled) error

func (Application) NotifyOrderCreated

func (a Application) NotifyOrderCreated(ctx context.Context, notify OrderCreated) error

func (Application) NotifyOrderReady

func (a Application) NotifyOrderReady(ctx context.Context, notify OrderReady) error

type CustomerCacheRepository

type CustomerCacheRepository interface {
	Add(ctx context.Context, customerID, name, smsNumber string) error
	UpdateSmsNumber(ctx context.Context, customerID, smsNumber string) error
	CustomerRepository
}

type CustomerRepository

type CustomerRepository interface {
	Find(ctx context.Context, customerID string) (*models.Customer, error)
}

type OrderCanceled

type OrderCanceled struct {
	OrderID    string
	CustomerID string
}

type OrderCreated

type OrderCreated struct {
	OrderID    string
	CustomerID string
}

type OrderReady

type OrderReady struct {
	OrderID    string
	CustomerID string
}

Jump to

Keyboard shortcuts

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