Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( FacilityDisplayNameMap = map[FacilityID]string{ AcademyFacility: "Academy", HeadquartersFacility: "Headquarters", NonMemberFacility: "Non-Member", InactiveFacility: "Inactive", AlbuquerqueFacility: "Albuquerque ARTCC", AnchorageFacility: "Anchorage ARTCC", AtlantaFacility: "Atlanta ARTCC", BostonFacility: "Boston ARTCC", ChicagoFacility: "Chicago ARTCC", ClevelandFacility: "Cleveland ARTCC", DenverFacility: "Denver ARTCC", FortWorthFacility: "Fort Worth ARTCC", HonoluluFacility: "Honolulu Control FacilityID", HoustonFacility: "Houston ARTCC", IndianapolisFacility: "Indianapolis ARTCC", JacksonvilleFacility: "Jacksonville ARTCC", KansasCityFacility: "Kansas City ARTCC", LosAngelesFacility: "Los Angeles ARTCC", MemphisFacility: "Memphis ARTCC", MiamiFacility: "Miami ARTCC", MinneapolisFacility: "Minneapolis ARTCC", NewYorkFacility: "New York ARTCC", OaklandFacility: "Oakland ARTCC", SaltLakeFacility: "Salt Lake ARTCC", SeattleFacility: "Seattle ARTCC", WashingtonFacility: "Washington, D.C. ARTCC", } )
View Source
var ( FacilityTierOne = map[FacilityID][]FacilityID{ AlbuquerqueFacility: { LosAngelesFacility, DenverFacility, KansasCityFacility, FortWorthFacility, HoustonFacility, }, LosAngelesFacility: { OaklandFacility, SaltLakeFacility, DenverFacility, AlbuquerqueFacility, HonoluluFacility, }, OaklandFacility: { SeattleFacility, SaltLakeFacility, LosAngelesFacility, HonoluluFacility, }, SeattleFacility: { AnchorageFacility, SaltLakeFacility, OaklandFacility, HonoluluFacility, }, HonoluluFacility: { AnchorageFacility, SeattleFacility, OaklandFacility, LosAngelesFacility, }, DenverFacility: { SaltLakeFacility, MinneapolisFacility, KansasCityFacility, AlbuquerqueFacility, LosAngelesFacility, }, HoustonFacility: { AlbuquerqueFacility, FortWorthFacility, MemphisFacility, JacksonvilleFacility, }, } )
View Source
var Roles = map[RoleID]Role{ AirTrafficManagerRole: { Name: "Air Traffic Manager", Groups: []GroupID{ FacilityManagement, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, DeputyAirTrafficManagerRole: { Name: "Deputy Air Traffic Manager", Groups: []GroupID{ FacilityManagement, }, RolesCanAdd: []RoleID{ AirTrafficManagerRole, }, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, FacilityManagement, }, }, TrainingAdministratorRole: { Name: "Training Administrator", Groups: []GroupID{}, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionTraining, FacilityManagement, }, }, EventCoordinatorRole: { Name: "Event Coordinator", Groups: []GroupID{ FacilityStaff, FacilityEvents, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionEvents, FacilityManagement, }, }, AssistantEventCoordinator: { Name: "Assistant Event Coordinator", Groups: []GroupID{ FacilityEvents, }, RolesCanAdd: []RoleID{ EventCoordinatorRole, }, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionEvents, FacilityManagement, }, }, FacilityEngineerRole: { Name: "Facility Engineer", Groups: []GroupID{ FacilityStaff, FacilityEngineers, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, FacilityManagement, }, }, AssistantFacilityEngineer: { Name: "Assistant Facility Engineer", Groups: []GroupID{ FacilityEngineers, }, RolesCanAdd: []RoleID{ FacilityEngineerRole, }, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, FacilityManagement, }, }, WebMasterRole: { Name: "Webmaster", Groups: []GroupID{ FacilityStaff, FacilityDevelopment, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, FacilityManagement, }, }, AssistantWebMasterRole: { Name: "Assistant Webmaster", Groups: []GroupID{ FacilityDevelopment, }, RolesCanAdd: []RoleID{ WebMasterRole, }, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, FacilityManagement, FacilityDevelopment, }, }, InstructorRole: { Name: "Instructor", Groups: []GroupID{ FacilityTraining, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionTraining, DivisionDevelopment, }, }, MentorRole: { Name: "Mentor", Groups: []GroupID{ FacilityTraining, }, RolesCanAdd: []RoleID{ TrainingAdministratorRole, }, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionTraining, DivisionDevelopment, FacilityManagement, }, }, DivisionDirectorRole: { Name: "Division Director", Groups: []GroupID{ DivisionManagement, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, AirTrafficServicesRole: { Name: "Deputy Director Air Traffic Services", Groups: []GroupID{ DivisionManagement, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, TrainingServicesRole: { Name: "Deputy Director Training Services", Groups: []GroupID{ DivisionManagement, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, SupportServicesRole: { Name: "Deputy Director Support Services", Groups: []GroupID{ DivisionManagement, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, EventsManagerRole: { Name: "Events Manager", Groups: []GroupID{ DivisionStaff, DivisionEvents, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, TechnicalManagerRole: { Name: "Technical Manager", Groups: []GroupID{ DivisionStaff, DivisionDevelopment, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, StaffDevelopmentManagerRole: { Name: "Staff Development Manager", Groups: []GroupID{ DivisionStaff, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, TrainingServicesManagerRole: { Name: "Training Services Manager", Groups: []GroupID{ DivisionStaff, DivisionTraining, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionTraining, }, }, TrainingContentManagerRole: { Name: "Training Content Manager", Groups: []GroupID{ DivisionStaff, DivisionTraining, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionTraining, }, }, DeveloperTeamRole: { Name: "Developer Team", Groups: []GroupID{ DivisionDevelopment, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, AceTeamRole: { Name: "ACE Team", Groups: []GroupID{ TrafficManagement, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionEvents, }, }, NTMSRole: { Name: "National Traffic Management Supervisor", Groups: []GroupID{ TrafficManagement, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionEvents, }, }, NTMTRole: { Name: "National Training Management Supervisor", Groups: []GroupID{ TrafficManagement, }, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionEvents, }, }, SocialMediaTeam: { Name: "Social Media Team", Groups: []GroupID{}, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, }, }, TrainingContentTeam: { Name: "Training Content Team", Groups: []GroupID{}, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionTraining, }, }, AcademyMaterialEditor: { Name: "Academy Material Editor (Academy)", Groups: []GroupID{}, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionTraining, }, }, FacilityMaterialEditor: { Name: "Academy Material Editor (Facility)", Groups: []GroupID{}, RolesCanAdd: []RoleID{ TrainingAdministratorRole, }, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionDevelopment, DivisionTraining, FacilityManagement, }, }, EmailUser: { Name: "Email User", Groups: []GroupID{}, RolesCanAdd: []RoleID{}, GroupsCanAdd: []GroupID{ DivisionManagement, DivisionStaff, FacilityManagement, FacilityStaff, }, }, }
Functions ¶
func CanAddRole ¶
CanAddRole checks if a user with the given roles can add the target role
Types ¶
type ATCRating ¶
type ATCRating int
const ( InactiveRating ATCRating = -1 SuspendedRating ATCRating = 0 ObserverRating ATCRating = 1 Student1Rating ATCRating = 2 Student2Rating ATCRating = 3 Student3Rating ATCRating = 4 ControllerRating ATCRating = 5 SeniorControllerRating ATCRating = 7 InstructorRating ATCRating = 8 SeniorInstructorRating ATCRating = 10 SupervisorRating ATCRating = 11 AdministratorRating ATCRating = 12 )
func (ATCRating) IsValidRating ¶
type FacilityID ¶
type FacilityID string
const ( // Special Facilities AcademyFacility FacilityID = "ZAE" HeadquartersFacility FacilityID = "ZHQ" NonMemberFacility FacilityID = "ZZN" InactiveFacility FacilityID = "ZZI" // ARTCC Facilities AlbuquerqueFacility FacilityID = "ZAB" AnchorageFacility FacilityID = "ZAN" AtlantaFacility FacilityID = "ZTL" BostonFacility FacilityID = "ZBW" ChicagoFacility FacilityID = "ZAU" ClevelandFacility FacilityID = "ZOB" DenverFacility FacilityID = "ZDV" FortWorthFacility FacilityID = "ZFW" HonoluluFacility FacilityID = "HCF" HoustonFacility FacilityID = "ZHU" IndianapolisFacility FacilityID = "ZID" JacksonvilleFacility FacilityID = "ZJX" KansasCityFacility FacilityID = "ZKC" LosAngelesFacility FacilityID = "ZLA" MemphisFacility FacilityID = "ZME" MiamiFacility FacilityID = "ZMA" MinneapolisFacility FacilityID = "ZMP" NewYorkFacility FacilityID = "ZNY" OaklandFacility FacilityID = "ZOA" SaltLakeFacility FacilityID = "ZLC" SeattleFacility FacilityID = "ZSE" WashingtonFacility FacilityID = "ZDC" )
func (FacilityID) DisplayName ¶
func (f FacilityID) DisplayName() string
func (FacilityID) IsTierOne ¶
func (a FacilityID) IsTierOne(b FacilityID) bool
func (FacilityID) IsValidFacility ¶
func (fac FacilityID) IsValidFacility() bool
type GroupID ¶
type GroupID string
const ( // Division Groups DivisionManagement GroupID = "div_mgmt" DivisionStaff GroupID = "div_staff" DivisionDevelopment GroupID = "div_dev" DivisionEvents GroupID = "div_events" DivisionTraining GroupID = "div_training" // Facility Groups FacilityManagement GroupID = "fac_mgmt" FacilityStaff GroupID = "fac_staff" FacilityEvents GroupID = "fac_events" FacilityTraining GroupID = "fac_training" FacilityDevelopment GroupID = "fac_dev" FacilityEngineers GroupID = "fac_eng" // Misc Groups TrafficManagement GroupID = "tmu" )
func (GroupID) RolesInGroup ¶
type PilotRating ¶
type PilotRating int
const ( NoRating PilotRating = 0 PrivatePilotRating PilotRating = 1 InstrumentRating PilotRating = 3 CommercialMultiRating PilotRating = 7 AirTransportRating PilotRating = 15 FlightInstructorRating PilotRating = 31 FlightExaminerRating PilotRating = 63 )
func (PilotRating) Int ¶
func (r PilotRating) Int() int
func (PilotRating) IsValidRating ¶
func (r PilotRating) IsValidRating() bool
func (PilotRating) Long ¶
func (r PilotRating) Long() string
func (PilotRating) Short ¶
func (r PilotRating) Short() string
type RoleID ¶
type RoleID string
const ( // ARTCC Roles AirTrafficManagerRole RoleID = "ATM" DeputyAirTrafficManagerRole RoleID = "DATM" TrainingAdministratorRole RoleID = "TA" EventCoordinatorRole RoleID = "EC" AssistantEventCoordinator RoleID = "AEC" FacilityEngineerRole RoleID = "FE" AssistantFacilityEngineer RoleID = "AFE" WebMasterRole RoleID = "WM" AssistantWebMasterRole RoleID = "AWM" InstructorRole RoleID = "INS" MentorRole RoleID = "MTR" // Division Roles DivisionDirectorRole RoleID = "USA1" AirTrafficServicesRole RoleID = "USA2" TrainingServicesRole RoleID = "USA3" SupportServicesRole RoleID = "USA4" EventsManagerRole RoleID = "USA5" TechnicalManagerRole RoleID = "USA6" StaffDevelopmentManagerRole RoleID = "USA7" TrainingServicesManagerRole RoleID = "USA8" TrainingContentManagerRole RoleID = "USA9" // Other Roles DeveloperTeamRole RoleID = "DEV" AceTeamRole RoleID = "ACE" NTMSRole RoleID = "NTMS" NTMTRole RoleID = "NTMT" SocialMediaTeam RoleID = "SMT" TrainingContentTeam RoleID = "TCT" AcademyMaterialEditor RoleID = "CBT" FacilityMaterialEditor RoleID = "FACCBT" // Misc Roles EmailUser RoleID = "EMAIL" )
func (RoleID) DisplayName ¶
func (RoleID) IsValidRole ¶
func (RoleID) RolesCanAdd ¶
Click to show internal directories.
Click to hide internal directories.