bitbucket

package
v1.10.5 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 13 Imported by: 0

Documentation

Overview

Package bitbucket provides a release.Provider implementation for Bitbucket Cloud using the Downloads API. Bitbucket has no native "Releases" concept; version information is inferred from asset filenames using a configurable regular expression.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BitbucketReleaseProvider

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

BitbucketReleaseProvider implements release.Provider for Bitbucket Cloud.

func NewReleaseProvider

NewReleaseProvider constructs a BitbucketReleaseProvider.

Credentials are resolved in order:

  1. cfg keys "username" and "app_password"
  2. BITBUCKET_USERNAME / BITBUCKET_APP_PASSWORD environment variables

The filename regex can be overridden via src.Params["filename_pattern"].

func (*BitbucketReleaseProvider) DownloadReleaseAsset

func (p *BitbucketReleaseProvider) DownloadReleaseAsset(ctx context.Context, _, _ string, asset release.ReleaseAsset) (io.ReadCloser, string, error)

DownloadReleaseAsset streams the asset at its BrowserDownloadURL.

func (*BitbucketReleaseProvider) GetLatestRelease

func (p *BitbucketReleaseProvider) GetLatestRelease(ctx context.Context, owner, repo string) (release.Release, error)

GetLatestRelease returns a synthetic release built from the most recently uploaded Downloads that match the filename pattern.

func (*BitbucketReleaseProvider) GetReleaseByTag

func (p *BitbucketReleaseProvider) GetReleaseByTag(_ context.Context, _, _, _ string) (release.Release, error)

GetReleaseByTag is not supported for Bitbucket Downloads.

func (*BitbucketReleaseProvider) ListReleases

func (p *BitbucketReleaseProvider) ListReleases(_ context.Context, _, _ string, _ int) ([]release.Release, error)

ListReleases is not supported for Bitbucket Downloads.

func (*BitbucketReleaseProvider) SetAPIBase

func (p *BitbucketReleaseProvider) SetAPIBase(base string)

SetAPIBase overrides the Bitbucket API base URL. Intended for testing only.

Jump to

Keyboard shortcuts

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