api

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2024 License: Apache-2.0 Imports: 24 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 *slog.Logger) users.Service

LoggingMiddleware adds logging facilities to the clients service.

func MakeHandler

func MakeHandler(cls users.Service, grps groups.Service, mux *chi.Mux, logger *slog.Logger, instanceID string, pr *regexp.Regexp, providers ...oauth2.Provider) http.Handler

MakeHandler returns a HTTP handler for Users and Groups API endpoints.

func MetricsMiddleware

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

MetricsMiddleware instruments policies 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