git

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2017 License: Apache-2.0 Imports: 4 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Branches

func Branches() ([]string, error)

Branches returns a list of branches for the repository

func Contents

func Contents(branch, path string) ([]byte, error)

Contents returns the contents of the file at the given path

func InitGithub

func InitGithub(config *GithubConfig)

InitGithub initializes the github git service with the given config

func List

func List(branch, path string) ([]string, error)

List returns a list of subpaths of the given directory path

Types

type GithubConfig

type GithubConfig struct {
	Token string
	Owner string
	Repo  string
}

GithubConfig is the configuration for the github client

type Service

type Service interface {
	Branches() ([]string, error)
	Contents(branch, path string) ([]byte, error)
	List(branch, path string) ([]string, error)
}

Service is a git service that allows for querying and retrieving content from a repository

Jump to

Keyboard shortcuts

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