Documentation ¶
Overview ¶
Package convapi provides the definitions of types used for file conversion communication between different components of the Documize system.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func SetJSONResponse ¶
func SetJSONResponse(w http.ResponseWriter)
SetJSONResponse sets the response type to "application/json" in the HTTP header.
func WriteError ¶
func WriteError(w http.ResponseWriter, err error)
WriteError to the http.ResponseWriter, taking care to provide the correct response error code within the JSON response.
func WriteErrorBadRequest ¶
func WriteErrorBadRequest(w http.ResponseWriter, message string)
WriteErrorBadRequest provides feedback to a Documize client on an error, where that error is described in a string.
Types ¶
type ConversionJobRequest ¶
type ConversionJobRequest struct { Job string IndexDepth uint OrgID string LicenseKey []byte LicenseSignature []byte ServiceEndpoint string }
ConversionJobRequest is the information used to set-up a conversion job.
type DocumentConversionRequest ¶
type DocumentConversionRequest struct { Filename string Filedata []byte PageBreakLevel uint LicenseKey []byte LicenseSignature []byte ServiceEndpoint string }
DocumentConversionRequest is what is passed to a Convert plugin.
type DocumentConversionResponse ¶
type DocumentConversionResponse struct { Err string PagesHTML []byte // If empty, use Pages Pages []Page EmbeddedFiles []EmbeddedFile Excerpt string }
DocumentConversionResponse is the response from a Convert plugin.
type DocumentExport ¶
DocumentExport is the type used by a document export plugin.
type EmbeddedFile ¶
type EmbeddedFile struct {
ID, Type, Name string // name must have the same extension as the type e.g. Type="txt" Name="foo.txt"
Data []byte
}
EmbeddedFile holds the contents of an embedded file.