excel

package
v1.0.0-rc.2 Latest Latest
Warning

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

Go to latest
Published: Sep 7, 2026 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Source

type Source struct {
	// Configuration
	BasePath  string // e.g., ./uploads or absolute path
	Pattern   string // e.g., **/*.xlsx (glob relative to BasePath) or a single file name
	Sheet     string // sheet name; if empty, uses first sheet
	HeaderRow int    // 0 for none, otherwise 1-based row index for headers
	StartRow  int    // 1-based data start row (if HeaderRow>0 and StartRow==0, StartRow=HeaderRow+1)
	BatchSize int    // not used for streaming; reserved for future buffering

	// Backend selector: local (default) | http | s3
	SourceType string
	// HTTP
	URL     string
	Headers map[string]string
	// S3
	S3Region    string
	S3Bucket    string
	S3KeyPrefix string // or single key
	S3Endpoint  string
	S3AccessKey string
	S3SecretKey string
	// contains filtered or unexported fields
}

Source implements reading rows from .xlsx files located on a local path using a glob pattern. It is intentionally simple and production-focused: explicit errors, guard rails, and stateful resume. .xls (BIFF) is not supported in v1; users should convert to .xlsx upstream.

func New

func New(basePath, pattern, sheet string, headerRow, startRow, batchSize int) *Source

func (*Source) Ack

func (s *Source) Ack(ctx context.Context, msg hermod.Message) error

func (*Source) Close

func (s *Source) Close() error

func (*Source) Ping

func (s *Source) Ping(ctx context.Context) error

func (*Source) Read

func (s *Source) Read(ctx context.Context) (hermod.Message, error)

func (*Source) SetLogger

func (s *Source) SetLogger(l hermod.Logger)

SetLogger enables structured logging from engine when available.

Jump to

Keyboard shortcuts

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