command

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 11, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Broker

type Broker struct {
	OrderList []Order
}

broker

func NewBroker

func NewBroker() *Broker

func (*Broker) PlaceOrders

func (b *Broker) PlaceOrders()

func (*Broker) TakeOrder

func (b *Broker) TakeOrder(order Order)

type BuyStock

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

implement Order

type Order

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

func NewBuyStock

func NewBuyStock(stock *Stock) Order

func NewSellStock

func NewSellStock(stock *Stock) Order

type SellStock

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

type Stock

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

func NewStock

func NewStock(name string, quantity int) *Stock

func (*Stock) Buy

func (s *Stock) Buy()

func (*Stock) Sell

func (s *Stock) Sell()

Jump to

Keyboard shortcuts

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