dalgo2ghingitdb

package
v0.14.6 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2026 License: MIT Imports: 16 Imported by: 0

Documentation

Overview

Package dalgo2ghingitdb provides a DALgo database adapter for reading inGitDB repositories from GitHub using the GitHub API. It supports read-only access to public repositories with no authentication required. Future versions will support authentication and write operations for private repositories.

Index

Constants

View Source
const DatabaseID = "ingitdb-github"

Variables

This section is empty.

Functions

func NewGitHubDB

func NewGitHubDB(cfg Config) (dal.DB, error)

NewGitHubDB creates a GitHub repository adapter. Note: Definition is required for most operations, so prefer NewGitHubDBWithDef.

func NewGitHubDBWithDef

func NewGitHubDBWithDef(cfg Config, def *ingitdb.Definition) (dal.DB, error)

Types

type Config

type Config struct {
	Owner      string
	Repo       string
	Ref        string
	Token      string
	APIBaseURL string
	HTTPClient *http.Client
}

Config defines connection settings for reading an inGitDB repository from GitHub.

type FileReader

type FileReader interface {
	ReadFile(ctx context.Context, path string) (content []byte, found bool, err error)
	ListDirectory(ctx context.Context, dirPath string) (entries []string, err error)
}

FileReader reads repository files by path from GitHub.

func NewGitHubFileReader

func NewGitHubFileReader(cfg Config) (FileReader, error)

Jump to

Keyboard shortcuts

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