server

package
v0.29.0 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: Apache-2.0 Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Run

func Run(ctx context.Context, opts Options) error

Run starts the HTTP server. It blocks until the context is canceled.

func ScopedStoreMiddleware

func ScopedStoreMiddleware(db *sql.DB) func(http.Handler) http.Handler

ScopedStoreMiddleware acquires a dedicated DB connection, sets the tenant scope for RLS via set_config, creates a Store bound to that connection, and stores it in the request context. The connection is closed when the request completes. All queries through this Store are RLS-scoped.

func WebhookHandler

func WebhookHandler(db *sql.DB, webhookSecret string) http.HandlerFunc

WebhookHandler handles GitHub App webhook events.

Types

type Options

type Options struct {
	Version string
	Commit  string
	Date    string
}

Options configures the server.

type SeriesData

type SeriesData[T any] struct {
	Labels []string `json:"labels"`
	Data   []T      `json:"data"`
}

SeriesData is a generic type for chart series responses.

Jump to

Keyboard shortcuts

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