web

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Feb 15, 2026 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRouter

func NewRouter(
	orgSvc *services.OrganizationService,
	entitySvc *services.EntityService,
	natsEmbedded *embeddednats.EmbeddedNATS,
	sseHandler *SSEHandler,
	apiHandler http.Handler,
	sessionAuth *middleware.SessionAuth,
) *http.ServeMux

func StaticFileServer added in v0.0.5

func StaticFileServer() http.Handler

StaticFileServer returns an http.Handler that serves embedded static files

Types

type SSEHandler

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

SSEHandler handles Server-Sent Events streaming

func NewSSEHandler

func NewSSEHandler(nc *nats.Conn, js nats.JetStreamContext) *SSEHandler

NewSSEHandler creates a new SSE handler

func (*SSEHandler) StreamMessages

func (h *SSEHandler) StreamMessages(w http.ResponseWriter, r *http.Request)

StreamMessages streams NATS messages to the client via SSE

func (*SSEHandler) StreamMessagesWithFilter

func (h *SSEHandler) StreamMessagesWithFilter(w http.ResponseWriter, r *http.Request)

StreamMessagesWithFilter streams filtered NATS messages

type Server

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

func NewServer

func NewServer(dbService *db.Service, nc *nats.Conn, natsEmbedded *embeddednats.EmbeddedNATS, apiHandler http.Handler) (*Server, error)

NewServer creates a new web server instance

func NewWebService

func NewWebService(dbService *db.Service, nc *nats.Conn, natsEmbedded *embeddednats.EmbeddedNATS, apiHandler http.Handler) (*Server, error)

NewWebService creates a new web service with environment-based configuration

func (*Server) HandleHealthCheck

func (s *Server) HandleHealthCheck(w http.ResponseWriter, r *http.Request)

HandleHealthCheck handles the health check endpoint Note: This is now handled by the API router, but kept here if needed for internal checks

func (*Server) HealthCheck

func (s *Server) HealthCheck() error

HealthCheck returns the health status of the web service (implements Service interface)

func (*Server) Name

func (s *Server) Name() string

Name returns the service name (implements Service interface)

func (*Server) Start

func (s *Server) Start(ctx context.Context) error

Start starts the web server

func (*Server) Stop

func (s *Server) Stop(ctx context.Context) error

Stop stops the web server

Directories

Path Synopsis
components
icon
templui component icon - version: v0.101.0 installed by templui v0.101.0 📚 Documentation: https://templui.io/docs/components/icon
templui component icon - version: v0.101.0 installed by templui v0.101.0 📚 Documentation: https://templui.io/docs/components/icon
features
auth/pages
templ: version: v0.3.960
templ: version: v0.3.960
common/components
templ: version: v0.3.960
templ: version: v0.3.960
common/icons
templ: version: v0.3.960
templ: version: v0.3.960
common/layouts
templ: version: v0.3.960
templ: version: v0.3.960
dev
Package dev provides development-only features like hot reload.
Package dev provides development-only features like hot reload.
docs/pages
templ: version: v0.3.960
templ: version: v0.3.960
fleet/components
templ: version: v0.3.960
templ: version: v0.3.960
fleet/pages
templ: version: v0.3.960
templ: version: v0.3.960
map/components
templ: version: v0.3.960
templ: version: v0.3.960
map/pages
templ: version: v0.3.960
templ: version: v0.3.960
metrics/components
templ: version: v0.3.960
templ: version: v0.3.960
metrics/pages
templ: version: v0.3.960
templ: version: v0.3.960
organizations/components
templ: version: v0.3.960
templ: version: v0.3.960
organizations/pages
templ: version: v0.3.960
templ: version: v0.3.960
overwatch/components
templ: version: v0.3.960
templ: version: v0.3.960
overwatch/pages
templ: version: v0.3.960
templ: version: v0.3.960
streams/pages
templ: version: v0.3.960
templ: version: v0.3.960
video/pages
templ: version: v0.3.960
templ: version: v0.3.960
Package signals provides typed signal structs for Datastar SSE communication.
Package signals provides typed signal structs for Datastar SSE communication.
templui util templui.go - version: v0.101.0 installed by templui v0.101.0
templui util templui.go - version: v0.101.0 installed by templui v0.101.0

Jump to

Keyboard shortcuts

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