Documentation ¶
Index ¶
- Constants
- Variables
- func Authenticate(username, password string, jwtSecret []byte, us user.Service) (string, error)
- func GetPhoto(team string, year int, ps photo.Service, consumer tba.Consumer) (string, error)
- type TeamAnalysis
- func AllianceAnalysis(eventKey, matchKey, color string, schema analysis.Schema, rs report.Service, ...) ([]TeamAnalysis, error)
- func Analyze(eventKey string, teams []string, schema analysis.Schema, rs report.Service) ([]TeamAnalysis, error)
- func EventAnalysis(eventKey string, schema analysis.Schema, rs report.Service) ([]TeamAnalysis, error)
Constants ¶
View Source
const ( // SubjectClaim specifies the subject (user) of the jwt SubjectClaim = "sub" // ExpiresAtClaim specifies the time at which the jwt will expire ExpiresAtClaim = "exp" // IsAdminClaim specifies if the user is an admin user, and is prefixed with // the pigmice prefix for collision resistance IsAdminClaim = "pigmice_is_admin" )
Variables ¶
ErrUnauthorized is returned when the user being attempted to be authorized has either the wrong username or password.
Functions ¶
func Authenticate ¶
Authenticate gives a jwt signed string for a certain user.
Types ¶
type TeamAnalysis ¶
type TeamAnalysis struct { Team string `json:"team"` Notes map[string]string `json:"notes"` Reports int `json:"reports"` Stats analysis.Results `json:"stats"` }
TeamAnalysis holds information about a team, and their analyzed performance.
func AllianceAnalysis ¶
func AllianceAnalysis(eventKey, matchKey, color string, schema analysis.Schema, rs report.Service, as alliance.Service) ([]TeamAnalysis, error)
AllianceAnalysis gets information about how all teams at a certain event and match of a certain alliance performed.
func Analyze ¶
func Analyze(eventKey string, teams []string, schema analysis.Schema, rs report.Service) ([]TeamAnalysis, error)
Analyze gets statistics on how a team performed.
func EventAnalysis ¶
func EventAnalysis(eventKey string, schema analysis.Schema, rs report.Service) ([]TeamAnalysis, error)
EventAnalysis gets information about how all teams at an event performed.
Click to show internal directories.
Click to hide internal directories.