Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DirPath ¶
DirPath extracts the repo-relative directory path from a raw GitHub URL. For "https://raw.githubusercontent.com/owner/repo/refs/heads/main/apps/iam/kinds/manifest.cue" it returns "apps/iam/kinds".
func FetchDirectory ¶
func FetchDirectory(ctx context.Context, repo RepoDescriptor, dirPath string, suffix string) (map[string][]byte, error)
FetchDirectory fetches all files with the given extension in a repository directory via the GitHub Contents API. Returns a map of filename → file content.
Types ¶
type RepoDescriptor ¶
RepoDescriptor describes a repository.
func RawURLToRepoDescriptor ¶
func RawURLToRepoDescriptor(rawURL string) *RepoDescriptor
RawURLToRepoDescriptor extracts owner, repo, and ref from a raw GitHub URL. Handles both "refs/heads/main" and bare branch names.
func URLToRepoDescriptor ¶
func URLToRepoDescriptor(repoUrl string, ref string) *RepoDescriptor
URLToRepoDescriptor extracts owner and repo from a GitHub URL.
Click to show internal directories.
Click to hide internal directories.