service

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Nov 9, 2023 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddDisqualification

func AddDisqualification(disqualification model.Disqualification) (model.Disqualification, error)

func AddHeat

func AddHeat(heat model.Heat) (model.Heat, error)

func AddStart

func AddStart(start model.Start) (model.Start, error)

func GetCurrentHeat added in v0.2.0

func GetCurrentHeat(meeting string) (model.Heat, error)

func GetCurrentStarts added in v0.2.0

func GetCurrentStarts(meeting string) ([]model.Start, error)

func GetDisqualificationById

func GetDisqualificationById(id primitive.ObjectID) (model.Disqualification, error)

func GetDisqualifications

func GetDisqualifications() ([]model.Disqualification, error)

func GetHeatById

func GetHeatById(id primitive.ObjectID) (model.Heat, error)

func GetHeatByNumber

func GetHeatByNumber(meeting string, event int, number int) (model.Heat, error)

func GetHeatInfoByMeeting added in v0.2.0

func GetHeatInfoByMeeting(meeting string) (dto.MeetingHeatInfoDto, error)

func GetHeatInfoByMeetingAndEvent added in v0.2.0

func GetHeatInfoByMeetingAndEvent(meeting string, event int) (dto.EventHeatInfoDto, error)

func GetHeats

func GetHeats() ([]model.Heat, error)

func GetHeatsAmountByMeetingAndEvent added in v0.3.0

func GetHeatsAmountByMeetingAndEvent(meeting string, event int) (int, error)

func GetHeatsByMeeting

func GetHeatsByMeeting(id string) ([]model.Heat, error)

func GetHeatsByMeetingForEventList added in v0.3.0

func GetHeatsByMeetingForEventList(meeting string) (dto.MeetingHeatsEventListDto, error)

func GetStartById

func GetStartById(id primitive.ObjectID) (model.Start, error)

func GetStartByMeetingAndEventAndAthleteId

func GetStartByMeetingAndEventAndAthleteId(meeting string, event int, athleteId primitive.ObjectID) (model.Start, error)

func GetStartByMeetingAndEventAndAthleteMeetingId

func GetStartByMeetingAndEventAndAthleteMeetingId(meeting string, event int, athleteMeetingId int) (model.Start, error)

func GetStartByMeetingAndEventAndAthleteNameAndYear

func GetStartByMeetingAndEventAndAthleteNameAndYear(meeting string, event int, athleteName string, year int) (model.Start, error)

func GetStartByMeetingAndEventAndHeatAndLane

func GetStartByMeetingAndEventAndHeatAndLane(meeting string, event int, heat int, lane int) (model.Start, error)

func GetStartFromImport

func GetStartFromImport(start model.Start) (model.Start, bool, error)

func GetStarts

func GetStarts() ([]model.Start, error)

func GetStartsAmount added in v0.2.0

func GetStartsAmount() (int, error)

func GetStartsByAthlete

func GetStartsByAthlete(athlete primitive.ObjectID) ([]model.Start, error)

func GetStartsByMeeting

func GetStartsByMeeting(meeting string) ([]model.Start, error)

func GetStartsByMeetingAndAthlete

func GetStartsByMeetingAndAthlete(meeting string, athlete primitive.ObjectID) ([]model.Start, error)

func GetStartsByMeetingAndEvent

func GetStartsByMeetingAndEvent(meeting string, event int) ([]model.Start, error)

func GetStartsByMeetingAndEventAndHeat

func GetStartsByMeetingAndEventAndHeat(meeting string, event int, heat int) ([]model.Start, error)

func ImportDisqualification

func ImportDisqualification(start model.Start, disqualification model.Disqualification) (*model.Disqualification, bool, error)

func ImportHeat

func ImportHeat(heat model.Heat) (model.Heat, bool, error)

ImportHeat imports a heat; returns the created or existing heat and a boolean if it was created or already present

func ImportResult

func ImportResult(start model.Start, result model.Result) (*model.Result, bool, error)

func ImportStart

func ImportStart(start model.Start) (*model.Start, bool, error)

func Init

func Init(c *mongo.Client)

func PingDatabase

func PingDatabase() bool

func RemoveDisqualificationById

func RemoveDisqualificationById(id primitive.ObjectID) error

func RemoveHeatById

func RemoveHeatById(id primitive.ObjectID) error

func RemoveStartById

func RemoveStartById(id primitive.ObjectID) error

func UpdateDisqualification

func UpdateDisqualification(disqualification model.Disqualification) (model.Disqualification, error)

func UpdateHeat

func UpdateHeat(heat model.Heat) (model.Heat, error)

func UpdateHeatTimes added in v0.4.0

func UpdateHeatTimes(id primitive.ObjectID, time time.Time, timeType string) (model.Heat, error)

func UpdateStart

func UpdateStart(start model.Start) (model.Start, error)

func UpdateStartAddResult

func UpdateStartAddResult(startId primitive.ObjectID, result model.Result) (model.Result, error)

func UpdateStartSetDisqualification

func UpdateStartSetDisqualification(startId primitive.ObjectID, disqualificationId primitive.ObjectID) error

Types

This section is empty.

Jump to

Keyboard shortcuts

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