route

package
v0.0.0-...-eb6ac32 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SetupHandlers

func SetupHandlers(maxWorkers int, timeout time.Duration) *http.ServeMux

Types

type ExtractHandler

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

func NewExtractHandler

func NewExtractHandler(maxWorkers int, processTimeout time.Duration) *ExtractHandler

func (*ExtractHandler) ServeHTTP

func (h *ExtractHandler) ServeHTTP(w http.ResponseWriter, rq *http.Request)

type Response

type Response struct {
	Data   []ResultSuccess `json:"data,omitempty"`
	Errors []ResultError   `json:"errors,omitempty"`
}

type ResultError

type ResultError struct {
	FilePath string `json:"filePath,omitempty"`
	Message  string `json:"message,omitempty"`
}

ResultError stores error data

type ResultSuccess

type ResultSuccess struct {
	FilePath string                 `json:"filePath,omitempty"`
	Metadata map[string]interface{} `json:"metadata,omitempty"`
}

ResultSuccess stores success data

Jump to

Keyboard shortcuts

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