Documentation
¶
Overview ¶
Package http provides optional HTTP adapters for CMS admin APIs.
Routes follow the Content Type Builder design spec and mount under /admin/api:
- Content types: /content-types, /content-types/{id}, /content-types/{id}/publish, /content-types/{id}/clone
- Schema utilities: /content-types/validate, /content-types/preview, /content-types/{id}/schema, /content-types/{id}/openapi
- Block library: /blocks, /blocks/{id}
Host applications can register handlers on their own mux/router as needed.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AdminAPI ¶
type AdminAPI struct {
// contains filtered or unexported fields
}
AdminAPI registers admin endpoints for content types and blocks.
func NewAdminAPI ¶
func NewAdminAPI(opts ...AdminOption) *AdminAPI
NewAdminAPI constructs an AdminAPI instance.
type AdminOption ¶
type AdminOption func(*AdminAPI)
AdminOption mutates the AdminAPI configuration.
func WithBasePath ¶
func WithBasePath(path string) AdminOption
WithBasePath overrides the base API path (defaults to "/admin/api").
func WithBlockService ¶
func WithBlockService(service blocks.Service) AdminOption
WithBlockService wires the block service.
func WithContentTypeService ¶
func WithContentTypeService(service content.ContentTypeService) AdminOption
WithContentTypeService wires the content type service.
func WithOverlayResolver ¶
func WithOverlayResolver(resolver schema.OverlayResolver) AdminOption
WithOverlayResolver sets the overlay resolver used by schema preview/export utilities.