Documentation ¶
Index ¶
- Constants
- func PatchEventRequest(base *models.Event, patch EventRequest) *models.Event
- func PatchUserFromUserResponse(user *models.User, userResponse UserResponseAdmin) []string
- type AirportWeatherDTO
- type ControllerStats
- type EmailTemplateRequest
- type EventPositionRequest
- type EventPositionResponse
- type EventRequest
- type EventSignupRequest
- type EventSignupResponse
- type EventsResponse
- type FacilityReportDTO
- type FacilityStaffResponse
- type FeedbackPatchRequest
- type FeedbackRequest
- type FeedbackResponse
- type OnlineController
- type StaffingRequest
- type StorageRequest
- type TrainingNoteRequest
- type TrainingRequest
- type TrainingRequestCreateRequest
- type TrainingRequestEditRequest
- type TrainingRequestSlot
- type UserResponse
- type UserResponseAdmin
- type UserResponseCertifications
- type VisitorResponse
Constants ¶
View Source
const ( ErrInvalidOperatingInitials = "invalid operating initials" ErrInvalidControllerType = "invalid controller type" ErrInvalidCertification = "invalid certification" ErrInvalidRating = "invalid rating" ErrInvalidStatus = "invalid status" )
Variables ¶
This section is empty.
Functions ¶
func PatchEventRequest ¶
func PatchEventRequest(base *models.Event, patch EventRequest) *models.Event
func PatchUserFromUserResponse ¶
func PatchUserFromUserResponse(user *models.User, userResponse UserResponseAdmin) []string
Types ¶
type AirportWeatherDTO ¶
type ControllerStats ¶
type ControllerStats struct { CID uint `json:"cid" example:"1"` FirstName string `json:"first_name" example:"Daniel"` LastName string `json:"last_name" example:"Hawton"` OperatingInitials string `json:"operating_initials" example:"DAN"` ControllerType string `json:"controllerType" example:"home"` Rating string `json:"rating" example:"S1"` Cab float32 `json:"cab" example:"0.5"` Terminal float32 `json:"terminal" example:"0.5"` Enroute float32 `json:"enroute" example:"0.5"` }
func GetDTOForUserAndMonth ¶
type EmailTemplateRequest ¶
type EventPositionRequest ¶
type EventPositionResponse ¶
type EventPositionResponse struct { ID uint `json:"id"` Position string `json:"position"` UserID *uint `json:"cid"` User *UserResponse `json:"user"` }
func ConvEventPositionToEventPositionResponse ¶
func ConvEventPositionToEventPositionResponse(position *models.EventPosition) *EventPositionResponse
func ConvEventPositionsToEventPositionResponse ¶
func ConvEventPositionsToEventPositionResponse(positions []*models.EventPosition) []*EventPositionResponse
type EventRequest ¶
type EventSignupRequest ¶
type EventSignupResponse ¶
type EventSignupResponse struct { ID uint `json:"id"` Choice1 string `json:"choice1"` Choice2 string `json:"choice2"` Choice3 string `json:"choice3"` Notes string `json:"notes"` UserID *uint `json:"cid"` User *UserResponse `json:"user"` }
func ConvEventSignupToEventSignupResponse ¶
func ConvEventSignupToEventSignupResponse(signup *models.EventSignup) *EventSignupResponse
func ConvEventSignupsToEventSignupResponse ¶
func ConvEventSignupsToEventSignupResponse(signups []*models.EventSignup) []*EventSignupResponse
type EventsResponse ¶
type EventsResponse struct { ID uint `json:"id"` Title string `json:"title"` Description string `json:"description"` Banner string `json:"banner"` StartDate time.Time `json:"start_date"` EndDate time.Time `json:"end_date"` Positions []*EventPositionResponse `json:"positions"` Signups []*EventSignupResponse `json:"signups"` CreatedAt time.Time `json:"created_at"` UpdatedAt time.Time `json:"updated_at"` }
func ConvEventToEventsResponse ¶
func ConvEventToEventsResponse(event *models.Event) *EventsResponse
func ConvEventsToEventsResponse ¶
func ConvEventsToEventsResponse(events []*models.Event) []*EventsResponse
type FacilityReportDTO ¶
type FacilityReportDTO struct { Position string Duration int LogonTime *time.Time `json:"logon_time"` }
func ConvertControllerStatsToFacilityReport ¶
func ConvertControllerStatsToFacilityReport(stats []*models.ControllerStat) []*FacilityReportDTO
type FacilityStaffResponse ¶
type FacilityStaffResponse struct { ATM []*UserResponse `json:"atm" yaml:"atm" xml:"atm"` DATM []*UserResponse `json:"datm" yaml:"datm" xml:"datm"` TA []*UserResponse `json:"ta" yaml:"ta" xml:"ta"` EC []*UserResponse `json:"ec" yaml:"ec" xml:"ec"` FE []*UserResponse `json:"fe" yaml:"fe" xml:"fe"` WM []*UserResponse `json:"wm" yaml:"wm" xml:"wm"` Events []*UserResponse `json:"events" yaml:"events" xml:"events"` Facilities []*UserResponse `json:"facilities" yaml:"facilities" xml:"facilities"` Web []*UserResponse `json:"web" yaml:"web" xml:"web"` Instructor []*UserResponse `json:"instructor" yaml:"instructor" xml:"instructor"` Mentor []*UserResponse `json:"mentor" yaml:"mentor" xml:"mentor"` }
func GetStaffResponse ¶
func GetStaffResponse() (*FacilityStaffResponse, error)
type FeedbackPatchRequest ¶
type FeedbackRequest ¶
type FeedbackResponse ¶
type FeedbackResponse struct { ID int `json:"id"` Submitter *UserResponse `json:"submitter"` Controller *UserResponse `json:"controller"` Rating string `json:"rating"` Status string `json:"status"` Position string `json:"position"` Callsign string `json:"callsign"` Comments string `json:"comments"` ContactEmail string `json:"contact_email"` CreatedAt *time.Time `json:"created_at"` }
func ConvertFeedbacktoResponse ¶
func ConvertFeedbacktoResponse(feedback []*models.Feedback, includeEmail bool) []FeedbackResponse
func ConvertSingleFeedbacktoResponse ¶
func ConvertSingleFeedbacktoResponse(feedback *models.Feedback, includeEmail bool) *FeedbackResponse
type OnlineController ¶
type OnlineController struct { CID uint `json:"cid" example:"1"` Controller *UserResponse `json:"controller"` Position string `json:"position" example:"ANC_00_CTR"` Frequency string `json:"frequency" example:"118.000"` OnlineSince string `json:"online_since" example:"2020-01-01T00:00:00Z"` }
func ConvertOnlineToDTO ¶
func ConvertOnlineToDTO(online *models.OnlineController) *OnlineController
func ConvertOnlineToDTOs ¶
func ConvertOnlineToDTOs(online []models.OnlineController) []OnlineController
type StaffingRequest ¶
type StaffingRequest struct { DepartureAirport string `json:"departureAirport" binding:"required"` ArrivalAirport string `json:"arrivalAirport" binding:"required"` StartDate string `json:"startDate" binding:"required"` EndDate string `json:"endDate" binding:"required"` Pilots int `json:"pilots" binding:"required"` ContactInfo string `json:"contactInfo" binding:"required"` Organization string `json:"organization"` BannerURL string `json:"bannerUrl"` Comments string `json:"comments"` }
type StorageRequest ¶
type TrainingNoteRequest ¶
type TrainingRequest ¶
type TrainingRequest struct { ID string `json:"id"` Student *UserResponse `json:"student"` Instructor *UserResponse `json:"instructor"` Position string `json:"position"` Status string `json:"status"` Notes string `json:"notes"` InstructorNotes string `json:"instructor_notes"` Start *time.Time `json:"start"` End *time.Time `json:"end"` Slots []*TrainingRequestSlot `json:"slots"` CreatedAt *time.Time `json:"created_at"` UpdatedAt *time.Time `json:"updated_at"` }
func ConvertTrainingRequestToDTO ¶
func ConvertTrainingRequestToDTO(t *models.TrainingRequest) *TrainingRequest
func ConvertTrainingRequestsToDTO ¶
func ConvertTrainingRequestsToDTO(t []*models.TrainingRequest) []*TrainingRequest
type TrainingRequestCreateRequest ¶
type TrainingRequestCreateRequest struct { Position string `json:"position"` Notes string `json:"notes"` Slots []*TrainingRequestSlot `json:"slots"` }
type TrainingRequestSlot ¶
type UserResponse ¶
type UserResponse struct { CID uint `json:"cid" yaml:"cid" xml:"cid"` FirstName string `json:"first_name" yaml:"first_name" xml:"first_name"` LastName string `json:"last_name" yaml:"last_name" xml:"last_name"` OperatingInitials string `json:"operating_initials" yaml:"operating_initials" xml:"operating_initials"` ControllerType string `json:"controller_type" yaml:"controller_type" xml:"controller_type"` Certifications map[string]*UserResponseCertifications `json:"certifications" yaml:"certifications" xml:"certifications"` Rating string `json:"rating" yaml:"rating" xml:"rating"` Status string `json:"status" yaml:"status" xml:"status"` Roles []string `json:"roles" yaml:"roles" xml:"roles"` Region string `json:"region" yaml:"region" xml:"region"` Division string `json:"division" yaml:"division" xml:"division"` Subdivision string `json:"subdivision" yaml:"subdivision" xml:"subdivision"` DiscordID string `json:"discord_id" yaml:"discord_id" xml:"discord_id"` RosterJoinDate string `json:"roster_join_date" yaml:"roster_join_date" xml:"roster_join_date"` ExemptedFromActivity *bool `json:"exempted_from_activity" yaml:"exempted_from_activity" xml:"exempted_from_activity"` CreatedAt string `json:"created_at" yaml:"created_at" xml:"created_at"` UpdatedAt string `json:"updated_at" yaml:"updated_at" xml:"updated_at"` }
func ConvUserToUserResponse ¶
func ConvUserToUserResponse(user *models.User) *UserResponse
func GetUsersByRole ¶
func GetUsersByRole(role string) ([]*UserResponse, error)
type UserResponseAdmin ¶
type UserResponseAdmin struct { CID uint `json:"cid" yaml:"cid" xml:"cid"` FirstName string `json:"first_name" yaml:"first_name" xml:"first_name"` LastName string `json:"last_name" yaml:"last_name" xml:"last_name"` OperatingInitials string `json:"operating_initials" yaml:"operating_initials" xml:"operating_initials"` ControllerType string `json:"controller_type" yaml:"controller_type" xml:"controller_type"` Certifications map[string]*UserResponseCertifications `json:"certifications" yaml:"certifications" xml:"certifications"` RemovalReason string `json:"removal_reason" yaml:"removal_reason" xml:"removal_reason"` Rating string `json:"rating" yaml:"rating" xml:"rating"` Status string `json:"status" yaml:"status" xml:"status"` Roles []string `json:"roles" yaml:"roles" xml:"roles"` Region string `json:"region" yaml:"region" xml:"region"` Division string `json:"division" yaml:"division" xml:"division"` Subdivision string `json:"subdivision" yaml:"subdivision" xml:"subdivision"` DiscordID string `json:"discord_id" yaml:"discord_id" xml:"discord_id"` ExemptedFromActivity *bool `json:"exempted_from_activity" yaml:"exempted_from_activity" xml:"exempted_from_activity"` RosterJoinDate string `json:"roster_join_date" yaml:"roster_join_date" xml:"roster_join_date"` CreatedAt string `json:"created_at" yaml:"created_at" xml:"created_at"` UpdatedAt string `json:"updated_at" yaml:"updated_at" xml:"updated_at"` }
type VisitorResponse ¶
type VisitorResponse struct { ID uint `json:"id" yaml:"id" xml:"id"` User *UserResponse `json:"user" yaml:"user" xml:"user"` CreatedAt string `json:"created_at" yaml:"created_at" xml:"created_at"` UpdatedAt string `json:"updated_at" yaml:"updated_at" xml:"updated_at"` }
func ConvVisitorApplicationsToResponse ¶
func ConvVisitorApplicationsToResponse(applications []models.VisitorApplication) []*VisitorResponse
Click to show internal directories.
Click to hide internal directories.