server

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Problem

type Problem struct {
	Type     string `json:"type"`
	Title    string `json:"title"`
	Status   int    `json:"status"`
	Detail   string `json:"detail,omitempty"`
	Instance string `json:"instance,omitempty"`
}

Problem is the RFC 7807 "Problem Details" response body.

type Server

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

func New

func New(cfg config.Config, db *sql.DB) (*Server, error)

func (*Server) Prepare

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

Prepare introspects the schema. It is idempotent — callers can invoke it before Run so they can use Schema() before the listener starts.

func (*Server) Run

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

func (*Server) Schema

func (s *Server) Schema() schema.Schema

Schema returns the introspected, allowlist-filtered schema. It is only valid after Prepare (or Run) returns nil.

Jump to

Keyboard shortcuts

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