client

package
v0.103.1 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(s Spec) (*scm.Client, error)

func URL

func URL() string

Types

type Spec

type Spec struct {
	// "username" specifies the username used to authenticate with Bitbucket Cloud API
	Username string `yaml:",omitempty"`
	//  "token" specifies the credential used to authenticate with Bitbucket Cloud API
	//
	//  The "token" is a repository or project access token with "pullrequest:write" scope.
	//
	//  "token" and "password" are mutually exclusive
	//
	//  remark:
	//    A token is a sensitive information, it's recommended to not set this value directly in the configuration file
	//    but to use an environment variable or a SOPS file.
	//
	//    The value can be set to `{{ requiredEnv "BITBUCKET_TOKEN"}}` to retrieve the token from the environment variable `BITBUCKET_TOKEN`
	//	  or `{{ .bitbucket.token }}` to retrieve the token from a SOPS file.
	//
	//	  For more information, about a SOPS file, please refer to the following documentation:
	//    https://github.com/getsops/sops
	Token string `yaml:",omitempty"`
	//  "password" specifies the credential used to authenticate with Bitbucket Cloud API, it must be combined with "username"
	//
	//  The "password" should be app password with "pullrequest:write" scope.
	//
	//  "token" and "password" are mutually exclusive
	//
	//  remark:
	//    A password is a sensitive information, it's recommended to not set this value directly in the configuration file
	//    but to use an environment variable or a SOPS file.
	//
	//    The value can be set to `{{ requiredEnv "BITBUCKET_PASSWORD"}}` to retrieve the token from the environment variable `BITBUCKET_PASSWORD`
	//	  or `{{ .bitbucket.password }}` to retrieve the token from a SOPS file.
	//
	//	  For more information, about a SOPS file, please refer to the following documentation:
	//    https://github.com/getsops/sops
	Password string `yaml:",omitempty"`
	// "owner" defines repository owner
	Owner string `yaml:",omitempty" jsonschema:"required"`
	// "repository" defines the name of a repository for a specific owner
	Repository string `yaml:",omitempty" jsonschema:"required"`
}

Spec defines a specification for a Bitbucket Cloud resource parsed from an updatecli manifest file

Jump to

Keyboard shortcuts

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