github

package
v0.79.0 Latest Latest
Warning

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

Go to latest
Published: Jan 24, 2026 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetGithubRepoBlobs

func GetGithubRepoBlobs(owner string, repo string, branchOrSha string, filename string) ([]byte, error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func NewGitHubClient

func NewGitHubClient(token string) Client

func (Client) Fetch

func (c Client) Fetch(url string) ([]byte, error)

type Commit

type Commit struct {
	SHA string `json:"sha"`
	URL string `json:"url"`
}

type Config

type Config struct {
	Owner    string
	RepoName string
	Branch   string
}

type Repo

type Repo struct {
	Config
	Client
}

func (Repo) FetchTags

func (r Repo) FetchTags(perPage int) ([]RepoTag, error)

func (Repo) GetBlobFromTag

func (r Repo) GetBlobFromTag(tagName string, filename string) ([]byte, error)

func (Repo) GetGithubRepoTrees

func (r Repo) GetGithubRepoTrees(commitSha string, directory string) ([]RepoTreeItem, error)

func (Repo) LatestTag

func (r Repo) LatestTag() (RepoTag, error)

type RepoTag

type RepoTag struct {
	Name       string `json:"name"`
	Commit     Commit `json:"commit"`
	ZipBallURL string `json:"zip_ball_url"`
	TarBallURL string `json:"tarball_url"`
}

type RepoTreeItem

type RepoTreeItem struct {
	Path string `json:"path"`
	Url  string `json:"url"`
	Sha  string `json:"sha"`
}

Jump to

Keyboard shortcuts

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