gika

package module
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

func NewTika

func NewTika(addr string) (*Client, error)

func NewTikaFromDockerEnv

func NewTikaFromDockerEnv() (*Client, error)

func (*Client) DetectType

func (t *Client) DetectType(body io.Reader, filename string) (contentType string, err error)

DetectType requests the mime type of a file from an Apache Tika server

func (*Client) GetMetadata

func (t *Client) GetMetadata(body io.Reader, filename string) (result map[string]string, err error)

GetMetadata requests metadata about a file from an Apache Tika server

func (*Client) Parse

func (t *Client) Parse(body io.Reader, contentType string) (out []byte, err error)

Parse requests the text of a file from an Apache Tika server

func (*Client) PlainText added in v0.1.2

func (t *Client) PlainText(body io.Reader, contentType string) (out []byte, err error)

Parse requests the text of a file from an Apache Tika server

func (*Client) RecursiveParse

func (t *Client) RecursiveParse(body io.Reader, contentType string) (out []byte, err error)

RecursiveParse requests the text and metadata for a container document and all embedded documents

type FileInfo

type FileInfo struct {
	ContentType     string `json:"Content-Type"`
	ApplicationName string `json:"Application-Name,omitempty"`
	Author          string `json:"Author,omitempty"`
}

Jump to

Keyboard shortcuts

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