redi

package module
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 29, 2025 License: MIT Imports: 12 Imported by: 0

README

redi

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HandlerManager

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

func NewHandlerManager

func NewHandlerManager(fs filesystem.FileSystem) *HandlerManager

func NewHandlerManagerWithVersion

func NewHandlerManagerWithVersion(fs filesystem.FileSystem, version string) *HandlerManager

func (*HandlerManager) GetHandler

func (hm *HandlerManager) GetHandler(route Route) http.HandlerFunc

type Route

type Route struct {
	Path      string
	FilePath  string
	FileType  string
	IsDynamic bool
	ParamName string
}

type RouteScanner

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

func NewRouteScanner

func NewRouteScanner(fs filesystem.FileSystem, routesDir string) *RouteScanner

func (*RouteScanner) ScanRoutes

func (rs *RouteScanner) ScanRoutes() ([]Route, error)

type Server

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

func NewServer

func NewServer(root string, port int) *Server

func NewServerWithFS

func NewServerWithFS(embedFS fs.FS, port int) *Server

func NewServerWithFSAndVersion

func NewServerWithFSAndVersion(embedFS fs.FS, port int, version string) *Server

func NewServerWithVersion

func NewServerWithVersion(root string, port int, version string) *Server

func (*Server) Start

func (s *Server) Start() error

func (*Server) Stop

func (s *Server) Stop() error

Stop gracefully shuts down the server

Directories

Path Synopsis
cmd
redi command
rejs command
fs

Jump to

Keyboard shortcuts

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