server

package
v0.3.1 Latest Latest
Warning

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

Go to latest
Published: Mar 20, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EmbeddedStaticFS

func EmbeddedStaticFS() fs.FS

EmbeddedStaticFS returns the embedded React build files as an fs.FS.

Types

type PaginatedTimeline

type PaginatedTimeline struct {
	Entries  []model.TimelineEntry `json:"entries"`
	GitRepo  string                `json:"git_repo"`
	Total    int                   `json:"total"`
	Page     int                   `json:"page"`
	PageSize int                   `json:"page_size"`
	HasMore  bool                  `json:"has_more"`
}

PaginatedTimeline is the paginated API response for /api/timeline.

type Server

type Server struct {
	ProjectDir string
	Port       int
	StaticFS   fs.FS          // embedded or filesystem-based
	OnReady    func(port int) // called once the server is listening
	// contains filtered or unexported fields
}

Server serves the React UI and API endpoints.

func New

func New(projectDir string, port int, staticFS fs.FS) *Server

New creates a new server instance.

func (*Server) ReloadData

func (s *Server) ReloadData() error

ReloadData re-reads timeline.json from disk and updates in-memory data.

func (*Server) Start

func (s *Server) Start() error

Start loads data and starts the HTTP server.

Jump to

Keyboard shortcuts

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