declare

package
v0.0.0-...-80b40fb Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2024 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CheckInCommand

type CheckInCommand struct {
	Plate         Plate
	CheckedInTime time.Time
	// contains filtered or unexported fields
}

func (*CheckInCommand) Handle

func (command *CheckInCommand) Handle() bool

func (*CheckInCommand) Init

func (command *CheckInCommand) Init(repo_ ParkingRepo) (v *CheckInCommand)

type CheckInFailedEvent

type CheckInFailedEvent struct {
	Plate
	Time time.Time
}

type CheckInFailedEventListener

type CheckInFailedEventListener interface {
	// contains filtered or unexported methods
}

type CheckOutFailedEvent

type CheckOutFailedEvent struct {
	Plate
	Time    time.Time
	Message string
}

type CheckedInEvent

type CheckedInEvent struct {
	Plate
	Time time.Time
}

type CheckedInEventListener

type CheckedInEventListener interface {
	// contains filtered or unexported methods
}

type CheckedOutEvent

type CheckedOutEvent struct {
	Plate
	Time time.Time
}

type EventQueue

type EventQueue interface {
	Enqueue(event CheckedInEvent)
	GetItems() list.List
}

type PaidEvent

type PaidEvent struct {
	Plate
	Amount  int
	PayTime time.Time
}

type ParkingAgg

type ParkingAgg struct {
	EventQueue_ EventQueue
	Id          Plate
	CheckInTime time.Time
	LastPayTime time.Time
	TotalPaid   int
}

func (*ParkingAgg) HandleCheckIn

func (agg *ParkingAgg) HandleCheckIn(command CheckInCommand) bool

func (*ParkingAgg) IsInPark

func (agg *ParkingAgg) IsInPark() bool

type ParkingRepo

type ParkingRepo interface {
	FindById(id string) ParkingAgg
}

type Plate

type Plate struct {
	// 号码
	Number string
}

Plate 车牌

Jump to

Keyboard shortcuts

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