github

package
v0.0.1-demo Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2016 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetContentFileData

func GetContentFileData(repo string, contentFilePath string, ref string, accessToken string) (data io.ReadCloser, err error)

GetContentFileData() uses GitHub OAuth access token to retrieve metadata and returns a ReadCloser with file content data from a GitHub public/private repo.

func GetUrlData

func GetUrlData(u *url.URL, accessToken string) (io.ReadCloser, error)

GetUrlData() validates GitHub URL and invokes GetContentFileData()

to return file data as a ReadCloser, which must be closed.

func Init

func Init(services apid.Services)

func SaveContentFile

func SaveContentFile(repo string, contentFilePath string, ref string, destDir string, destFileName string, accessToken string) (destFilePath string, err error)

SaveContentFile() invokes GetContentFileData() and writes to a destination file. Optional 'destFileName' param defaults to content file name if empty string

Types

This section is empty.

Jump to

Keyboard shortcuts

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