handlers

package
v0.0.0-...-34a203c Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	MissingAPIKey         = errors.New("missing API key")
	InvalidAPIKey         = errors.New("invalid API key")
	InvalidEndpointValues = errors.New("invalid endpoint values")
	EndpointExists        = errors.New("endpoint already exists")
	EndpointMissing       = errors.New("endpoint doesnt exist")
	BucketExists          = errors.New("bucket already exists")
)

@title Throttlr API @version 0.0.1 @description This is the API for Throttlr, a rate limiting service. @BasePath /v1 @securityDefinitions.apikey ApiKeyAuth @in query @name key

View Source
var AuthError = errors.New("failed to authenticate user req")

Functions

func HandleAuth

func HandleAuth(l *slog.Logger, pool *pgxpool.Pool, gs sessions.Store) *http.ServeMux

func HandleClient

func HandleClient(l *slog.Logger, pool *pgxpool.Pool) *http.ServeMux

func HandleServer

func HandleServer(l *slog.Logger, pool *pgxpool.Pool) *http.ServeMux

Types

type HandlerErrorFunc

type HandlerErrorFunc func(http.ResponseWriter, *http.Request) *httpError

Jump to

Keyboard shortcuts

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