Documentation ¶
Index ¶
- type KafkaDetails
- type KafkaProxy
- func (kp *KafkaProxy) BuyGood(good string, quantity int) ([]byte, error)
- func (kp *KafkaProxy) Close()
- func (kp *KafkaProxy) GetFlightPlan(planId string) ([]byte, error)
- func (kp *KafkaProxy) GetMarketplaceProducts(location string) ([]byte, error)
- func (kp *KafkaProxy) GetShipInfo() ([]byte, error)
- func (kp *KafkaProxy) Read() []byte
- func (kp *KafkaProxy) SellGood(good string, quantity int) ([]byte, error)
- func (kp *KafkaProxy) SetNewFlightPlan(destination string) ([]byte, error)
- func (kp *KafkaProxy) Write(key, msg string) error
- type Proxy
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KafkaDetails ¶
type KafkaProxy ¶
type KafkaProxy struct { Consumer *KafkaDetails Producer *KafkaDetails // contains filtered or unexported fields }
func (*KafkaProxy) BuyGood ¶
func (kp *KafkaProxy) BuyGood(good string, quantity int) ([]byte, error)
BuyGood sends to game a purchase order.
https://api.spacetraders.io/#api-purchase_orders-NewPurchaseOrder
func (*KafkaProxy) Close ¶
func (kp *KafkaProxy) Close()
func (*KafkaProxy) GetFlightPlan ¶
func (kp *KafkaProxy) GetFlightPlan(planId string) ([]byte, error)
GetFlightPlan retrieves information about current flight plan for specific ship, if any.
func (*KafkaProxy) GetMarketplaceProducts ¶
func (kp *KafkaProxy) GetMarketplaceProducts(location string) ([]byte, error)
GetMarketplaceProducts gathers information about products available to trade in the planet where the ship is.
func (*KafkaProxy) GetShipInfo ¶
func (kp *KafkaProxy) GetShipInfo() ([]byte, error)
GetShipInfo collects information about specific ship.
func (*KafkaProxy) Read ¶
func (kp *KafkaProxy) Read() []byte
func (*KafkaProxy) SellGood ¶
func (kp *KafkaProxy) SellGood(good string, quantity int) ([]byte, error)
SellGood sends to game a sell order.
func (*KafkaProxy) SetNewFlightPlan ¶
func (kp *KafkaProxy) SetNewFlightPlan(destination string) ([]byte, error)
SetNewFlightPlan sends to game a new destination where the ships needs to fly to.
func (*KafkaProxy) Write ¶
func (kp *KafkaProxy) Write(key, msg string) error
type Proxy ¶
type Proxy interface { // GetShipInfo collects information about specific ship. // // https://api.spacetraders.io/#api-ships-GetShip GetShipInfo() ([]byte, error) // GetMarketplaceProducts gathers information about products available to trade in the planet where the ship is. // // https://api.spacetraders.io/#api-locations-GetMarketplace GetMarketplaceProducts(string) ([]byte, error) // SetNewFlightPlan sends to game a new destination where the ships needs to fly to. // // https://api.spacetraders.io/#api-flight_plans-NewFlightPlan SetNewFlightPlan(string) ([]byte, error) // GetFlightPlan retrieves information about current flight plan for specific ship, if any. // // https://api.spacetraders.io/#api-flight_plans-GetFlightPlan GetFlightPlan(string) ([]byte, error) // BuyGood sends to game a purchase order. // // https://api.spacetraders.io/#api-purchase_orders-NewPurchaseOrder BuyGood(string, int) ([]byte, error) // SellGood sends to game a sell order. // // https://api.spacetraders.io/#api-sell_orders-NewSellOrder SellGood(string, int) ([]byte, error) }
Click to show internal directories.
Click to hide internal directories.