github

package
v0.0.0-...-bf41b13 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Client

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

Client implements contracts.GitHub using google/go-github.

func NewClient

func NewClient() *Client

NewClient creates a new GitHub API client.

func (*Client) Close

func (c *Client) Close() error

Close shuts down the pipelines.

func (*Client) GetFileContent

func (c *Client) GetFileContent(ctx context.Context, token, owner, repo, path, ref string) (*FileContent, error)

GetFileContent retrieves the content of a single file.

func (*Client) GetFileContentBatch

func (c *Client) GetFileContentBatch(ctx context.Context, token, owner, repo, ref string, paths []string) ([]*FileContent, error)

GetFileContentBatch retrieves multiple files concurrently. Uses the resilient GetFileContent pipeline internally.

func (*Client) GetTree

func (c *Client) GetTree(ctx context.Context, token, owner, repo, ref string) ([]TreeEntry, error)

GetTree retrieves the full repository tree at a given ref.

type FileContent

type FileContent struct {
	Path    string
	SHA     string
	Content []byte
	Size    int64
}

FileContent represents the content of a file from GitHub.

type TreeEntry

type TreeEntry struct {
	Path string
	Mode string
	Type string // "blob" or "tree"
	SHA  string
	Size int64 // only for blobs
}

TreeEntry represents a file or directory in a GitHub repository tree.

Jump to

Keyboard shortcuts

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