Documentation
¶
Overview ¶
Package exporthttp provides HTTP transport adapters for go-export.
Index ¶
- func PDFAssetsHandler(prefix string) http.Handler
- func RuntimeAssetsHandler() http.Handler
- func WithActor(ctx context.Context, actor export.Actor) context.Context
- type Config
- type ContextActorProvider
- type Handler
- type IdempotencyStore
- type JSONRequestDecoder
- type MemoryIdempotencyStore
- type QueryDecoder
- type QueryRequestDecoder
- type RequestDecoder
- type StaticActorProvider
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PDFAssetsHandler ¶
PDFAssetsHandler serves embedded PDF preview assets (echarts, jsPDF, html2canvas).
func RuntimeAssetsHandler ¶
RuntimeAssetsHandler serves embedded frontend helpers (datagrid export client).
Types ¶
type ContextActorProvider ¶
type ContextActorProvider struct {
Key any
}
ContextActorProvider reads actors from request contexts.
func (ContextActorProvider) FromContext ¶
FromContext returns the actor stored in context.
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler exposes export HTTP endpoints.
func (*Handler) RegisterRoutes ¶
RegisterRoutes registers handlers on a compatible router.
type IdempotencyStore ¶
type IdempotencyStore = exportapi.IdempotencyStore
IdempotencyStore stores idempotency keys.
type JSONRequestDecoder ¶
type JSONRequestDecoder = exportapi.JSONRequestDecoder
JSONRequestDecoder decodes JSON into export requests.
type MemoryIdempotencyStore ¶
type MemoryIdempotencyStore = exportapi.MemoryIdempotencyStore
MemoryIdempotencyStore stores idempotency keys in memory.
func NewMemoryIdempotencyStore ¶
func NewMemoryIdempotencyStore() *MemoryIdempotencyStore
NewMemoryIdempotencyStore creates an in-memory store.
type QueryDecoder ¶
type QueryDecoder = exportapi.QueryDecoder
QueryDecoder converts raw JSON query payloads into typed values.
type QueryRequestDecoder ¶
type QueryRequestDecoder = exportapi.QueryRequestDecoder
QueryRequestDecoder decodes querystring payloads into export requests.
type RequestDecoder ¶
type RequestDecoder = exportapi.RequestDecoder
RequestDecoder parses an HTTP request into an export request.
type StaticActorProvider ¶
StaticActorProvider always returns the configured actor.
func (StaticActorProvider) FromContext ¶
FromContext returns the configured actor.