github

package
v0.0.0-...-3309b9d Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2026 License: MIT Imports: 6 Imported by: 0

README

GitHub document loader

github wraps the URL document loader with optional Bearer token authentication for loading documents from private GitHub repositories.

Usage

import "github.com/webcenter-fr/eino-ext/components/document/loader/github"

loader, err := github.NewGithubLoader(ctx, "ghp_xxx")
docs, err := loader.Load(ctx, document.Source{
    URI: "https://raw.githubusercontent.com/owner/repo/main/docs/README.md",
})

When the token is empty, the loader behaves as a plain, unauthenticated URL loader.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewGithubLoader

func NewGithubLoader(ctx context.Context, token string) (document.Loader, error)

NewGithubLoader creates a GitHub document loader. When token is empty it behaves as a plain URL loader; otherwise it adds a Bearer Authorization header on every request.

Types

This section is empty.

Jump to

Keyboard shortcuts

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