bitbucketlink

package
v0.9.1 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Overview

Package bitbucketlink resolves a tenant's Bitbucket workspace links. It lives outside internal/cmd because both the project and the integration command trees need it, and sibling command packages must not import each other.

Index

Constants

View Source
const PageSize = 100

PageSize is the integration service's cap on a listing page.

Variables

This section is empty.

Functions

func NormalizeRepositoryUUID

func NormalizeRepositoryUUID(value string) (string, error)

NormalizeRepositoryUUID validates a repository UUID and returns the canonical lowercase, unbraced form the control plane requires. Bitbucket shows repository UUIDs braced and uppercase, so the CLI accepts those forms instead of letting the server reject them after auth and link resolution.

func PickSingle

func PickSingle(links []Link, label string) (string, error)

PickSingle applies ResolveSingle's selection to links a caller already fetched, so one listing serves both the source inference and the link resolution in `project sync`.

func ResolveSingle

func ResolveSingle(ctx context.Context, client Lister, label string) (string, error)

ResolveSingle returns the tenant's only workspace link when the caller did not pick one with --link-id. With no link or more than one, it fails with guidance, mirroring the GitHub link resolution in `project sync`.

Types

type Link struct {
	ID            string
	WorkspaceUUID string
	WorkspaceSlug string
	WorkspaceName string
}

Link is one Bitbucket workspace link of the tenant.

func List

func List(ctx context.Context, client Lister, label string) ([]Link, error)

List walks every page of the tenant's workspace links.

type Lister

Lister is the one RPC this package reads.

Jump to

Keyboard shortcuts

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