service

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 8, 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 GetAthleteByDsvId

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

func GetAthleteById

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

func GetAthleteByNameAndTeamAndYear added in v1.0.0

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

func GetAthletes

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

func GetAthletesByMeetingId

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

func GetAthletesByTeamId

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

func GetTeamByDsvId

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

func GetTeamById

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

func GetTeams

func GetTeams(paging Paging) ([]model.Team, 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