service

package
v1.6.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddAthlete

func AddAthlete(athlete model.Athlete) (model.Athlete, error)

func AddParticipation

func AddParticipation(id primitive.ObjectID, meetId string) (model.Athlete, error)

func AddTeam

func AddTeam(team model.Team) (model.Team, error)

func AddTeamParticipation

func AddTeamParticipation(id primitive.ObjectID, meetId string) (model.Team, error)

func GetAthleteByAliasAndYear added in v1.6.0

func GetAthleteByAliasAndYear(alias string, year int) (model.Athlete, error)

func GetAthleteByDsvId

func GetAthleteByDsvId(dsvId int) (model.Athlete, error)

func GetAthleteById

func GetAthleteById(id primitive.ObjectID) (model.Athlete, error)

func GetAthleteByNameAndYear added in v1.3.0

func GetAthleteByNameAndYear(name string, year int) (model.Athlete, error)

func GetAthletes

func GetAthletes(paging Paging) ([]model.Athlete, error)

func GetAthletesAmount added in v1.6.0

func GetAthletesAmount() (int, error)

func GetAthletesAmountByMeeting added in v1.6.0

func GetAthletesAmountByMeeting(meeting string) (int, error)

func GetAthletesByMeetingId

func GetAthletesByMeetingId(id string, paging Paging) ([]model.Athlete, error)

func GetAthletesByTeamAndMeeting added in v1.6.0

func GetAthletesByTeamAndMeeting(id primitive.ObjectID, meeting string, paging Paging) ([]model.Athlete, error)

func GetAthletesByTeamId

func GetAthletesByTeamId(id primitive.ObjectID, paging Paging) ([]model.Athlete, error)

func GetTeamByAlias added in v1.6.0

func GetTeamByAlias(alias string) (model.Team, error)

func GetTeamByDsvId

func GetTeamByDsvId(dsvId int) (model.Team, error)

func GetTeamById

func GetTeamById(id primitive.ObjectID) (model.Team, error)

func GetTeamByName added in v1.5.0

func GetTeamByName(name string) (model.Team, error)

func GetTeams

func GetTeams(paging Paging) ([]model.Team, error)

func GetTeamsAmount added in v1.6.0

func GetTeamsAmount() (int, error)

func GetTeamsAmountByMeeting added in v1.6.0

func GetTeamsAmountByMeeting(meeting string) (int, error)

func GetTeamsByMeeting

func GetTeamsByMeeting(id string, paging Paging) ([]model.Team, error)

func ImportAthlete

func ImportAthlete(athlete model.Athlete, meetId string) (*model.Athlete, bool, error)

func ImportTeam

func ImportTeam(team model.Team, meetId string) (model.Team, bool, error)

func Init

func Init(c *mongo.Client)

func PingDatabase

func PingDatabase() bool

func RemoveAthleteById

func RemoveAthleteById(id primitive.ObjectID) error

func UpdateAthlete

func UpdateAthlete(athlete model.Athlete) (model.Athlete, error)

func UpdateTeam

func UpdateTeam(team model.Team) (model.Team, error)

Types

type Paging

type Paging struct {
	Limit  int
	Offset int
	Query  string
}

Jump to

Keyboard shortcuts

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