Documentation
¶
Index ¶
- Variables
- func AddDelayedJob(queue, body string, duration time.Duration) error
- func AddRoleStringToUser(user *models.User, role string) error
- func AddRoleToUser(user *models.User, role *models.Role) error
- func Atoi(a string) int
- func Atou(a string) uint
- func Connect(options DBOptions) error
- func ConnectRedis(options RedisOptions)
- func FindAPIKey(key string) (*models.APIKeys, error)
- func FindAirportATCByID(id string) (*models.AirportATC, error)
- func FindAirportByID(id string) (*models.Airport, error)
- func FindAirportChartsByID(id string) ([]*models.AirportChart, error)
- func FindAirportsByARTCC(artcc string, atc bool) ([]*models.Airport, error)
- func FindOI(user *models.User) (string, error)
- func FindRating(id int) (*models.Rating, error)
- func FindRatingByShort(short string) (*models.Rating, error)
- func FindRole(name string) (*models.Role, error)
- func FindTrainingSessionRequestByID(id string) (*models.TrainingRequest, error)
- func FindTrainingSessionRequestWithFilter(f *TrainingSessionRequestFilter) ([]*models.TrainingRequest, error)
- func FindTrainingSessionRequests() ([]*models.TrainingRequest, error)
- func FindUserByCID(cid string) (*models.User, error)
- func FindUserByOperatingInitials(oi string) (*models.User, error)
- func FindUserCertifications(user *models.User) ([]*models.UserCertification, error)
- func FindUsersWithRole(role string) ([]models.User, error)
- func FindVisitorApplicationByCID(cid string) (*models.VisitorApplication, error)
- func GenerateDSN(options DBOptions) (string, error)
- func GetCabStatsForUser(user *models.User, startDate, endDate time.Time) (float32, error)
- func GetCertifications() []models.Certification
- func GetEnrouteStatsForUser(user *models.User, startDate, endDate time.Time) (float32, error)
- func GetEvent(id string) (*models.Event, error)
- func GetEvents(limit int) ([]*models.Event, error)
- func GetStatsForUserAndMonth(user *models.User, month int, year int) (float32, float32, float32, error)
- func GetTerminalStatsForUser(user *models.User, startDate, endDate time.Time) (float32, error)
- func HandleCACert(driver string, cacert string) error
- func InvalidateCertCache()
- func IsOperatingInitialsAllocated(operatingInitials string) bool
- func RemoveRoleFromUser(user *models.User, role *models.Role) error
- func ValidCertification(key string) bool
- type DBOptions
- type Logger
- func (l *Logger) Debug(ctx context.Context, s string, args ...interface{})
- func (l *Logger) Error(ctx context.Context, s string, args ...interface{})
- func (l *Logger) Info(ctx context.Context, s string, args ...interface{})
- func (l *Logger) LogMode(gormlog.LogLevel) gormlog.Interface
- func (l *Logger) Trace(ctx context.Context, begin time.Time, fc func() (string, int64), err error)
- func (l *Logger) Warn(ctx context.Context, s string, args ...interface{})
- type RedisOptions
- type TrainingSessionRequestFilter
Constants ¶
This section is empty.
Variables ¶
View Source
var DB *gorm.DB
View Source
var Redis *redis.Client
Functions ¶
func ConnectRedis ¶
func ConnectRedis(options RedisOptions)
func FindAirportATCByID ¶
func FindAirportATCByID(id string) (*models.AirportATC, error)
func FindAirportChartsByID ¶
func FindAirportChartsByID(id string) ([]*models.AirportChart, error)
func FindAirportsByARTCC ¶
func FindTrainingSessionRequestByID ¶
func FindTrainingSessionRequestByID(id string) (*models.TrainingRequest, error)
func FindTrainingSessionRequestWithFilter ¶
func FindTrainingSessionRequestWithFilter(f *TrainingSessionRequestFilter) ([]*models.TrainingRequest, error)
func FindTrainingSessionRequests ¶
func FindTrainingSessionRequests() ([]*models.TrainingRequest, error)
func FindUserCertifications ¶
func FindUserCertifications(user *models.User) ([]*models.UserCertification, error)
func FindVisitorApplicationByCID ¶
func FindVisitorApplicationByCID(cid string) (*models.VisitorApplication, error)
func GenerateDSN ¶
func GetCabStatsForUser ¶
func GetCertifications ¶
func GetCertifications() []models.Certification
func GetEnrouteStatsForUser ¶
func GetStatsForUserAndMonth ¶
func GetTerminalStatsForUser ¶
func HandleCACert ¶
func InvalidateCertCache ¶
func InvalidateCertCache()
func ValidCertification ¶
Types ¶
type Logger ¶
type Logger struct { SlowThreshold time.Duration SourceField string SkipErrRecordNotFound bool // contains filtered or unexported fields }
type RedisOptions ¶
Source Files
¶
Click to show internal directories.
Click to hide internal directories.