Help us shape the future of Go! Take the 2026 Go Developer Survey

api

package
v0.0.0-...-b9a5b38 Latest Latest
Warning

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

Go to latest
Published: Oct 16, 2026 License: MIT Imports: 11 Imported by: 0

Documentation

Overview

Package api adapts the generated OpenAPI strict-server interface (internal/api/gen) to OpsGrid's HTTP platform: request decoding errors and handler errors become RFC 9457 problems through httpx.WriteError, and the generated routes mount on a standard ServeMux.

Domain modules implement their slice of gen.StrictServerInterface in their own http.go adapters; Server composes them.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Handler

func Handler(srv gen.StrictServerInterface, mux *http.ServeMux, log *slog.Logger) http.Handler

Handler mounts the generated routes on mux with OpsGrid error handling.

Types

type Server

type Server struct {
	Identity *identity.Service
	Tenancy  *tenancy.Service
}

Server implements gen.StrictServerInterface.

func (*Server) GetMe

GetMe returns the authenticated caller and active memberships.

func (*Server) GetMeta

GetMeta returns build information.

func (*Server) GetOrganization

GetOrganization returns an org the caller may access.

Directories

Path Synopsis
Package apitest validates HTTP exchanges against the OpenAPI contract.
Package apitest validates HTTP exchanges against the OpenAPI contract.
Package gen provides primitives to interact with the openapi HTTP API.
Package gen provides primitives to interact with the openapi HTTP API.

Jump to

Keyboard shortcuts

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