bitbucket

package
v4.0.0-...-227319a Latest Latest
Warning

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

Go to latest
Published: Aug 18, 2022 License: MIT Imports: 9 Imported by: 0

README

bitbucket

This driver is catered for those that want to source migrations from bitbucket cloud(https://bitbucket.com).

bitbucket://user:password@owner/repo/path#ref

URL Query WithInstance Config Description
user The username of the user connecting
password User's password or an app password with repo read permission
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:password provided")
	ErrNoAccessToken          = fmt.Errorf("no password/app password")
	ErrInvalidRepo            = fmt.Errorf("invalid repo")
	ErrInvalidBitbucketClient = fmt.Errorf("expected *bitbucket.Client")
	ErrNoDir                  = fmt.Errorf("no directory")
)

Functions

func WithInstance

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

Types

type Bitbucket

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

func (*Bitbucket) Close

func (b *Bitbucket) Close() error

func (*Bitbucket) First

func (b *Bitbucket) First() (version uint, er error)

func (*Bitbucket) Next

func (b *Bitbucket) Next(version uint) (nextVersion uint, err error)

func (*Bitbucket) Open

func (b *Bitbucket) Open(url string) (source.Driver, error)

func (*Bitbucket) Prev

func (b *Bitbucket) Prev(version uint) (prevVersion uint, err error)

func (*Bitbucket) ReadDown

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

func (*Bitbucket) ReadUp

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

type Config

type Config struct {
	Owner string
	Repo  string
	Path  string
	Ref   string
}

Jump to

Keyboard shortcuts

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