Documentation
¶
Index ¶
- Variables
- type CLICommandLoader
- type FileData
- type GitLoader
- type GitLoaderOption
- func WithBatchSize(size int) GitLoaderOption
- func WithExcludeDirs(dirs []string) GitLoaderOption
- func WithExcludeExts(exts []string) GitLoaderOption
- func WithIncludeExts(exts []string) GitLoaderOption
- func WithLogger(logger *slog.Logger) GitLoaderOption
- func WithMaxMemoryBuffer(bytes int64) GitLoaderOption
- func WithWorkerCount(count int) GitLoaderOption
- type Loader
- type RemoteGitRepoLoader
Constants ¶
This section is empty.
Variables ¶
View Source
var ( ErrInvalidPath = errors.New("documentloaders: invalid repository path") ErrNilRegistry = errors.New("documentloaders: parser registry is nil") ErrPathNotExist = errors.New("documentloaders: path does not exist") ErrMemoryLimitExceeded = errors.New("documentloaders: memory limit exceeded") )
Functions ¶
This section is empty.
Types ¶
type CLICommandLoader ¶ added in v0.2.0
func NewCLICommandLoader ¶ added in v0.2.0
func NewCLICommandLoader(command string, args ...string) *CLICommandLoader
type GitLoader ¶
type GitLoader struct {
// contains filtered or unexported fields
}
GitLoader loads and processes documents from a git repository on the local file system.
func NewGit ¶
func NewGit(path string, registry parsers.ParserRegistry, opts ...GitLoaderOption) (*GitLoader, error)
type GitLoaderOption ¶ added in v0.2.0
type GitLoaderOption func(*gitLoaderOptions)
func WithBatchSize ¶ added in v0.15.0
func WithBatchSize(size int) GitLoaderOption
func WithExcludeDirs ¶ added in v0.4.0
func WithExcludeDirs(dirs []string) GitLoaderOption
func WithExcludeExts ¶ added in v0.4.0
func WithExcludeExts(exts []string) GitLoaderOption
func WithIncludeExts ¶ added in v0.2.0
func WithIncludeExts(exts []string) GitLoaderOption
func WithLogger ¶ added in v0.2.0
func WithLogger(logger *slog.Logger) GitLoaderOption
func WithMaxMemoryBuffer ¶ added in v0.15.0
func WithMaxMemoryBuffer(bytes int64) GitLoaderOption
func WithWorkerCount ¶ added in v0.15.0
func WithWorkerCount(count int) GitLoaderOption
type RemoteGitRepoLoader ¶ added in v0.2.0
type RemoteGitRepoLoader struct {
RepoURL string
ParserRegistry parsers.ParserRegistry
Logger *slog.Logger
}
func NewRemoteGitRepoLoader ¶ added in v0.2.0
func NewRemoteGitRepoLoader(repoURL string, registry parsers.ParserRegistry, logger *slog.Logger) *RemoteGitRepoLoader
Click to show internal directories.
Click to hide internal directories.