transport

package
v0.0.0-...-e9c9027 Latest Latest
Warning

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

Go to latest
Published: Apr 6, 2020 License: MIT, MIT Imports: 20 Imported by: 0

Documentation

Overview

* @File: transport.http.go * @Description: Defines REST endpoints for the user service * @Author: Yoan Yomba (yoanyomba@lens-platform.net)

Index

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

func GetServiceMetrics(r *mux.Router) *mux.Route

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 GetSwaggerDocumentation

func GetSwaggerDocumentation(r *mux.Router, logger *zap.Logger)

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.

Jump to

Keyboard shortcuts

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