api

package
v0.0.0-...-f17446d Latest Latest
Warning

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

Go to latest
Published: May 14, 2022 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Overview

Package api contains API-related concerns: endpoint definitions, middlewares and all resource representations.

Index

Constants

View Source
const MailSent = "Email with reset link is sent"

MailSent message response when link is sent

Variables

This section is empty.

Functions

func LoggingMiddleware

func LoggingMiddleware(svc users.Service, logger log.Logger) users.Service

LoggingMiddleware adds logging facilities to the core service.

func MakeHandler

func MakeHandler(svc users.Service, tracer opentracing.Tracer, logger logger.Logger) http.Handler

MakeHandler returns a HTTP handler for API endpoints.

func MetricsMiddleware

func MetricsMiddleware(svc users.Service, counter metrics.Counter, latency metrics.Histogram) users.Service

MetricsMiddleware instruments core service by tracking request count and latency.

Types

This section is empty.

Jump to

Keyboard shortcuts

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