gitiles

package
v0.0.0-...-1327151 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2020 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Overview

Package gitiles implements a client for the Gitiles API.

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(c *http.Client, base string) *Client

func (*Client) Log

func (c *Client) Log(ctx context.Context, repo, ref string) (*LogResponse, error)

func (*Client) Revision

func (c *Client) Revision(ctx context.Context, repo, ref string) (*RevisionResponse, error)

type Commit

type Commit struct {
	SHA       string   `json:"commit"`
	Tree      string   `json:"tree"`
	Parents   []string `json:"parents"`
	Author    Ident    `json:"author"`
	Committer Ident    `json:"committer"`
	Message   string   `json:"message"`
}

type Diff

type Diff struct {
	Type    string `json:"type"`
	OldID   string `json:"old_id"`
	OldMode int    `json:"old_mode"`
	OldPath string `json:"old_path"`
	NewID   string `json:"new_id"`
	NewMode int    `json:"new_mode"`
	NewPath string `json:"new_path"`
}

type Ident

type Ident struct {
	Name  string `json:"name"`
	Email string `json:"email"`
	Time  string `json:"time"`
}

type LogResponse

type LogResponse struct {
	Log      []Commit `json:"log"`
	Previous string   `json:"previous"`
	Next     string   `json:"next"`
}

type RevisionResponse

type RevisionResponse struct {
	Commit
	TreeDiff []Diff `json:"tree_diff"`
}

Jump to

Keyboard shortcuts

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