Documentation
¶
Index ¶
- func ExposeMiddleware(ctx huma.Context, next func(huma.Context))
- func New(s server.I, name, version, description string, path string, sm *servemux.S)
- func NewHuma(router *servemux.S, name, version, description string) (api huma.API)
- type ExportInput
- type ExportOutput
- type ImportInput
- type ImportOutput
- type Operations
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ExposeMiddleware ¶
ExposeMiddleware adds the http.Request and http.ResponseWriter to the context for the Operations handler.
Types ¶
type ExportInput ¶ added in v0.2.11
type ExportInput struct {
Auth string `header:"Authorization" doc:"nostr nip-98 (and expiring variant)" required:"true"`
}
ExportInput is the parameters for the HTTP API Export method.
type ExportOutput ¶ added in v0.2.11
type ExportOutput struct{ RawBody []byte }
ExportOutput is the return value of Export. It usually will be line structured JSON.
type ImportInput ¶ added in v0.2.12
type ImportInput struct {
Auth string `header:"Authorization" doc:"nostr nip-98 token for authentication" required:"true"`
}
ImportInput is the parameters of an import operation, authentication and the stream of line structured JSON events.
type ImportOutput ¶ added in v0.2.12
type ImportOutput struct{}
ImportOutput is nothing, basically; a 204 or 200 status is expected.
type Operations ¶
func (*Operations) RegisterExport ¶ added in v0.2.11
func (x *Operations) RegisterExport(api huma.API)
RegisterExport implements the Export HTTP API method.
func (*Operations) RegisterImport ¶ added in v0.2.12
func (x *Operations) RegisterImport(api huma.API)
RegisterImport is the implementation of the Import operation.
Click to show internal directories.
Click to hide internal directories.