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: 9

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