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 ¶
NewGitHubDB creates a GitHub repository adapter. Note: Definition is required for most operations, so prefer NewGitHubDBWithDef.
func NewGitHubDBWithDef ¶
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)
Click to show internal directories.
Click to hide internal directories.