gitiles

package
v0.0.0-...-c44c8e0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: BSD-3-Clause Imports: 9 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 provides utilities for interacting with a Gitiles project.

func NewClient

func NewClient(host, project string, httpClient *http.Client) (*Client, error)

NewClient returns a gitilesClientWrapper for a host and project.

func (*Client) DownloadFile

func (c *Client) DownloadFile(ctx context.Context, path, ref string) (string, error)

DownloadFile returns the contents of the file at `path` and `ref`.

func (*Client) LatestCommit

func (c *Client) LatestCommit(ctx context.Context, ref string) (string, error)

LatestCommit resolves a ref to a revision.

func (*Client) Log

func (c *Client) Log(ctx context.Context, committish string, numCommits int32) ([]*git.Commit, error)

Log returns a slice of commits of length `numCommits` starting from `committish`.

Jump to

Keyboard shortcuts

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