Versions in this module Expand all Collapse all v1 v1.0.0 Apr 12, 2019 Changes in this version + type Comment struct + Comment string + EventKey string + ID int64 + MatchKey string + RealmID *int64 + ReporterID *int64 + TeamKey string + type ErrExists struct + type ErrFKeyViolation struct + type ErrNoResults struct + type Event struct + District *string + EndDate UnixTime + FullDistrict *string + Key string + Lat float64 + LocationName string + Lon float64 + Name string + RealmID *int64 + SchemaID *int64 + StartDate UnixTime + TBADeleted bool + Webcasts pq.StringArray + Week *int + type Leaderboard []struct + type Match struct + ActualTime *UnixTime + BlueAlliance pq.StringArray + BlueScore *int + EventKey string + Key string + PredictedTime *UnixTime + RedAlliance pq.StringArray + RedScore *int + ScheduledTime *UnixTime + TBADeleted bool + func (m *Match) GetTime() *UnixTime + type PatchSchema struct + Auto StatDescriptions + ID int64 + Teleop StatDescriptions + Year *int64 + type PatchUser struct + FirstName *string + HashedPassword *string + ID int64 + LastName *string + PasswordChanged *UnixTime + Roles *Roles + Stars pq.StringArray + Username *string + type Realm struct + ID int64 + Name string + ShareReports bool + type Report struct + AutoName string + Data ReportData + ID int64 + MatchKey string + RealmID *int64 + ReporterID *int64 + TeamKey string + type ReportData struct + Auto []Stat + Teleop []Stat + func (rd *ReportData) Scan(src interface{}) error + func (rd ReportData) Value() (driver.Value, error) + type Roles struct + IsAdmin bool + IsSuperAdmin bool + IsVerified bool + func (r *Roles) Scan(src interface{}) error + func (r Roles) Value() (driver.Value, error) + type Schema struct + Auto StatDescriptions + ID int64 + RealmID *int64 + Teleop StatDescriptions + Year *int64 + type Service struct + func New(ctx context.Context, dsn string, logger *logrus.Logger) (Service, error) + func (s *Service) AlliancesUpsert(ctx context.Context, matchKey string, blueAlliance []string, ...) error + func (s *Service) CheckMatchKeyExists(matchKey string) (bool, error) + func (s *Service) CheckSimilarUsernameExists(ctx context.Context, username string, id *int64) error + func (s *Service) CheckTBAEventKeyExists(ctx context.Context, eventKey string) (bool, error) + func (s *Service) Close() error + func (s *Service) CreateSchema(ctx context.Context, schema Schema) error + func (s *Service) CreateUser(ctx context.Context, u User) error + func (s *Service) DeleteRealm(ctx context.Context, id int64) error + func (s *Service) DeleteUser(ctx context.Context, id int64) error + func (s *Service) EventsUpsert(ctx context.Context, events []Event) error + func (s *Service) GetEvent(ctx context.Context, eventKey string) (Event, error) + func (s *Service) GetEventComments(ctx context.Context, eventKey, teamKey string) (comments []Comment, err error) + func (s *Service) GetEventReports(ctx context.Context, eventKey string, realmID *int64) ([]Report, error) + func (s *Service) GetEvents(ctx context.Context, tbaDeleted bool) ([]Event, error) + func (s *Service) GetEventsFromRealm(ctx context.Context, realm *int64, tbaDeleted bool) ([]Event, error) + func (s *Service) GetLeaderboard(ctx context.Context) (Leaderboard, error) + func (s *Service) GetMatch(ctx context.Context, matchKey string) (Match, error) + func (s *Service) GetMatchTeamComments(ctx context.Context, matchKey, teamKey string) (comments []Comment, err error) + func (s *Service) GetMatches(ctx context.Context, eventKey string, teamKeys []string, tbaDeleted bool) ([]Match, error) + func (s *Service) GetPublicRealms(ctx context.Context) ([]Realm, error) + func (s *Service) GetRealm(ctx context.Context, id int64) (Realm, error) + func (s *Service) GetRealms(ctx context.Context) ([]Realm, error) + func (s *Service) GetReportsBySchemaID(ctx context.Context, schemaID int64) ([]Report, error) + func (s *Service) GetSchemaByID(ctx context.Context, id int64) (Schema, error) + func (s *Service) GetSchemaByYear(ctx context.Context, year int) (Schema, error) + func (s *Service) GetSchemas(ctx context.Context) ([]Schema, error) + func (s *Service) GetTeam(ctx context.Context, teamKey string, eventKey string) (Team, error) + func (s *Service) GetTeamEventReports(ctx context.Context, eventKey string, teamKey string, realmID *int64) ([]Report, error) + func (s *Service) GetTeamKeys(ctx context.Context, eventKey string) ([]string, error) + func (s *Service) GetTeamMatchReports(ctx context.Context, matchKey string, teamKey string) ([]Report, error) + func (s *Service) GetUserByID(ctx context.Context, id int64) (User, error) + func (s *Service) GetUserByUsername(ctx context.Context, username string) (User, error) + func (s *Service) GetUsers(ctx context.Context) ([]User, error) + func (s *Service) GetUsersByRealm(ctx context.Context, realmID int64) ([]User, error) + func (s *Service) GetVisibleSchemas(ctx context.Context, realmID *int64) ([]Schema, error) + func (s *Service) InsertRealm(ctx context.Context, realm Realm) (int64, error) + func (s *Service) MarkEventsDeleted(ctx context.Context, events []Event) error + func (s *Service) MarkMatchesDeleted(ctx context.Context, eventKey string, matches []Match) error + func (s *Service) PatchUser(ctx context.Context, pu PatchUser) error + func (s *Service) Ping(ctx context.Context) error + func (s *Service) TeamKeysUpsert(ctx context.Context, eventKey string, keys []string) error + func (s *Service) TeamsUpsert(ctx context.Context, teams []Team) error + func (s *Service) UpdateRealm(ctx context.Context, realm Realm) error + func (s *Service) UpdateTBAMatches(ctx context.Context, eventKey string, matches []Match) error + func (s *Service) UpsertEvent(ctx context.Context, event Event) (created bool, err error) + func (s *Service) UpsertMatch(ctx context.Context, match Match) error + func (s *Service) UpsertMatchTeamComment(ctx context.Context, c Comment) (created bool, err error) + func (s *Service) UpsertReport(ctx context.Context, r Report) (created bool, err error) + type Stat struct + Attempts *int + Name string + Successes *int + type StatDescription struct + Name string + Type string + type StatDescriptions []StatDescription + func (sd *StatDescriptions) Scan(src interface{}) error + func (sd StatDescriptions) Value() (driver.Value, error) + type Team struct + EventKey string + Key string + Rank *int + RankingScore *float64 + type UnixTime struct + Unix int64 + func NewUnixFromInt(time int64) UnixTime + func NewUnixFromTime(time time.Time) UnixTime + func (ut *UnixTime) MarshalJSON() ([]byte, error) + func (ut *UnixTime) Scan(src interface{}) error + func (ut *UnixTime) UnmarshalJSON(data []byte) error + func (ut UnixTime) Value() (driver.Value, error) + type User struct + FirstName string + HashedPassword string + ID int64 + LastName string + PasswordChanged UnixTime + RealmID int64 + Roles Roles + Stars pq.StringArray + Username string v0 v0.1.0 Sep 25, 2018