http

package
v1.57.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2025 License: GPL-2.0 Imports: 35 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileFS added in v1.55.0

func FileFS(r *chi.Mux, path, file string, filesystem fs.FS)

FileFS registers a new route with path to serve a file from the provided file system.

func LoggerMiddleware

func LoggerMiddleware(logger *zerolog.Logger) func(next http.Handler) http.Handler

func StaticFS added in v1.55.0

func StaticFS(r *chi.Mux, pathPrefix string, filesystem fs.FS)

StaticFS registers a new route with path prefix to serve static files from the provided file system.

func StaticFSNew added in v1.55.0

func StaticFSNew(r *chi.Mux, baseUrl, pathPrefix string, filesystem fs.FS)

StaticFSNew registers a new route with path prefix to serve static files from the provided file system.

func StaticFileHandler added in v1.55.0

func StaticFileHandler(file string, filesystem fs.FS) http.HandlerFunc

StaticFileHandler creates a handler function to serve a file from the provided file system.

Types

type IndexParams added in v1.55.0

type IndexParams struct {
	Title        string
	Version      string
	BaseUrl      string
	AssetBaseUrl string
}

type LogFile added in v1.46.0

type LogFile struct {
	Name      string    `json:"filename"`
	SizeBytes int64     `json:"size_bytes"`
	Size      string    `json:"size"`
	UpdatedAt time.Time `json:"updated_at"`
}

type LogfilesResponse

type LogfilesResponse struct {
	Files []LogFile `json:"files"`
	Count int       `json:"count"`
}

type Server

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

func NewServer

func NewServer(log logger.Logger, config *config.AppConfig, sse *sse.Server, db *database.DB, version string, commit string, date string, actionService actionService, apiService apikeyService, authService authService, downloadClientSvc downloadClientService, filterSvc filterService, feedSvc feedService, indexerSvc indexerService, ircSvc ircService, listSvc listService, notificationSvc notificationService, proxySvc proxyService, releaseSvc releaseService, updateSvc updateService) Server

func (Server) Handler

func (s Server) Handler() http.Handler

func (Server) IsAuthenticated

func (s Server) IsAuthenticated(next http.Handler) http.Handler

func (Server) Open

func (s Server) Open() error

Jump to

Keyboard shortcuts

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