dashboard

package
v1.0.13 Latest Latest
Warning

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

Go to latest
Published: Mar 16, 2026 License: MPL-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasicAuthMiddleware

func BasicAuthMiddleware(username, password string) func(http.Handler) http.Handler

Types

type ChannelActionFunc

type ChannelActionFunc func(ctx context.Context, channelID string) error

type FormAuth

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

func NewFormAuth

func NewFormAuth(username, password string) *FormAuth

func (*FormAuth) Middleware

func (fa *FormAuth) Middleware() func(http.Handler) http.Handler

type ReprocessFunc

type ReprocessFunc func(ctx context.Context, record *storage.MessageRecord) error

type Server

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

func NewServer

func NewServer(scfg *ServerConfig) *Server

func (*Server) BuildHandler

func (s *Server) BuildHandler() http.Handler

func (*Server) Start

func (s *Server) Start(addr string) error

func (*Server) Stop

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

type ServerConfig

type ServerConfig struct {
	Config         *config.Config
	ChannelsDir    string
	Store          storage.MessageStore
	Metrics        *observability.Metrics
	Logger         *slog.Logger
	RBAC           *auth.RBACManager
	AuditLogger    *auth.AuditLogger
	AuthMiddleware func(http.Handler) http.Handler
	ReprocessFunc  ReprocessFunc
	DeployFunc     ChannelActionFunc
	UndeployFunc   ChannelActionFunc
	RestartFunc    ChannelActionFunc
	Port           int
}

Jump to

Keyboard shortcuts

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