github

package
v0.0.0-...-9db4733 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 20 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
}

func NewClient

func NewClient(tc *http.Client) (*Client, error)

func NewEnvClient

func NewEnvClient(ctx context.Context) (*Client, error)

func (Client) GetCommit

func (cl Client) GetCommit(ctx context.Context, ref *Commit) (*source_j5pb.CommitInfo, error)

func (Client) GetContent

func (cl Client) GetContent(ctx context.Context, ref *Commit, destDir string) error

func (Client) PullConfig

func (cl Client) PullConfig(ctx context.Context, ref *Commit, into proto.Message, tryPaths []string) error

type Commit

type Commit struct {
	Owner string
	Repo  string
	Sha   string
}

type RepositoriesService

type RepositoriesService interface {
	DownloadContents(ctx context.Context, owner, repo, filepath string, opts *github.RepositoryContentGetOptions) (io.ReadCloser, *github.Response, error)
	ListByOrg(context.Context, string, *github.RepositoryListByOrgOptions) ([]*github.Repository, *github.Response, error)
	GetContents(ctx context.Context, owner, repo, path string, opts *github.RepositoryContentGetOptions) (fileContent *github.RepositoryContent, directoryContent []*github.RepositoryContent, resp *github.Response, err error)
	GetArchiveLink(ctx context.Context, owner string, repo string, archiveFormat github.ArchiveFormat, opts *github.RepositoryContentGetOptions, maxRedirects int) (*url.URL, *github.Response, error)
	GetCommit(ctx context.Context, owner string, repo string, ref string, opts *github.ListOptions) (*github.RepositoryCommit, *github.Response, error)
	ListBranchesHeadCommit(ctx context.Context, owner string, repo string, sha string) ([]*github.BranchCommit, *github.Response, error)
}

Jump to

Keyboard shortcuts

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