github

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 30, 2019 License: MIT Imports: 9 Imported by: 0

README

github

github://user:personal-access-token@owner/repo/path#ref

URL Query WithInstance Config Description
user The username of the user connecting
personal-access-token An access token from Github (https://github.com/settings/tokens)
owner the repo owner
repo the name of the repository
path path in repo to migrations
ref (optional) can be a SHA, branch, or tag

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoUserInfo          = fmt.Errorf("no username:token provided")
	ErrNoAccessToken       = fmt.Errorf("no access token")
	ErrInvalidRepo         = fmt.Errorf("invalid repo")
	ErrInvalidGithubClient = fmt.Errorf("expected *github.Client")
	ErrNoDir               = fmt.Errorf("no directory")
)

Functions

func WithInstance

func WithInstance(client *github.Client, config *Config) (source.Driver, error)

Types

type Config

type Config struct {
}

type Github

type Github struct {
	// contains filtered or unexported fields
}

func (*Github) Close

func (g *Github) Close()

func (*Github) Open

func (g *Github) Open(url string) (source.Driver, error)

func (*Github) ReadFiles

func (g *Github) ReadFiles(relativeDir string, fileNamePattern string) (files []*source.FileReader, err error)

func (*Github) ReadTree

func (g *Github) ReadTree(relativePath string, fileNamePattern string) (t *source.DirectoryReader, err error)

Jump to

Keyboard shortcuts

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