gitp

package
v0.0.13 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2022 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitbucket

type Bitbucket struct {
	*bitbucket.Client
}

func (*Bitbucket) AuthedUser

func (g *Bitbucket) AuthedUser(ctx context.Context) (string, error)

func (*Bitbucket) ListBranches

func (g *Bitbucket) ListBranches(ctx context.Context, fullName string) ([]*provider.Branch, error)

func (*Bitbucket) ListRepos

func (g *Bitbucket) ListRepos(ctx context.Context) ([]*provider.Repo, error)

func (*Bitbucket) ListTags

func (g *Bitbucket) ListTags(ctx context.Context, fullName string) ([]*provider.Tag, error)

type Constructor

type Constructor func(token string) Provider

type Github

type Github struct {
	*github.Client
}

func (*Github) AuthedUser

func (g *Github) AuthedUser(ctx context.Context) (string, error)

func (*Github) ListBranches

func (g *Github) ListBranches(ctx context.Context, fullName string) ([]*provider.Branch, error)

func (*Github) ListRepos

func (g *Github) ListRepos(ctx context.Context) ([]*provider.Repo, error)

func (*Github) ListTags

func (g *Github) ListTags(ctx context.Context, fullName string) ([]*provider.Tag, error)

type Gitlab

type Gitlab struct {
	*gitlab.Client
}

func (*Gitlab) AuthedUser

func (g *Gitlab) AuthedUser(ctx context.Context) (string, error)

func (*Gitlab) ListBranches

func (g *Gitlab) ListBranches(ctx context.Context, fullName string) ([]*provider.Branch, error)

func (*Gitlab) ListRepos

func (g *Gitlab) ListRepos(ctx context.Context) ([]*provider.Repo, error)

func (*Gitlab) ListTags

func (g *Gitlab) ListTags(ctx context.Context, fullName string) ([]*provider.Tag, error)

type Provider

type Provider interface {
	AuthedUser(ctx context.Context) (string, error)
	ListRepos(ctx context.Context) ([]*provider.Repo, error)
	ListBranches(ctx context.Context, fullName string) ([]*provider.Branch, error)
	ListTags(ctx context.Context, fullName string) ([]*provider.Tag, error)
}

func NewBitbucket

func NewBitbucket(token string) Provider

func NewGithub

func NewGithub(token string) Provider

func NewGitlab

func NewGitlab(token string) Provider

func Select

func Select(provider string, token string) (Provider, error)

Jump to

Keyboard shortcuts

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