api

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2025 License: MIT Imports: 12 Imported by: 0

Documentation

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 provides API endpoint handling functionality

func NewHandler

func NewHandler(browserService *services.BrowserService) *Handler

NewHandler creates a new API handler

func (*Handler) HandleConfig

func (h *Handler) HandleConfig(cfg *config.Config) (string, []byte, bool)

HandleConfig handles GET /config endpoint

func (*Handler) HandleDefault

func (h *Handler) HandleDefault() (string, []byte, bool)

HandleDefault returns empty JSON for unknown endpoints

func (*Handler) HandleHistoryRecent

func (h *Handler) HandleHistoryRecent(u *neturl.URL) (string, []byte, bool)

HandleHistoryRecent handles GET /history/recent endpoint

func (*Handler) HandleHistorySearch

func (h *Handler) HandleHistorySearch(u *neturl.URL) (string, []byte, bool)

HandleHistorySearch handles GET /history/search endpoint

func (*Handler) HandleHistoryStats

func (h *Handler) HandleHistoryStats() (string, []byte, bool)

HandleHistoryStats handles GET /history/stats endpoint

func (*Handler) HandleRenderingStatus

func (h *Handler) HandleRenderingStatus(cfg *config.Config) (string, []byte, bool)

HandleRenderingStatus handles GET /rendering/status endpoint

type SchemeHandler

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

SchemeHandler handles custom dumb:// scheme resolution

func NewSchemeHandler

func NewSchemeHandler(
	assets embed.FS,
	parserService *services.ParserService,
	browserService *services.BrowserService,
) *SchemeHandler

NewSchemeHandler creates a new scheme handler

func (*SchemeHandler) Handle

func (s *SchemeHandler) Handle(uri string, cfg *config.Config) (string, []byte, bool)

Handle processes dumb:// scheme requests

Jump to

Keyboard shortcuts

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