package
0.0.0-20240619125007-0cd83cff71d6
Repository: https://github.com/alecsmith96/dating-api.git
Documentation: pkg.go.dev
# Functions
NewCreateUser generates a new user record @Summary Create a new user @Description Generates a new user record based on fake data @Security BearerAuth @Tags users @Produce json @Success 200 {object} CreateUserResponseBody @Failure 400 @Failure 500 @Router /user/create [post].
NewDiscoverPotentialMatches get a filterable list of users @Summary Discover new users @Description Gets a filterable list of new users @Security BearerAuth @Tags users @Accept json @Produce json @Param user body DiscoverPotentialMatchesRequestBody true "Discover Potential Matches Request Body" @Success 200 {object} DiscoverPotentialMatchesResponseBody @Failure 400 @Failure 500 @Router /user/discover [get].
NewLoginUser logs in a user @Summary Login a user @Description Logs in a user with the provided credentials @Tags users @Accept json @Produce json @Param user body LoginUserRequestBody true "Login User Request Body" @Success 200 {object} LoginUserResponseBody @Failure 400 @Failure 500 @Router /login [post].
NewSwipeUser swipe on a user @Summary Swipe on a user @Description Provides a swipe result on a user @Security BearerAuth @Tags users @Accept json @Produce json @Param user body SwipeUserRequestBody true "Swipe User Request Body" @Success 200 {object} SwipeUserResponseBody @Failure 400 @Failure 500 @Router /user/swipe [post].
# Structs
CreateUserResponseBody represents the newly generated user object @Description Response body for the newly created user.
DiscoverPotentialMatchesRequestBody represents the filters for the returned list of users @Description the request body for the discover endpoint.
DiscoverPotentialMatchesResponseBody represents the response of the discover endpoint @Description the response body for the discover endpoint.
No description provided by the author
LoginUserRequestBody represents the login credentials for the user @Description the login information for the user.
LoginUserResponseBody represents the Bearer token to use in authenticated requests @Description the newly issued JWT for the logged in user.
PageInfo represents the filters for the returned list of users @Description the filter information for the request.
Result represents the information of the swipe result @Description the information of the swipe result.
SwipeUserRequestBody represents the swipe result on a user @Description the swipe result on a user.
SwipeUserResponseBody represents the result of the swipe @Description the result of the swipe, if theres a match it returns the matchID.
UserResponseBody represents a user that is returned by the discover endpoint @Description a user matching the filter criteria.
# Interfaces
go:generate mockgen --build_flags=--mod=mod -destination=../../mocks/jwtProcessor.go .
go:generate mockgen --build_flags=--mod=mod -destination=../../mocks/swipeRegister.go .
go:generate mockgen --build_flags=--mod=mod -destination=../../mocks/userAuthenticator.go .
go:generate mockgen --build_flags=--mod=mod -destination=../../mocks/userCreator.go .
go:generate mockgen --build_flags=--mod=mod -destination=../../mocks/userDiscoverer.go .