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 ¶
- func Handler(srv gen.StrictServerInterface, mux *http.ServeMux, log *slog.Logger) http.Handler
- type Server
- func (s *Server) GetMe(ctx context.Context, _ gen.GetMeRequestObject) (gen.GetMeResponseObject, error)
- func (*Server) GetMeta(context.Context, gen.GetMetaRequestObject) (gen.GetMetaResponseObject, error)
- func (s *Server) GetOrganization(ctx context.Context, req gen.GetOrganizationRequestObject) (gen.GetOrganizationResponseObject, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Server ¶
Server implements gen.StrictServerInterface.
func (*Server) GetMe ¶
func (s *Server) GetMe(ctx context.Context, _ gen.GetMeRequestObject) (gen.GetMeResponseObject, error)
GetMe returns the authenticated caller and active memberships.
func (*Server) GetMeta ¶
func (*Server) GetMeta(context.Context, gen.GetMetaRequestObject) (gen.GetMetaResponseObject, error)
GetMeta returns build information.
func (*Server) GetOrganization ¶
func (s *Server) GetOrganization(ctx context.Context, req gen.GetOrganizationRequestObject) (gen.GetOrganizationResponseObject, error)
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. |
Click to show internal directories.
Click to hide internal directories.