api

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Jun 26, 2026 License: MIT Imports: 32 Imported by: 0

Documentation

Overview

Package api implements led's JSON HTTP API.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

type Handler struct {
	// contains filtered or unexported fields
}

Handler bundles dependencies shared by all API endpoints.

func New

func New(cfg *config.Config, db *gorm.DB, c *crypto.Cipher, a *auth.Manager, g *geo.Resolver) *Handler

func (*Handler) Routes

func (h *Handler) Routes() *http.ServeMux

Routes returns the API mux mounted at /api/. It returns the concrete *http.ServeMux (not http.Handler) so plugins can mount additional /api/... routes onto the same mux before it is served.

Jump to

Keyboard shortcuts

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