Documentation ¶
Overview ¶
* @File: transport.http.go * @Description: Defines REST endpoints for the user service * @Author: Yoan Yomba (yoanyomba@lens-platform.net)
Index ¶
- func CreateUserEndpoint(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption) *mux.Route
- func GetServiceMetrics(r *mux.Router) *mux.Route
- func GetSwaggerDocumentation(r *mux.Router, logger *zap.Logger)
- func GetUserByEmail(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption) *mux.Route
- func GetUserById(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption) *mux.Route
- func GetUserByUsername(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption) *mux.Route
- func LogInUser(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption)
- func NewHTTPHandler(s service.Service, endpoints serviceendpoint.Set, duration metrics.Histogram, ...) http.Handler
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateUserEndpoint ¶
func CreateUserEndpoint(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption) *mux.Route
Create User godoc @Summary Hits the create user api endpoint @Description Creates a user in the backend datastore @Tags HTTP API @Accept json @Produce json @Router /v1/user/create [post] @Success 200
func GetServiceMetrics ¶
GetServiceMetricsgodoc @Summary Prometheus metrics @Description returns HTTP requests duration and Go runtime metrics @Tags Kubernetes @Accept json @Produce json @Router /v1/metrics [get] @Success 200 {string} string "OK"
func GetUserByEmail ¶
func GetUserByEmail(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption) *mux.Route
Get User by Email godoc @Summary Hits the get user by email api endpoint @Description Obtains a user in the backend datastore based on the provided email @Tags HTTP API @Accept json @Produce json @Router /v1/user/email/{email} [get] @Success 200
func GetUserById ¶
func GetUserById(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption) *mux.Route
Get User by ID godoc @Summary Hits the get user by id api endpoint @Description Obtains a user in the backend datastore based on the provided id @Tags HTTP API @Accept json @Produce json @Router /v1/user/id/{id} [get] @Success 200
func GetUserByUsername ¶
func GetUserByUsername(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption) *mux.Route
Get User by Username godoc @Summary Hits the get user by username api endpoint @Description Obtains a user in the backend datastore based on the provided username @Tags HTTP API @Accept json @Produce json @Router /v1/user/username/{username} [get] @Success 200
func LogInUser ¶
func LogInUser(r *mux.Router, e serviceendpoint.Set, options []httptransport.ServerOption)
LogIn User godoc @Summary Hits the login user api endpoint @Description Attempts to log a user into the system given the user exists in the backend data store @Tags HTTP API @Accept json @Produce json @Router /v1/user/login [get] @Success 200
func NewHTTPHandler ¶
func NewHTTPHandler(s service.Service, endpoints serviceendpoint.Set, duration metrics.Histogram, otTracer stdopentracing.Tracer, zipkinTracer *stdzipkin.Tracer, logger *zap.Logger) http.Handler
NewHTTPHandler returns an HTTP handler that makes a set of endpoints available on predefined paths.
Types ¶
This section is empty.