Documentation ¶
Index ¶
- func GetContentFileData(repo string, contentFilePath string, ref string, accessToken string) (data io.ReadCloser, err error)
- func GetUrlData(u *url.URL, accessToken string) (io.ReadCloser, error)
- func Init(services apid.Services)
- func SaveContentFile(repo string, contentFilePath string, ref string, destDir string, ...) (destFilePath string, err error)
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 ¶
GetUrlData() validates GitHub URL and invokes GetContentFileData()
to return file data as a ReadCloser, which must be closed.
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.
Click to show internal directories.
Click to hide internal directories.