Documentation ¶
Index ¶
- func AddVisitingController(cid string) (int, error)
- func DeleteTrainingNote(id string) (int, error)
- func EditTrainingNote(id, studentcid, instructorcid, position string, sessiondate time.Time, ...) (int, error)
- func GetUserFacility(cid string) (string, error)
- func IsVisitorEligible(cid string) (bool, map[string]interface{}, error)
- func RemoveController(cid string, by uint, reason string) (int, error)
- func RemoveVisitingController(cid string, by uint, reason string) (int, error)
- func SubmitTrainingNote(studentcid, instructorcid, position string, sessiondate time.Time, ...) (int, int, error)
- type TransferChecklistStruct
- type VATUSAController
- type VATUSAFacility
- type VATUSAFacilityInfo
- type VATUSAFacilityRole
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddVisitingController ¶
AddVisitingController adds a visitor to the visiting roster at VATUSA.
func DeleteTrainingNote ¶
func EditTrainingNote ¶
func GetUserFacility ¶
GetFacility returns the Facility for a user in VATUSA.
If a user is not in VATUSA's roster, it will return an error of "user not found". Other errors will be returned as-is.
VATUSA-ism: a controller not assigned to a facility will be in "ZAE". These can be controllers that are in other divisions/regions, so you should also check the division/region from the VATSIM API pkg's GetLocation method.
func IsVisitorEligible ¶
Check if user is eligible to be a visitor Return: eligible (bool), raw data (map[string]interface{}), error
func RemoveController ¶
RemoveController removes a home controller from the roster at VATUSA.
func RemoveVisitingController ¶
RemoveVisitingController removes a controller from the visiting roster at VATUSA.
Types ¶
type TransferChecklistStruct ¶
type TransferChecklistStruct struct {
Data map[string]interface{} `json:"data"`
}
type VATUSAController ¶
type VATUSAController struct { CID int `json:"cid"` FirstName string `json:"fname"` LastName string `json:"lname"` Email string `json:"email"` Rating int `json:"rating"` Facility string `json:"facility"` Membership string `json:"membership"` RatingShort string `json:"rating_short"` FacilityJoin time.Time `json:"facility_join"` }
func GetFacilityRoster ¶
func GetFacilityRoster(membership string) ([]VATUSAController, error)
GetFacilityRoster will grab the facility roster from VATUSA. If membership is not specified, or it is not "home" or "visit", it will return both rosters.
type VATUSAFacility ¶
type VATUSAFacility struct { Info *VATUSAFacilityInfo `json:"info"` Roles []*VATUSAFacilityRole `json:"roles"` Stats map[string]interface{} `json:"stats"` }
func GetFacility ¶
func GetFacility(id string) (*VATUSAFacility, error)