http

package
v0.1.7 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: GPL-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoggerMiddleware

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

func ReadUserIP

func ReadUserIP(r *http.Request) string

func SanitizeLogFile

func SanitizeLogFile(filePath string) (string, error)

Types

type LogfilesResponse

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

type Server

type Server struct {
	// contains filtered or unexported fields
}
var Repo *Server

func NewServer

func NewServer(
	log logger.Logger,
	config *config.AppConfig,
	sse *sse.Server,
	db *database.DB,
	version string,
	commit string,
	date string,
	apiService apikeyService,
	authService authService,
	notificationSvc notificationService,
	updateSvc updateService,
	deviceService deviceService,
	syncService syncService,
	mangaDataService mangaDataService,
) 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