image

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Mar 17, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ImageStreamParser

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

func NewImageStreamParser

func NewImageStreamParser() *ImageStreamParser

NewImageStreamParser creates a new image stream parser

func (*ImageStreamParser) GetSupportedTypes

func (p *ImageStreamParser) GetSupportedTypes() []string

GetSupportedTypes returns the supported file formats

func (*ImageStreamParser) ParseStream

func (p *ImageStreamParser) ParseStream(ctx context.Context, r io.Reader, metadata map[string]any) (<-chan *entity.Document, error)

ParseStream implements the dataprep.Parser interface

type Parser

type Parser struct {
}

Parser implements a parser for image files

func New

func New() *Parser

New creates a new image parser

func (*Parser) Parse

func (p *Parser) Parse(ctx context.Context, r io.Reader) ([]entity.Chunk, error)

Parse parses an image file and returns chunks with media data

func (*Parser) ParseWithCallback

func (p *Parser) ParseWithCallback(ctx context.Context, r io.Reader, callback func(entity.Chunk) error) error

ParseWithCallback parses image and calls the callback for each chunk

func (*Parser) SupportedFormats

func (p *Parser) SupportedFormats() []string

SupportedFormats returns the list of supported image formats

Jump to

Keyboard shortcuts

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