api

package
v0.0.0-...-0b23c52 Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2026 License: MIT Imports: 30 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChangePasswordRequest

type ChangePasswordRequest struct {
	OldPassword string `json:"old_password"`
	NewPassword string `json:"new_password"`
}

type Handler

type Handler struct {
	Queries  *database.Queries
	Config   *config.Config
	Recorder *recorder.Worker
	DB       *sql.DB

	// Ticket Store
	TicketStore auth.TicketStore

	// OIDC
	OIDC *OIDCContext
	// contains filtered or unexported fields
}

func New

func New(q *database.Queries, cfg *config.Config, rec *recorder.Worker, db *sql.DB) *Handler

func (*Handler) AuthCallback

func (h *Handler) AuthCallback(c echo.Context) error

AuthCallback handles the IDP response

func (*Handler) AuthLogin

func (h *Handler) AuthLogin(c echo.Context) error

AuthLogin initiates the OIDC flow

func (*Handler) ChangePassword

func (h *Handler) ChangePassword(c echo.Context) error

func (*Handler) CreateTask

func (h *Handler) CreateTask(c echo.Context) error

func (*Handler) DeleteRecording

func (h *Handler) DeleteRecording(c echo.Context) error

func (*Handler) DeleteTask

func (h *Handler) DeleteTask(c echo.Context) error

func (*Handler) GenerateTicket

func (h *Handler) GenerateTicket(c echo.Context) error

Authenticated route to generate a one-time ticket Authenticated route to generate a one-time ticket

func (*Handler) GetLiveRecordings

func (h *Handler) GetLiveRecordings(c echo.Context) error

GetLiveRecordings returns all active recordings with real-time stats

func (*Handler) GetRecordingPreview

func (h *Handler) GetRecordingPreview(c echo.Context) error

GetRecordingPreview serves the latest frame for a recording

func (*Handler) GetStats

func (h *Handler) GetStats(c echo.Context) error

func (*Handler) InitOIDC

func (h *Handler) InitOIDC() error

InitOIDC initializes the OIDC provider (discovery)

func (*Handler) ListArchives

func (h *Handler) ListArchives(c echo.Context) error

func (*Handler) ListTasks

func (h *Handler) ListTasks(c echo.Context) error

func (*Handler) Login

func (h *Handler) Login(c echo.Context) error

func (*Handler) PreviewTask

func (h *Handler) PreviewTask(c echo.Context) error

func (*Handler) RateLimitMiddleware

func (h *Handler) RateLimitMiddleware(next echo.HandlerFunc) echo.HandlerFunc

RateLimitMiddleware enforces simple IP-based rate limiting

func (*Handler) RegisterRoutes

func (h *Handler) RegisterRoutes(e *echo.Echo)

func (*Handler) StartTask

func (h *Handler) StartTask(c echo.Context) error

StartTask enables the task and starts the worker

func (*Handler) StopTask

func (h *Handler) StopTask(c echo.Context) error

StopTask disables the task and stops the worker

func (*Handler) UpdateTask

func (h *Handler) UpdateTask(c echo.Context) error

func (*Handler) WsInteractive

func (h *Handler) WsInteractive(c echo.Context) error

WebSocket handler for interactive session

type LiveRecordingDTO

type LiveRecordingDTO struct {
	ID             int64  `json:"id"`
	TaskID         int64  `json:"task_id"`
	TaskName       string `json:"task_name"`
	Status         string `json:"status"`
	ElapsedSeconds int64  `json:"elapsed_seconds"`
	FileSizeBytes  int64  `json:"file_size_bytes"`
	HasPreview     bool   `json:"has_preview"`
}

LiveRecordingDTO represents active recording with real-time stats

type LoginRequest

type LoginRequest struct {
	Username string `json:"username"`
	Password string `json:"password"`
}

type OIDCContext

type OIDCContext struct {
	Provider *oidc.Provider
	Config   *oauth2.Config
}

OIDCContext holds the provider and config for reuse

type RecordingDTO

type RecordingDTO struct {
	ID        int64      `json:"id"`
	TaskID    int64      `json:"task_id"`
	Status    string     `json:"status"`
	StartTime time.Time  `json:"start_time"`
	EndTime   *time.Time `json:"end_time"`
	FilePath  string     `json:"file_path"`
	TaskName  string     `json:"task_name,omitempty"`
	Size      string     `json:"size"`
}

type TaskDTO

type TaskDTO struct {
	ID                int64     `json:"id"`
	Name              string    `json:"name"`
	TargetURL         string    `json:"target_url"`
	IsEnabled         bool      `json:"is_enabled"`
	CreatedAt         time.Time `json:"created_at"`
	CustomCSS         string    `json:"custom_css"`
	Fps               int64     `json:"fps"`
	Crf               int64     `json:"crf"`
	FilenameTemplate  string    `json:"filename_template"`
	TimeOverlay       bool      `json:"time_overlay"`
	TimeOverlayConfig string    `json:"time_overlay_config"`
}

Jump to

Keyboard shortcuts

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