Documentation ¶
Index ¶
- func AddNewParking(cfg Config) error
- func FreeParkingSlot(parkingName string, floorNo int, slotNo int) error
- func GetAllCarRegNoByColour(parkingName string, colour string) ([]string, error)
- func GetAllSlotsByColour(parkingName string, colour string) ([]string, error)
- func GetSlotNoByReg(parkingName string, reg string) ([]string, error)
- func Status(parkingName string) ([]string, error)
- type Car
- type CarType
- type Config
- type FloorConfig
- type IVehicle
- type SlotType
- type SpaceConfig
- type Ticket
- type TicketStatus
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddNewParking ¶
func GetAllCarRegNoByColour ¶
func GetAllSlotsByColour ¶
Types ¶
type Config ¶
type Config struct { Name string `json:"parking_name"` Floors []FloorConfig `json:"floors"` }
func GetMultiFloorParkingConfig ¶
GetMultiFloorParkingConfig
func GetSimpleParkingConfig ¶
GetSimple, well this is to considered the fact that, for this assignment input is only parking Size
type FloorConfig ¶
type FloorConfig struct { Total int `json:"total"` Space []SpaceConfig `json:"space"` }
type SlotType ¶
type SlotType int
const ( DEFAULT SlotType = 0 TWO_WHEELER SlotType = 1 FOUR_WHEELER SlotType = 2 BIG_VEHIHLE SlotType = 3 TotalSlotTypes SlotType = 4 )
Default -> Its only to simplify as in given problem no parking space type is mentioned. Eventualy the parking slot can be extended for different slot types.
func (*SlotType) UnmarshalJSON ¶
type SpaceConfig ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.