bitbucketserver

package
v0.15.11 Latest Latest
Warning

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

Go to latest
Published: Jul 12, 2023 License: Apache-2.0 Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateConsumer

func CreateConsumer(URL, ConsumerKey string, PrivateKey *rsa.PrivateKey) *oauth.Consumer

func New

func New(opts Opts) (remote.Remote, error)

New returns a Remote implementation that integrates with Bitbucket Server, the on-premise edition of Bitbucket Cloud, formerly known as Stash.

Types

type Config

type Config struct {
	URL        string
	Username   string
	Password   string
	SkipVerify bool
	Consumer   *oauth.Consumer
}

func (*Config) Activate

func (c *Config) Activate(ctx context.Context, u *model.User, r *model.Repo, link string) error

func (*Config) Auth

func (*Config) Auth(ctx context.Context, token, secret string) (string, error)

Auth is not supported by the Stash driver.

func (*Config) Branches

func (c *Config) Branches(ctx context.Context, u *model.User, r *model.Repo) ([]string, error)

Branches returns the names of all branches for the named repository.

func (*Config) Deactivate

func (c *Config) Deactivate(ctx context.Context, u *model.User, r *model.Repo, link string) error

func (*Config) Dir

func (c *Config) Dir(ctx context.Context, u *model.User, r *model.Repo, b *model.Build, f string) ([]*remote.FileMeta, error)

func (*Config) File

func (c *Config) File(ctx context.Context, u *model.User, r *model.Repo, b *model.Build, f string) ([]byte, error)

func (*Config) Hook

func (c *Config) Hook(ctx context.Context, r *http.Request) (*model.Repo, *model.Build, error)

func (*Config) Login

func (c *Config) Login(ctx context.Context, res http.ResponseWriter, req *http.Request) (*model.User, error)

func (*Config) Netrc

func (c *Config) Netrc(user *model.User, r *model.Repo) (*model.Netrc, error)

func (*Config) Perm

func (c *Config) Perm(ctx context.Context, u *model.User, repo *model.Repo) (*model.Perm, error)

func (*Config) Repo

func (c *Config) Repo(ctx context.Context, u *model.User, owner, name string) (*model.Repo, error)

func (*Config) Repos

func (c *Config) Repos(ctx context.Context, u *model.User) ([]*model.Repo, error)

func (*Config) Status

func (c *Config) Status(ctx context.Context, user *model.User, repo *model.Repo, build *model.Build, proc *model.Proc) error

Status is not supported by the bitbucketserver driver.

func (*Config) TeamPerm

func (*Config) TeamPerm(u *model.User, org string) (*model.Perm, error)

TeamPerm is not supported by the Stash driver.

func (*Config) Teams

func (*Config) Teams(ctx context.Context, u *model.User) ([]*model.Team, error)

Teams is not supported by the Stash driver.

type Opts

type Opts struct {
	URL               string // Stash server url.
	Username          string // Git machine account username.
	Password          string // Git machine account password.
	ConsumerKey       string // Oauth1 consumer key.
	ConsumerRSA       string // Oauth1 consumer key file.
	ConsumerRSAString string
	SkipVerify        bool // Skip ssl verification.
}

Opts defines configuration options.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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