package
0.0.0-20241004165025-7411424d8ae7
Repository: https://github.com/mattcsn/project-par.git
Documentation: pkg.go.dev
# Functions
CreateCourse creates a new course @Summary Create a new course @Tags Courses @Accept json @Produce json @Param course body course.Model true "Course" @Success 201 {object} course.Model @Failure 400 {object} AppError @Failure 500 {object} AppError @Router /v1/courses [post].
DeleteCourse deletes a course by course_id @Summary Delete a course by ID @Tags Courses @Param id path string true "Course ID" @Success 204 "No Content" @Failure 400 {object} AppError @Failure 500 {object} AppError @Router /v1/courses/{id} [delete].
GetCourseByID gets a course by course_id @Summary Get a course by ID @Tags Courses @Produce json @Param id path string true "Course ID" @Success 200 {object} course.Model @Failure 400 {object} AppError @Failure 500 {object} AppError @Router /v1/courses/{id} [get].
GetCourseDetails godoc @Summary Get detailed information about all courses @Description Get detailed information about all courses, including ID, creation date, last update date, course name, golf name, number of holes, pitch and putt status, compact status, postal code, city, and country @Tags Courses @Produce json @Param page query int false "Page number (default is 1)" @Param pageSize query int false "Page size (default is 10)" @Success 200 {array} course.DetailsDTO @Failure 500 {object} AppError @Router /v1/courses/details [get].
GetCourses gets all courses with pagination @Summary Get all courses @Description Get all courses with pagination @Tags Courses @Produce json @Param page query int false "Page number (default is 1)" @Param pageSize query int false "Page size (default is 10)" @Success 200 {array} course.Model @Failure 500 {object} AppError @Router /v1/courses [get].
GetCoursesByGolfID gets all courses for a specific golf with pagination @Summary Get all courses for a specific golf @Tags Courses @Produce json @Param golf_id path string true "Golf ID" @Param page query int false "Page number" @Param pageSize query int false "Page size" @Success 200 {array} course.Model @Failure 400 {object} AppError @Failure 500 {object} AppError @Router /v1/golfs/{golf_id}/courses [get].
GetCoursesByGolfIDs gets all courses for multiple golfs with pagination @Summary Get all courses for multiple golfs @Tags Courses @Produce json @Param golf_ids query []string true "Golf IDs" @Param page query int false "Page number" @Param pageSize query int false "Page size" @Success 200 {array} course.Model @Failure 400 {object} AppError @Failure 500 {object} AppError @Router /v1/golfs/courses [get].
GetGolfAndCourseDetails gets the details of a golf and a specific course @Summary Get golf and course details @Tags Courses @Produce json @Param course_id path string true "Course ID" @Success 200 {object} map[string]interface{} @Failure 400 {object} AppError @Failure 500 {object} AppError @Router /v1/courses/{course_id}/details [get].
No description provided by the author
No description provided by the author
No description provided by the author
SearchCourseDetails searches for course details by name, city, postal code, or proximity to given coordinates with pagination @Summary Search course details by name, city, postal code, or proximity to given coordinates @Description Search course details by name, city, postal code, or proximity to given coordinates with pagination @Tags Courses @Produce json @Param searchTerm query string false "Search term" @Param latitude query float64 false "Latitude" @Param longitude query float64 false "Longitude" @Param page query int false "Page number (default is 1)" @Param pageSize query int false "Page size (default is 10)" @Success 200 {array} course.DetailsDTO @Failure 500 {object} AppError @Router /v1/courses/details/search [get].
UpdateCourse updates an existing course by course_id @Summary Update a course by ID @Tags Courses @Accept json @Produce json @Param id path string true "Course ID" @Param course body course.Model true "Course" @Success 200 {object} course.Model @Failure 400 {object} AppError @Failure 500 {object} AppError @Router /v1/courses/{id} [patch].
# Structs
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
No description provided by the author
Model represents a golf course @Description Model for a golf course.
No description provided by the author
No description provided by the author