Documentation ¶
Index ¶
- func CreateRouter(server *HTTPServer) (*mux.Router, error)
- type Aircraft
- type AircraftItems
- type Assignment
- type DB
- type HTTPServer
- func (s *HTTPServer) FromAssignmentsByAircraft(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) GetAircraft(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) GetAssignments(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) UpdateAircraft(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- func (s *HTTPServer) UpdateAssignments(w http.ResponseWriter, r *http.Request, vars map[string]string) error
- type HttpApiFunc
- type JobContainer
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateRouter ¶
func CreateRouter(server *HTTPServer) (*mux.Router, error)
Types ¶
type Aircraft ¶
type Aircraft struct { SerialNumber int64 `xml:"SerialNumber" json:"serialNumber" db:"serial_number"` MakeModel null.String `xml:"MakeModel" json:"makeModel" db:"make_model"` Registration null.String `xml:"Registration" json:"registration" db:"registration"` Owner null.String `xml:"Owner" json:"owner" db:"owner"` Location null.String `xml:"Location" json:"location" db:"location"` Home null.String `xml:"Home" json:"home" db:"home"` Equipment null.String `xml:"Equipment" json:"equipment" db:"equipment"` RentalDry null.Float `xml:"RentalDry" json:"rentalDry" db:"rental_dry"` RentalWet null.Float `xml:"RentalWet" json:"rentalWet" db:"rental_wet"` RentalType null.String `xml:"RentalType" json:"rentalType" db:"rental_type"` Bonus null.Float `xml:"Bonus" json:"bonus" db:"bonus"` RentedBy null.String `xml:"RentedBy" json:"rentedBy" db:"rented_by"` FuelPct null.Float `xml:"FuelPct" json:"fuelPct" db:"fuel_pct"` NeedsRepair null.Int `xml:"NeedsRepair" json:"needsRepair" db:"needs_repair"` AirframeTime null.String `xml:"AirframeTime" json:"airframeTime" db:"airframe_time"` EngineTime null.String `xml:"EngineTime" json:"engineTime" db:"engine_time"` TimeLast100hr null.String `xml:"TimeLast100hr" json:"timeLast100hr" db:"time_last_100hr"` }
type AircraftItems ¶
type AircraftItems struct {
Aircraft []Aircraft `xml:"Aircraft"`
}
type Assignment ¶
type Assignment struct { ID int64 `xml:"Id" json:"id" db:"id"` ToIcao null.String `xml:"ToIcao" json:"toIcao" db:"to_icao"` FromIcao null.String `xml:"FromIcao" json:"fromIcao" db:"from_icao"` Amount null.Int `xml:"Amount" json:"amount" db:"amount"` UnitType null.String `xml:"UnitType" json:"unitType" db:"unit_type"` Commodity null.String `xml:"Commodity" json:"commodity" db:"commodity"` Pay null.Float `xml:"Pay" json:"pay" db:"pay"` Expires null.String `xml:"expires" json:"expires" db:"expires"` Type null.String `xml:"Type" json:"type" db:"type"` PtAssignment null.String `xml:"PtAssignment" json:"ptAssignment" db:"pt_assignment"` AircraftID null.String `xml:"AircraftId" json:"aircraftId" db:"aircraft_id"` }
type DB ¶
func (*DB) FromAssignmentsByAircraft ¶
func (*DB) GetAircraft ¶
func (*DB) GetAssignments ¶
func (db *DB) GetAssignments() ([]*Assignment, error)
func (*DB) UpdateAircraft ¶
func (*DB) UpdateAssignments ¶
type HTTPServer ¶
type HTTPServer struct {
DB *DB
}
func NewHTTPServer ¶
func NewHTTPServer(db *DB) *HTTPServer
func (*HTTPServer) FromAssignmentsByAircraft ¶
func (s *HTTPServer) FromAssignmentsByAircraft(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) GetAircraft ¶
func (s *HTTPServer) GetAircraft(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) GetAssignments ¶
func (s *HTTPServer) GetAssignments(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) UpdateAircraft ¶
func (s *HTTPServer) UpdateAircraft(w http.ResponseWriter, r *http.Request, vars map[string]string) error
func (*HTTPServer) UpdateAssignments ¶
func (s *HTTPServer) UpdateAssignments(w http.ResponseWriter, r *http.Request, vars map[string]string) error
type HttpApiFunc ¶
type JobContainer ¶
type JobContainer struct {
Assignments []Assignment `xml:"Assignment"`
}
Click to show internal directories.
Click to hide internal directories.