requests

package
v0.0.0-...-652a4c9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 18, 2024 License: Apache-2.0 Imports: 47 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertActionsToStat

func ConvertActionsToStat(submitActions *submit_actions.SubmitActions) (db.Stats2023, error)

func ConvertActionsToStat2024

func ConvertActionsToStat2024(submit2024Actions *submit_2024_actions.Submit2024Actions) (db.Stats2024, error)

func HandleRequests

func HandleRequests(db Database, scoutingServer server.ScoutingServer)

Types

type Action

type Action = submit_actions.Action

type Action2024

type Action2024 = submit_2024_actions.Action

type Database

type Database interface {
	AddToMatch(db.TeamMatch) error
	AddToShift(db.Shift) error
	AddToStats2023(db.Stats2023) error
	AddToStats2024(db.Stats2024) error
	ReturnMatches() ([]db.TeamMatch, error)
	ReturnAllNotes() ([]db.NotesData, error)
	ReturnAllDriverRankings() ([]db.DriverRankingData, error)
	ReturnAllShifts() ([]db.Shift, error)
	ReturnStats2023() ([]db.Stats2023, error)
	ReturnStats2023ForTeam(teamNumber string, matchNumber int32, setNumber int32, compLevel string, preScouting bool) ([]db.Stats2023, error)
	ReturnStats2024() ([]db.Stats2024, error)
	ReturnStats2024ForTeam(teamNumber string, matchNumber int32, setNumber int32, compLevel string, compType string) ([]db.Stats2024, error)
	QueryAllShifts(int) ([]db.Shift, error)
	QueryNotes(string) ([]string, error)
	QueryPitImages(string) ([]db.RequestedPitImage, error)
	ReturnPitImages() ([]db.PitImage, error)
	AddNotes(db.NotesData) error
	AddPitImage(db.PitImage) error
	AddDriverRanking(db.DriverRankingData) error
	AddAction(db.Action) error
	DeleteFromStats(string, int32, int32, string) error
	DeleteFromStats2024(string, int32, int32, string) error
	DeleteFromActions(string, int32, int32, string) error
}

The interface we expect the database abstraction to conform to. We use an interface here because it makes unit testing easier.

type Delete2023DataScoutingHandler

type Delete2023DataScoutingHandler struct {
	// contains filtered or unexported fields
}

func (Delete2023DataScoutingHandler) ServeHTTP

func (handler Delete2023DataScoutingHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type Delete2024DataScoutingHandler

type Delete2024DataScoutingHandler struct {
	// contains filtered or unexported fields
}

func (Delete2024DataScoutingHandler) ServeHTTP

func (handler Delete2024DataScoutingHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type MatchAssemblyKey

type MatchAssemblyKey struct {
	MatchNumber int32
	SetNumber   int32
	CompLevel   string
}

Change structure of match objects in the database(1 per team) to the old match structure(1 per match) that the webserver uses. We use the information in this struct to identify which match object corresponds to which old match structure object.

type RequestAllNotes

type RequestAllNotes = request_all_notes.RequestAllNotes

type SubmitActions

type SubmitActions = submit_actions.SubmitActions

type SubmitDriverRankingHandler

type SubmitDriverRankingHandler struct {
	// contains filtered or unexported fields
}

func (SubmitDriverRankingHandler) ServeHTTP

func (handler SubmitDriverRankingHandler) ServeHTTP(w http.ResponseWriter, req *http.Request)

type SubmitNotes

type SubmitNotes = submit_notes.SubmitNotes

type SubmitPitImage

type SubmitPitImage = submit_pit_image.SubmitPitImage

Directories

Path Synopsis
cli

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL