api

package
v1.7.5 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2026 License: AGPL-3.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(cfg RouterConfig) http.Handler

NewRouter creates and configures the HTTP router

Types

type RouterConfig

type RouterConfig struct {
	DB                 *sql.DB
	Logger             *slog.Logger
	AuthService        *auth.Service
	Config             *config.Config // Full application config
	Version            string
	Commit             string
	RateLimit          int
	RateLimitWindow    int // in seconds
	MaxFilesPerSnippet int
	S3Config           *config.S3Config
	SnippetService     *services.SnippetService // For demo mode
	BasePath           string                   // Base path for reverse proxy
	OpenAPIPath        string                   // Resolved path to openapi.yaml
}

RouterConfig holds router configuration

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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