gitiles

package
v0.0.0-...-01cd1ea Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package gitiles contains logic for interacting with gitiles.

Package gitiles contains logic for interacting with gitiles.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func UseFakeClient

func UseFakeClient(ctx context.Context, makeCommit func(i int32) *git.Commit) context.Context

UseFakeClient installs a fake gitiles client into the context,

Types

type Client

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

Client is the client to communicate with Gitiles. It wraps a gitilespb.GitilesClient.

func NewClient

func NewClient(ctx context.Context, host string, as auth.RPCAuthorityKind) (*Client, error)

func (*Client) DownloadFile

func (*Client) Log

type FakeClient

type FakeClient struct {
	MakeCommit func(i int32) *git.Commit
}

FakeClient is a fake implementation of gitiles.GitilesClient for testing.

func (*FakeClient) Archive

func (*FakeClient) DownloadDiff

func (*FakeClient) DownloadFile

func (*FakeClient) GetProject

func (*FakeClient) ListFiles

func (*FakeClient) Log

func (*FakeClient) Projects

func (*FakeClient) Refs

Jump to

Keyboard shortcuts

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