github

package
v3.3.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2018 License: MIT Imports: 11 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() error

func (*Github) First

func (g *Github) First() (version uint, er error)

func (*Github) Next

func (g *Github) Next(version uint) (nextVersion uint, err error)

func (*Github) Open

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

func (*Github) Prev

func (g *Github) Prev(version uint) (prevVersion uint, err error)

func (*Github) ReadDown

func (g *Github) ReadDown(version uint) (r io.ReadCloser, identifier string, err error)

func (*Github) ReadUp

func (g *Github) ReadUp(version uint) (r io.ReadCloser, identifier string, err error)

Jump to

Keyboard shortcuts

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