httpapi

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2026 License: AGPL-3.0 Imports: 10 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

View Source
var ErrInvalidRequest = errors.New("invalid request")
View Source
var ErrUnauthenticated = errors.New("unauthenticated")

Functions

func NewRoutes added in v0.2.1

func NewRoutes(service e.Service, authn transport.Authenticator, authz func(context.Context, account.Principal, string) error) []transport.Route

NewRoutes constructs transport.Route entries backed by account.Principal authentication and per-school authorization.

Types

type Handler

type Handler struct {
	Service      e.Service
	Authenticate func(*http.Request) (string, error)
	Authorize    func(context.Context, string, string) error
	// Admission or Admissions supplies runtime fact evaluation for GET /api/v1/platform/eligibility-check.
	Admission  *e.Admission
	Admissions map[string]e.Admission
}

func (Handler) Register added in v0.2.1

func (h Handler) Register(mux *http.ServeMux)

func (Handler) Routes added in v0.2.1

func (h Handler) Routes() []transport.Route

Routes exports the configuration and preflight endpoints for application.New.

func (Handler) ServeHTTP

func (h Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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