apihandler

package
v0.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2026 License: BSD-2-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Handler

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

Handler serves the TS11 API endpoints.

func New

func New(schemas []*schemameta.SchemaMeta, signer *jwssign.Signer, jku string) *Handler

New creates a new API handler. signer may be nil for unsigned responses.

func (*Handler) Register

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

Register mounts the API routes on the given mux under /api/v1/.

func (*Handler) SetAttributes

func (h *Handler) SetAttributes(attrs []attributes.Attribute)

SetAttributes sets the attribute catalogue for serving via the API.

type PaginatedAttributeList

type PaginatedAttributeList struct {
	Total  int                    `json:"total"`
	Limit  int                    `json:"limit"`
	Offset int                    `json:"offset"`
	Data   []attributes.Attribute `json:"data"`
}

PaginatedAttributeList is the paginated response envelope for attributes.

type PaginatedSchemaList

type PaginatedSchemaList struct {
	Total  int                      `json:"total"`
	Limit  int                      `json:"limit"`
	Offset int                      `json:"offset"`
	Data   []*schemameta.SchemaMeta `json:"data"`
}

PaginatedSchemaList is the TS11 paginated response envelope.

Jump to

Keyboard shortcuts

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