Documentation
¶
Index ¶
- Constants
- func DecodeError(e map[string]interface{}) error
- type BitbucketError
- type BranchModel
- type BranchRestrictions
- func (b *BranchRestrictions) Create(bo *BranchRestrictionsOptions) (*BranchRestrictions, error)
- func (b *BranchRestrictions) Delete(bo *BranchRestrictionsOptions) (interface{}, error)
- func (b *BranchRestrictions) Get(bo *BranchRestrictionsOptions) (*BranchRestrictions, error)
- func (b *BranchRestrictions) Gets(bo *BranchRestrictionsOptions) (interface{}, error)
- func (b *BranchRestrictions) Update(bo *BranchRestrictionsOptions) (interface{}, error)
- type BranchRestrictionsOptions
- type BranchType
- type BranchingModel
- type Client
- func NewAPITokenAuth(email, token string) (*Client, error)
- func NewAPITokenAuthWithBaseUrlStr(email, token, urlStr string) (*Client, error)
- func NewAPITokenAuthWithBaseUrlStrCaCert(email, token, urlStr string, caCerts []byte) (*Client, error)
- func NewAPITokenAuthWithCaCert(email, token string, caCerts []byte) (*Client, error)
- func NewBasicAuth(u, p string) (*Client, error)
- func NewBasicAuthWithBaseUrlStr(u, p, urlStr string) (*Client, error)
- func NewBasicAuthWithBaseUrlStrCaCert(u, p, urlStr string, c []byte) (*Client, error)
- func NewBasicAuthWithCaCert(u, p string, c []byte) (*Client, error)
- func NewOAuth(i, s string) (*Client, error)deprecated
- func NewOAuthClientCredentials(i, s string) (*Client, error)
- func NewOAuthClientCredentialsWithEndpoint(i, s, tokenURL string) (*Client, error)
- func NewOAuthWithCode(i, s, c string) (*Client, string, error)
- func NewOAuthWithCodeWithEndpoint(i, s, c string, ep oauth2.Endpoint) (*Client, string, error)
- func NewOAuthWithEndpoint(i, s string, ep oauth2.Endpoint) (*Client, error)deprecated
- func NewOAuthWithRefreshToken(i, s, rt string) (*Client, string, error)
- func NewOAuthWithRefreshTokenWithEndpoint(i, s, rt string, ep oauth2.Endpoint) (*Client, string, error)
- func NewOAuthbearerToken(t string) (*Client, error)
- func NewOAuthbearerTokenWithBaseUrlStr(t, u string) (*Client, error)
- func NewOAuthbearerTokenWithBaseUrlStrCaCert(t, u string, c []byte) (*Client, error)
- func NewOAuthbearerTokenWithCaCert(t string, c []byte) (*Client, error)
- type CommitStatusOptions
- type Commits
- func (cm *Commits) CreateCommitStatus(cmo *CommitsOptions, cso *CommitStatusOptions) (interface{}, error)
- func (cm *Commits) GetCommit(cmo *CommitsOptions) (interface{}, error)
- func (cm *Commits) GetCommitComment(cmo *CommitsOptions) (interface{}, error)
- func (cm *Commits) GetCommitComments(cmo *CommitsOptions) (interface{}, error)
- func (cm *Commits) GetCommitStatus(cmo *CommitsOptions, commitStatusKey string) (interface{}, error)
- func (cm *Commits) GetCommitStatuses(cmo *CommitsOptions) (interface{}, error)
- func (cm *Commits) GetCommits(cmo *CommitsOptions) (interface{}, error)
- func (cm *Commits) GiveApprove(cmo *CommitsOptions) (interface{}, error)
- func (cm *Commits) RemoveApprove(cmo *CommitsOptions) (interface{}, error)
- type CommitsOptions
- type DefaultReviewer
- type DefaultReviewers
- type DeployKey
- type DeployKeyOptions
- type DeployKeys
- type DeployKeysRes
- type DeploymentVariable
- type DeploymentVariables
- type Diff
- type DiffOptions
- type DiffStat
- type DiffStatOptions
- type DiffStatRes
- type Downloads
- type DownloadsOptions
- type EffectiveDefaultReviewer
- type EffectiveDefaultReviewers
- type Environment
- type EnvironmentType
- type Environments
- type File
- type Group
- type GroupPermission
- type GroupPermissions
- type IssueChangesOptions
- type IssueCommentsOptions
- type Issues
- func (p *Issues) Create(io *IssuesOptions) (interface{}, error)
- func (p *Issues) CreateChange(ico *IssueChangesOptions) (interface{}, error)
- func (p *Issues) CreateComment(ico *IssueCommentsOptions) (interface{}, error)
- func (p *Issues) Delete(io *IssuesOptions) (interface{}, error)
- func (p *Issues) DeleteComment(ico *IssueCommentsOptions) (interface{}, error)
- func (p *Issues) DeleteVote(io *IssuesOptions) error
- func (p *Issues) DeleteWatch(io *IssuesOptions) error
- func (p *Issues) Get(io *IssuesOptions) (interface{}, error)
- func (p *Issues) GetChange(ico *IssueChangesOptions) (interface{}, error)
- func (p *Issues) GetChanges(ico *IssueChangesOptions) (interface{}, error)
- func (p *Issues) GetComment(ico *IssueCommentsOptions) (interface{}, error)
- func (p *Issues) GetComments(ico *IssueCommentsOptions) (interface{}, error)
- func (p *Issues) GetVote(io *IssuesOptions) (bool, interface{}, error)
- func (p *Issues) GetWatch(io *IssuesOptions) (bool, interface{}, error)
- func (p *Issues) Gets(io *IssuesOptions) (interface{}, error)
- func (p *Issues) PutVote(io *IssuesOptions) error
- func (p *Issues) PutWatch(io *IssuesOptions) error
- func (p *Issues) Update(io *IssuesOptions) (interface{}, error)
- func (p *Issues) UpdateComment(ico *IssueCommentsOptions) (interface{}, error)
- type IssuesOptions
- type PageRes
- type Permission
- type Pipeline
- type PipelineBuildNumber
- type PipelineKeyPair
- type PipelineVariable
- type PipelineVariables
- type Pipelines
- func (p *Pipelines) Get(po *PipelinesOptions) (interface{}, error)
- func (p *Pipelines) GetLog(po *PipelinesOptions) (string, error)
- func (p *Pipelines) GetStep(po *PipelinesOptions) (interface{}, error)
- func (p *Pipelines) List(po *PipelinesOptions) (interface{}, error)
- func (p *Pipelines) ListSteps(po *PipelinesOptions) (interface{}, error)
- type PipelinesOptions
- type Project
- type ProjectOptions
- type ProjectsRes
- type PullRequestCommentOptions
- type PullRequests
- func (p *PullRequests) Activities(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Activity(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) AddComment(co *PullRequestCommentOptions) (interface{}, error)
- func (p *PullRequests) Approve(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Commits(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Create(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Decline(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) DeleteComment(co *PullRequestCommentOptions) (interface{}, error)
- func (p *PullRequests) Diff(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Get(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) GetByCommit(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) GetComment(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) GetComments(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) GetCommits(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Gets(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) List(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Merge(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Patch(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) RequestChanges(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Statuses(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) UnApprove(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) UnRequestChanges(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) Update(po *PullRequestsOptions) (interface{}, error)
- func (p *PullRequests) UpdateComment(co *PullRequestCommentOptions) (interface{}, error)
- type PullRequestsMergeStrategy
- type PullRequestsOptions
- type Repositories
- func (r *Repositories) ListForAccount(ro *RepositoriesOptions) (*RepositoriesRes, error)
- func (r *Repositories) ListForTeam(ro *RepositoriesOptions) (*RepositoriesRes, error)deprecated
- func (r *Repositories) ListProject(ro *RepositoriesOptions) (*RepositoriesRes, error)
- func (r *Repositories) ListPublic() (*RepositoriesRes, error)
- type RepositoriesOptions
- type RepositoriesRes
- type Repository
- func (r *Repository) AddDefaultReviewer(rdro *RepositoryDefaultReviewerOptions) (*DefaultReviewer, error)
- func (r *Repository) AddDeploymentVariable(opt *RepositoryDeploymentVariableOptions) (*DeploymentVariable, error)
- func (r *Repository) AddEnvironment(opt *RepositoryEnvironmentOptions) (*Environment, error)
- func (r *Repository) AddPipelineKeyPair(rpkpo *RepositoryPipelineKeyPairOptions) (*PipelineKeyPair, error)
- func (r *Repository) AddPipelineVariable(rpvo *RepositoryPipelineVariableOptions) (*PipelineVariable, error)
- func (r *Repository) BranchingModel(rbmo *RepositoryBranchingModelOptions) (*BranchingModel, error)
- func (r *Repository) Create(ro *RepositoryOptions) (*Repository, error)
- func (r *Repository) CreateBranch(rbo *RepositoryBranchCreationOptions) (*RepositoryBranch, error)
- func (r *Repository) CreateTag(rbo *RepositoryTagCreationOptions) (*RepositoryTag, error)
- func (r *Repository) Delete(ro *RepositoryOptions) (interface{}, error)
- func (r *Repository) DeleteBranch(rbo *RepositoryBranchDeleteOptions) error
- func (r *Repository) DeleteDefaultReviewer(rdro *RepositoryDefaultReviewerOptions) (interface{}, error)
- func (r *Repository) DeleteDeploymentVariable(opt *RepositoryDeploymentVariableDeleteOptions) (interface{}, error)
- func (r *Repository) DeleteEnvironment(opt *RepositoryEnvironmentDeleteOptions) (interface{}, error)
- func (r *Repository) DeleteGroupPermissions(rgo *RepositoryGroupPermissionsOptions) (interface{}, error)
- func (r *Repository) DeletePipelineKeyPair(rpkpo *RepositoryPipelineKeyPairOptions) (interface{}, error)
- func (r *Repository) DeletePipelineVariable(opt *RepositoryPipelineVariableDeleteOptions) (interface{}, error)
- func (r *Repository) DeleteTag(rbo *RepositoryTagDeleteOptions) error
- func (r *Repository) DeleteUserPermissions(rgo *RepositoryUserPermissionsOptions) (interface{}, error)
- func (r *Repository) Fork(fo *RepositoryForkOptions) (*Repository, error)
- func (r *Repository) Get(ro *RepositoryOptions) (*Repository, error)
- func (r *Repository) GetBranch(rbo *RepositoryBranchOptions) (*RepositoryBranch, error)
- func (r *Repository) GetDefaultReviewer(rdro *RepositoryDefaultReviewerOptions) (*DefaultReviewer, error)
- func (r *Repository) GetEnvironment(opt *RepositoryEnvironmentOptions) (*Environment, error)
- func (r *Repository) GetFileBlob(ro *RepositoryBlobOptions) (*RepositoryBlob, error)
- func (r *Repository) GetFileContent(ro *RepositoryFilesOptions) ([]byte, error)
- func (r *Repository) GetGroupPermissions(rgo *RepositoryGroupPermissionsOptions) (*GroupPermission, error)
- func (r *Repository) GetPipelineConfig(rpo *RepositoryPipelineOptions) (*Pipeline, error)
- func (r *Repository) GetPipelineKeyPair(rpkpo *RepositoryPipelineKeyPairOptions) (*PipelineKeyPair, error)
- func (r *Repository) GetPipelineVariable(opt *RepositoryPipelineVariableOptions) (*PipelineVariable, error)
- func (r *Repository) GetUserPermissions(rgo *RepositoryUserPermissionsOptions) (*UserPermission, error)
- func (r *Repository) ListBranches(rbo *RepositoryBranchOptions) (*RepositoryBranches, error)
- func (r *Repository) ListDefaultReviewers(ro *RepositoryOptions) (*DefaultReviewers, error)
- func (r *Repository) ListDeploymentVariables(opt *RepositoryDeploymentVariablesOptions) (*DeploymentVariables, error)
- func (r *Repository) ListEffectiveDefaultReviewers(ro *RepositoryOptions) (*EffectiveDefaultReviewers, error)
- func (r *Repository) ListEnvironments(opt *RepositoryEnvironmentsOptions) (*Environments, error)
- func (r *Repository) ListFiles(ro *RepositoryFilesOptions) ([]RepositoryFile, error)
- func (r *Repository) ListForks(ro *RepositoryOptions) (interface{}, error)
- func (r *Repository) ListGroupPermissions(ro *RepositoryOptions) (*GroupPermissions, error)
- func (r *Repository) ListPipelineVariables(opt *RepositoryPipelineVariablesOptions) (*PipelineVariables, error)
- func (r *Repository) ListRefs(rbo *RepositoryRefOptions) (*RepositoryRefs, error)
- func (r *Repository) ListTags(rbo *RepositoryTagOptions) (*RepositoryTags, error)
- func (r *Repository) ListUserPermissions(ro *RepositoryOptions) (*UserPermissions, error)
- func (r *Repository) ListWatchers(ro *RepositoryOptions) (interface{}, error)
- func (r *Repository) SetGroupPermissions(rgo *RepositoryGroupPermissionsOptions) (*GroupPermission, error)
- func (r *Repository) SetUserPermissions(rgo *RepositoryUserPermissionsOptions) (*UserPermission, error)
- func (r *Repository) Update(ro *RepositoryOptions) (*Repository, error)
- func (r *Repository) UpdateDeploymentVariable(opt *RepositoryDeploymentVariableOptions) (*DeploymentVariable, error)
- func (r *Repository) UpdatePipelineBuildNumber(rpbno *RepositoryPipelineBuildNumberOptions) (*PipelineBuildNumber, error)
- func (r *Repository) UpdatePipelineConfig(rpo *RepositoryPipelineOptions) (*Pipeline, error)
- func (r *Repository) UpdatePipelineVariable(opt *RepositoryPipelineVariableOptions) (*PipelineVariable, error)
- func (r *Repository) WriteFileBlob(ro *RepositoryBlobWriteOptions) error
- func (r *Repository) WriteFileContent(ro *RepositoryContentWriteOptions) error
- type RepositoryBlob
- type RepositoryBlobOptions
- type RepositoryBlobWriteOptions
- type RepositoryBranch
- type RepositoryBranchCreationOptions
- type RepositoryBranchDeleteOptions
- type RepositoryBranchOptions
- type RepositoryBranchTarget
- type RepositoryBranches
- type RepositoryBranchingModelOptions
- type RepositoryContentWriteOptions
- type RepositoryDefaultReviewerOptions
- type RepositoryDeploymentVariableDeleteOptions
- type RepositoryDeploymentVariableOptions
- type RepositoryDeploymentVariablesOptions
- type RepositoryEnvironmentDeleteOptions
- type RepositoryEnvironmentOptions
- type RepositoryEnvironmentTypeOption
- type RepositoryEnvironmentsOptions
- type RepositoryFile
- type RepositoryFilesOptions
- type RepositoryForkOptions
- type RepositoryGroupPermissionsOptions
- type RepositoryOptions
- type RepositoryPipelineBuildNumberOptions
- type RepositoryPipelineKeyPairOptions
- type RepositoryPipelineOptions
- type RepositoryPipelineVariableDeleteOptions
- type RepositoryPipelineVariableOptions
- type RepositoryPipelineVariablesOptions
- type RepositoryRefOptions
- type RepositoryRefs
- type RepositoryTag
- type RepositoryTagCreationOptions
- type RepositoryTagDeleteOptions
- type RepositoryTagOptions
- type RepositoryTagTarget
- type RepositoryTags
- type RepositoryUserPermissionsOptions
- type Response
- type SSHKey
- type SSHKeyOptions
- type SSHKeyRes
- type SSHKeys
- type Teams
- func (t *Teams) Followers(teamname string) (interface{}, error)
- func (t *Teams) Following(teamname string) (interface{}, error)
- func (t *Teams) List(role string) (interface{}, error)
- func (t *Teams) Members(teamname string) (interface{}, error)
- func (t *Teams) Profile(teamname string) (interface{}, error)
- func (t *Teams) Projects(teamname string) (interface{}, error)
- func (t *Teams) Repositories(teamname string) (interface{}, error)
- type UnexpectedResponseStatusError
- type User
- type UserPermission
- type UserPermissions
- type Users
- type Webhook
- type Webhooks
- func (r *Webhooks) Create(ro *WebhooksOptions) (*Webhook, error)
- func (r *Webhooks) Delete(ro *WebhooksOptions) (interface{}, error)
- func (r *Webhooks) Get(ro *WebhooksOptions) (*Webhook, error)
- func (r *Webhooks) Gets(ro *WebhooksOptions) (interface{}, error)
- func (r *Webhooks) List(ro *WebhooksOptions) ([]Webhook, error)
- func (r *Webhooks) Update(ro *WebhooksOptions) (*Webhook, error)
- type WebhooksOptions
- type Workspace
- func (t *Workspace) CreateProject(opt *ProjectOptions) (*Project, error)
- func (t *Workspace) DeleteProject(opt *ProjectOptions) (interface{}, error)
- func (t *Workspace) Get(workspace string) (*Workspace, error)
- func (t *Workspace) GetProject(opt *ProjectOptions) (*Project, error)
- func (t *Workspace) List() (*WorkspaceList, error)
- func (w *Workspace) Members(teamname string) (*WorkspaceMembers, error)
- func (w *Workspace) Projects(teamname string) (*ProjectsRes, error)
- func (t *Workspace) UpdateProject(opt *ProjectOptions) (*Project, error)
- type WorkspaceList
- type WorkspaceMembers
Constants ¶
const ( RepoPushEvent string = "repo:push" RepoForkEvent string = "repo:fork" RepoUpdatedEvent string = "repo:updated" RepoCommitCommentCreatedEvent string = "repo:commit_comment_created" RepoCommitStatusCreatedEvent string = "repo:commit_status_created" RepoCommitStatusUpdatedEvent string = "repo:commit_status_updated" IssueCreatedEvent string = "issue:created" IssueUpdatedEvent string = "issue:updated" IssueCommentCreatedEvent string = "issue:comment_created" PullRequestCreatedEvent string = "pullrequest:created" PullRequestUpdatedEvent string = "pullrequest:updated" PullRequestApprovedEvent string = "pullrequest:approved" PullRequestUnapprovedEvent string = "pullrequest:unapproved" PullRequestMergedEvent string = "pullrequest:fulfilled" PullRequestDeclinedEvent string = "pullrequest:rejected" PullRequestCommentCreatedEvent string = "pullrequest:comment_created" PullRequestCommentUpdatedEvent string = "pullrequest:comment_updated" PullRequestCommentDeletedEvent string = "pullrequest:comment_deleted" )
const DEFAULT_BITBUCKET_API_BASE_URL = "https://api.bitbucket.org/2.0"
const DEFAULT_LIMIT_PAGES = 0
const DEFAULT_MAX_DEPTH = 1
const DEFAULT_PAGE_LENGTH = 10
Variables ¶
This section is empty.
Functions ¶
func DecodeError ¶
Types ¶
type BitbucketError ¶
type BranchModel ¶ added in v0.6.1
type BranchModel struct {
Name string
Branch RepositoryBranch
Use_Mainbranch bool
}
type BranchRestrictions ¶
type BranchRestrictions struct {
ID int
Pattern string
Kind string
Value *int
// contains filtered or unexported fields
}
func (*BranchRestrictions) Create ¶
func (b *BranchRestrictions) Create(bo *BranchRestrictionsOptions) (*BranchRestrictions, error)
func (*BranchRestrictions) Delete ¶
func (b *BranchRestrictions) Delete(bo *BranchRestrictionsOptions) (interface{}, error)
func (*BranchRestrictions) Get ¶
func (b *BranchRestrictions) Get(bo *BranchRestrictionsOptions) (*BranchRestrictions, error)
func (*BranchRestrictions) Gets ¶
func (b *BranchRestrictions) Gets(bo *BranchRestrictionsOptions) (interface{}, error)
func (*BranchRestrictions) Update ¶
func (b *BranchRestrictions) Update(bo *BranchRestrictionsOptions) (interface{}, error)
type BranchRestrictionsOptions ¶
type BranchRestrictionsOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
ID string `json:"id"`
Groups map[string]string `json:"groups"`
Pattern string `json:"pattern"`
Users []string `json:"users"`
Kind string `json:"kind"`
// BranchMatchKind controls how Pattern is matched against branches.
// Allowed values are "glob" (default when empty) and "branching_model".
BranchMatchKind string `json:"branch_match_kind"`
// BranchType is required when BranchMatchKind is "branching_model".
BranchType string `json:"branch_type"`
FullSlug string `json:"full_slug"`
Name string `json:"name"`
Value interface{} `json:"value"`
// contains filtered or unexported fields
}
func (*BranchRestrictionsOptions) WithContext ¶ added in v0.9.80
func (b *BranchRestrictionsOptions) WithContext(ctx context.Context) *BranchRestrictionsOptions
type BranchType ¶ added in v0.5.6
type BranchingModel ¶ added in v0.5.6
type BranchingModel struct {
Type string
Branch_Types []BranchType
Development BranchModel
Production BranchModel
}
type Client ¶
type Client struct {
Auth *auth
Users *Users
User user
Teams teams
Repositories *Repositories
Workspaces *Workspace
Pagelen int
MaxDepth int
// LimitPages limits the number of pages for a request
// default value as 0 -- disable limits
LimitPages int
// DisableAutoPaging allows you to disable the default behavior of automatically requesting
// all the pages for a paginated response.
DisableAutoPaging bool
HttpClient *http.Client
// contains filtered or unexported fields
}
func NewAPITokenAuth ¶ added in v0.9.98
NewAPITokenAuth returns a Client authenticated with an Atlassian API token. Pass the Atlassian account email as the first argument and the API token as the second. Bitbucket Cloud accepts API tokens via HTTP Basic auth, so this is a thin alias over NewBasicAuth that makes the intent explicit.
See https://support.atlassian.com/bitbucket-cloud/docs/using-api-tokens/
func NewAPITokenAuthWithBaseUrlStr ¶ added in v0.9.98
NewAPITokenAuthWithBaseUrlStr is like NewAPITokenAuth but targets a custom API base URL (e.g. an Isolated Cloud Instance with a customer-specific hostname). Equivalent to BITBUCKET_API_BASE_URL but configured per client.
func NewAPITokenAuthWithBaseUrlStrCaCert ¶ added in v0.9.98
func NewAPITokenAuthWithBaseUrlStrCaCert(email, token, urlStr string, caCerts []byte) (*Client, error)
NewAPITokenAuthWithBaseUrlStrCaCert combines a custom API base URL with extra trusted CA certificates. Suited for Isolated Cloud Instances behind an internal certificate authority.
func NewAPITokenAuthWithCaCert ¶ added in v0.9.98
NewAPITokenAuthWithCaCert is like NewAPITokenAuth but trusts the supplied PEM-encoded CA certificates in addition to the system roots.
func NewBasicAuth ¶
NewBasicAuth returns a Client authenticated via HTTP Basic auth.
Atlassian has deprecated Bitbucket Cloud app passwords in favor of Atlassian API tokens. For new integrations, prefer NewAPITokenAuth, which delegates to NewBasicAuth but documents the email + API token usage.
func NewBasicAuthWithBaseUrlStr ¶ added in v0.9.92
func NewBasicAuthWithBaseUrlStrCaCert ¶ added in v0.9.92
func NewBasicAuthWithCaCert ¶ added in v0.9.89
func NewOAuth
deprecated
NewOAuth performs an interactive OAuth flow using stdin/stdout.
Deprecated: This function uses stdin/stdout directly, making it unsuitable for non-interactive environments (e.g., web servers, background jobs). Instead, use NewOAuthWithCode after obtaining the authorization code through your own UI/CLI. You can generate the authorization URL using oauth2.Config.AuthCodeURL() directly.
func NewOAuthClientCredentials ¶ added in v0.4.1
Uses the Client Credentials Grant oauth2 flow to authenticate to Bitbucket
func NewOAuthClientCredentialsWithEndpoint ¶ added in v0.9.99
NewOAuthClientCredentialsWithEndpoint is like NewOAuthClientCredentials but targets a custom OAuth token endpoint (e.g. an Isolated Cloud Instance with a customer-specific hostname).
func NewOAuthWithCode ¶ added in v0.4.1
NewOAuthWithCode finishes the OAuth handshake with a given code and returns a *Client
func NewOAuthWithCodeWithEndpoint ¶ added in v0.9.99
NewOAuthWithCodeWithEndpoint is like NewOAuthWithCode but targets a custom OAuth endpoint (e.g. an Isolated Cloud Instance with a customer-specific hostname).
func NewOAuthWithEndpoint
deprecated
added in
v0.9.99
NewOAuthWithEndpoint is like NewOAuth but targets a custom OAuth endpoint (e.g. an Isolated Cloud Instance with a customer-specific hostname).
Deprecated: This function uses stdin/stdout directly, making it unsuitable for non-interactive environments. Prefer NewOAuthWithCodeWithEndpoint.
func NewOAuthWithRefreshToken ¶ added in v0.9.51
NewOAuthWithRefreshToken obtains a new access token with a given refresh token and returns a *Client
func NewOAuthWithRefreshTokenWithEndpoint ¶ added in v0.9.99
func NewOAuthWithRefreshTokenWithEndpoint(i, s, rt string, ep oauth2.Endpoint) (*Client, string, error)
NewOAuthWithRefreshTokenWithEndpoint is like NewOAuthWithRefreshToken but targets a custom OAuth endpoint (e.g. an Isolated Cloud Instance with a customer-specific hostname).
func NewOAuthbearerToken ¶ added in v0.4.1
func NewOAuthbearerTokenWithBaseUrlStr ¶ added in v0.9.92
func NewOAuthbearerTokenWithBaseUrlStrCaCert ¶ added in v0.9.92
func NewOAuthbearerTokenWithCaCert ¶ added in v0.9.89
func (*Client) GetApiBaseURL ¶ added in v0.5.2
func (*Client) GetApiHostnameURL ¶ added in v0.9.17
func (*Client) GetOAuthToken ¶ added in v0.9.40
func (*Client) SetApiBaseURL ¶ added in v0.5.2
type CommitStatusOptions ¶ added in v0.4.1
type Commits ¶
type Commits struct {
// contains filtered or unexported fields
}
func (*Commits) CreateCommitStatus ¶ added in v0.4.1
func (cm *Commits) CreateCommitStatus(cmo *CommitsOptions, cso *CommitStatusOptions) (interface{}, error)
func (*Commits) GetCommit ¶
func (cm *Commits) GetCommit(cmo *CommitsOptions) (interface{}, error)
func (*Commits) GetCommitComment ¶
func (cm *Commits) GetCommitComment(cmo *CommitsOptions) (interface{}, error)
func (*Commits) GetCommitComments ¶
func (cm *Commits) GetCommitComments(cmo *CommitsOptions) (interface{}, error)
func (*Commits) GetCommitStatus ¶
func (cm *Commits) GetCommitStatus(cmo *CommitsOptions, commitStatusKey string) (interface{}, error)
func (*Commits) GetCommitStatuses ¶
func (cm *Commits) GetCommitStatuses(cmo *CommitsOptions) (interface{}, error)
func (*Commits) GetCommits ¶
func (cm *Commits) GetCommits(cmo *CommitsOptions) (interface{}, error)
func (*Commits) GiveApprove ¶
func (cm *Commits) GiveApprove(cmo *CommitsOptions) (interface{}, error)
func (*Commits) RemoveApprove ¶
func (cm *Commits) RemoveApprove(cmo *CommitsOptions) (interface{}, error)
type CommitsOptions ¶
type CommitsOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Revision string `json:"revision"`
Branchortag string `json:"branchortag"`
Include string `json:"include"`
Exclude string `json:"exclude"`
CommentID string `json:"comment_id"`
Page *int `json:"page"`
// contains filtered or unexported fields
}
func (*CommitsOptions) WithContext ¶ added in v0.9.80
func (cm *CommitsOptions) WithContext(ctx context.Context) *CommitsOptions
type DefaultReviewer ¶ added in v0.9.14
type DefaultReviewers ¶ added in v0.9.14
type DeployKeyOptions ¶ added in v0.9.29
type DeployKeyOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Id int `json:"id"`
Label string `json:"label"`
Key string `json:"key"`
// contains filtered or unexported fields
}
func (*DeployKeyOptions) WithContext ¶ added in v0.9.80
func (dk *DeployKeyOptions) WithContext(ctx context.Context) *DeployKeyOptions
type DeployKeys ¶ added in v0.9.29
type DeployKeys struct {
// contains filtered or unexported fields
}
func (*DeployKeys) Create ¶ added in v0.9.29
func (dk *DeployKeys) Create(opt *DeployKeyOptions) (*DeployKey, error)
func (*DeployKeys) Delete ¶ added in v0.9.29
func (dk *DeployKeys) Delete(opt *DeployKeyOptions) (interface{}, error)
func (*DeployKeys) Get ¶ added in v0.9.29
func (dk *DeployKeys) Get(opt *DeployKeyOptions) (*DeployKey, error)
func (*DeployKeys) List ¶ added in v0.9.81
func (dk *DeployKeys) List(opt *DeployKeyOptions) (*DeployKeysRes, error)
type DeployKeysRes ¶ added in v0.9.81
type DeploymentVariable ¶ added in v0.9.6
type DeploymentVariables ¶ added in v0.9.6
type Diff ¶
type Diff struct {
// contains filtered or unexported fields
}
func (*Diff) GetDiff ¶
func (d *Diff) GetDiff(do *DiffOptions) (interface{}, error)
func (*Diff) GetDiffStat ¶ added in v0.9.21
func (d *Diff) GetDiffStat(dso *DiffStatOptions) (*DiffStatRes, error)
func (*Diff) GetPatch ¶
func (d *Diff) GetPatch(do *DiffOptions) (interface{}, error)
type DiffOptions ¶
type DiffOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Spec string `json:"spec"`
Context int `json:"context"`
Path string `json:"path"`
FromPullRequestID int `json:"from_pullrequest_id"`
Whitespace bool `json:"ignore_whitespace"`
Binary bool `json:"binary"`
Renames bool `json:"renames"`
Topic bool `json:"topic"`
}
type DiffStatOptions ¶ added in v0.9.21
type DiffStatOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Spec string `json:"spec"`
FromPullRequestID int `json:"from_pullrequest_id"`
Whitespace bool `json:"ignore_whitespace"`
// Deprecated: Merge is deprecated use Topic
Merge bool `json:"merge"`
Path string `json:"path"`
Renames bool `json:"renames"`
Topic bool `json:"topic"`
PageNum int `json:"page"`
Pagelen int `json:"pagelen"`
MaxDepth int `json:"max_depth"`
Fields []string
}
type DiffStatRes ¶ added in v0.9.21
type Downloads ¶ added in v0.4.1
type Downloads struct {
// contains filtered or unexported fields
}
func (*Downloads) Create ¶ added in v0.4.1
func (dl *Downloads) Create(do *DownloadsOptions) (interface{}, error)
func (*Downloads) List ¶ added in v0.4.1
func (dl *Downloads) List(do *DownloadsOptions) (interface{}, error)
type DownloadsOptions ¶ added in v0.4.1
type DownloadsOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
FilePath string `json:"filepath"`
FileName string `json:"filename"`
Files []File `json:"files"`
// contains filtered or unexported fields
}
func (*DownloadsOptions) WithContext ¶ added in v0.9.80
func (do *DownloadsOptions) WithContext(ctx context.Context) *DownloadsOptions
type EffectiveDefaultReviewer ¶ added in v0.9.63
type EffectiveDefaultReviewer struct {
User DefaultReviewer
Type string
ReviewerType string `mapstructure:"reviewer_type"`
}
type EffectiveDefaultReviewers ¶ added in v0.9.63
type Environment ¶ added in v0.9.6
type Environment struct {
Uuid string
Name string
EnvironmentType EnvironmentType
Rank int
Type string
}
type EnvironmentType ¶ added in v0.9.6
type Environments ¶ added in v0.9.6
type Group ¶ added in v0.9.50
type Group struct {
AccountPrivilege string `mapstructure:"account_privilege"`
DefaultPermission string `mapstructure:"default_permission"`
EmailForwardingDisabled bool `mapstructure:"email_forwarding_disabled"`
FullSlug string `mapstructure:"full_slug"`
Links map[string]map[string]string
Name string `mapstructure:"name"`
Slug string `mapstructure:"slug"`
Type string `mapstructure:"type"`
Workspace map[string]interface{} `mapstructure:"workspace"`
Owner map[string]interface{}
}
type GroupPermission ¶ added in v0.9.50
type GroupPermissions ¶ added in v0.9.50
type IssueChangesOptions ¶ added in v0.9.15
type IssueCommentsOptions ¶ added in v0.9.15
type IssueCommentsOptions struct {
IssuesOptions
Query string `json:"query"`
Sort string `json:"sort"`
CommentContent string `json:"comment_content"`
CommentID string `json:"comment_id"`
}
type Issues ¶ added in v0.9.15
type Issues struct {
// contains filtered or unexported fields
}
func (*Issues) Create ¶ added in v0.9.15
func (p *Issues) Create(io *IssuesOptions) (interface{}, error)
func (*Issues) CreateChange ¶ added in v0.9.15
func (p *Issues) CreateChange(ico *IssueChangesOptions) (interface{}, error)
func (*Issues) CreateComment ¶ added in v0.9.15
func (p *Issues) CreateComment(ico *IssueCommentsOptions) (interface{}, error)
func (*Issues) Delete ¶ added in v0.9.15
func (p *Issues) Delete(io *IssuesOptions) (interface{}, error)
func (*Issues) DeleteComment ¶ added in v0.9.15
func (p *Issues) DeleteComment(ico *IssueCommentsOptions) (interface{}, error)
func (*Issues) DeleteVote ¶ added in v0.9.15
func (p *Issues) DeleteVote(io *IssuesOptions) error
func (*Issues) DeleteWatch ¶ added in v0.9.15
func (p *Issues) DeleteWatch(io *IssuesOptions) error
func (*Issues) Get ¶ added in v0.9.15
func (p *Issues) Get(io *IssuesOptions) (interface{}, error)
func (*Issues) GetChange ¶ added in v0.9.15
func (p *Issues) GetChange(ico *IssueChangesOptions) (interface{}, error)
func (*Issues) GetChanges ¶ added in v0.9.15
func (p *Issues) GetChanges(ico *IssueChangesOptions) (interface{}, error)
func (*Issues) GetComment ¶ added in v0.9.15
func (p *Issues) GetComment(ico *IssueCommentsOptions) (interface{}, error)
func (*Issues) GetComments ¶ added in v0.9.15
func (p *Issues) GetComments(ico *IssueCommentsOptions) (interface{}, error)
func (*Issues) GetVote ¶ added in v0.9.15
func (p *Issues) GetVote(io *IssuesOptions) (bool, interface{}, error)
func (*Issues) GetWatch ¶ added in v0.9.15
func (p *Issues) GetWatch(io *IssuesOptions) (bool, interface{}, error)
func (*Issues) Gets ¶ added in v0.9.15
func (p *Issues) Gets(io *IssuesOptions) (interface{}, error)
func (*Issues) PutVote ¶ added in v0.9.15
func (p *Issues) PutVote(io *IssuesOptions) error
func (*Issues) PutWatch ¶ added in v0.9.15
func (p *Issues) PutWatch(io *IssuesOptions) error
func (*Issues) Update ¶ added in v0.9.15
func (p *Issues) Update(io *IssuesOptions) (interface{}, error)
func (*Issues) UpdateComment ¶ added in v0.9.15
func (p *Issues) UpdateComment(ico *IssueCommentsOptions) (interface{}, error)
type IssuesOptions ¶ added in v0.9.15
type IssuesOptions struct {
ID string `json:"id"`
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
States []string `json:"states"`
Query string `json:"query"`
Sort string `json:"sort"`
Title string `json:"title"`
Content string `json:"content"`
State string `json:"state"`
Kind string `json:"kind"`
Milestone string `json:"milestone"`
Component string `json:"component"`
Priority string `json:"priority"`
Version string `json:"version"`
Assignee string `json:"assignee"`
// contains filtered or unexported fields
}
func (*IssuesOptions) WithContext ¶ added in v0.9.80
func (io *IssuesOptions) WithContext(ctx context.Context) *IssuesOptions
type Permission ¶ added in v0.8.1
type Permission struct {
Type string
// contains filtered or unexported fields
}
func (*Permission) GetUserPermissions ¶ added in v0.8.1
func (t *Permission) GetUserPermissions(organization, member string) (*Permission, error)
func (*Permission) GetUserPermissionsByUuid ¶ added in v0.9.4
func (t *Permission) GetUserPermissionsByUuid(organization, member string) (*Permission, error)
type Pipeline ¶ added in v0.3.1
type Pipeline struct {
Type string
Enabled bool
Repository Repository
}
type PipelineBuildNumber ¶ added in v0.5.3
type PipelineKeyPair ¶ added in v0.3.1
type PipelineVariable ¶ added in v0.3.1
type PipelineVariables ¶ added in v0.9.4
type Pipelines ¶ added in v0.9.0
type Pipelines struct {
// contains filtered or unexported fields
}
func (*Pipelines) Get ¶ added in v0.9.0
func (p *Pipelines) Get(po *PipelinesOptions) (interface{}, error)
func (*Pipelines) GetLog ¶ added in v0.9.0
func (p *Pipelines) GetLog(po *PipelinesOptions) (string, error)
func (*Pipelines) GetStep ¶ added in v0.9.0
func (p *Pipelines) GetStep(po *PipelinesOptions) (interface{}, error)
func (*Pipelines) List ¶ added in v0.9.0
func (p *Pipelines) List(po *PipelinesOptions) (interface{}, error)
func (*Pipelines) ListSteps ¶ added in v0.9.0
func (p *Pipelines) ListSteps(po *PipelinesOptions) (interface{}, error)
type PipelinesOptions ¶ added in v0.9.0
type ProjectOptions ¶ added in v0.9.14
type ProjectOptions struct {
Uuid string `json:"uuid"`
Owner string `json:"owner"`
Name string `json:"name"`
Key string `json:"key"`
Description string `json:"description"`
IsPrivate bool `json:"is_private"`
// contains filtered or unexported fields
}
func (*ProjectOptions) WithContext ¶ added in v0.9.80
func (po *ProjectOptions) WithContext(ctx context.Context) *ProjectOptions
type ProjectsRes ¶ added in v0.9.22
type PullRequestCommentOptions ¶ added in v0.9.27
type PullRequestCommentOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
PullRequestID string `json:"id"`
Content string `json:"content"`
CommentId string `json:"-"`
Parent *int `json:"parent"`
// contains filtered or unexported fields
}
func (*PullRequestCommentOptions) WithContext ¶ added in v0.9.80
func (pco *PullRequestCommentOptions) WithContext(ctx context.Context) *PullRequestCommentOptions
type PullRequests ¶
type PullRequests struct {
// contains filtered or unexported fields
}
func (*PullRequests) Activities ¶
func (p *PullRequests) Activities(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Activity ¶
func (p *PullRequests) Activity(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) AddComment ¶ added in v0.9.27
func (p *PullRequests) AddComment(co *PullRequestCommentOptions) (interface{}, error)
func (*PullRequests) Approve ¶ added in v0.9.2
func (p *PullRequests) Approve(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Commits ¶
func (p *PullRequests) Commits(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Create ¶
func (p *PullRequests) Create(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Decline ¶
func (p *PullRequests) Decline(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) DeleteComment ¶ added in v0.9.76
func (p *PullRequests) DeleteComment(co *PullRequestCommentOptions) (interface{}, error)
func (*PullRequests) Diff ¶
func (p *PullRequests) Diff(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Get ¶
func (p *PullRequests) Get(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) GetByCommit ¶ added in v0.9.84
func (p *PullRequests) GetByCommit(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) GetComment ¶
func (p *PullRequests) GetComment(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) GetComments ¶
func (p *PullRequests) GetComments(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) GetCommits ¶ added in v0.9.84
func (p *PullRequests) GetCommits(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Gets ¶
func (p *PullRequests) Gets(po *PullRequestsOptions) (interface{}, error)
Redirect to List() which is the function name declared in bitbucket.go by Yoshimatsu on 6/10/19. This is to prevent breakage for anyone using the missnamed Gets() function call.
func (*PullRequests) List ¶ added in v0.9.90
func (p *PullRequests) List(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Merge ¶
func (p *PullRequests) Merge(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Patch ¶
func (p *PullRequests) Patch(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) RequestChanges ¶ added in v0.9.2
func (p *PullRequests) RequestChanges(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Statuses ¶ added in v0.6.5
func (p *PullRequests) Statuses(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) UnApprove ¶ added in v0.9.2
func (p *PullRequests) UnApprove(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) UnRequestChanges ¶ added in v0.9.2
func (p *PullRequests) UnRequestChanges(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) Update ¶
func (p *PullRequests) Update(po *PullRequestsOptions) (interface{}, error)
func (*PullRequests) UpdateComment ¶ added in v0.9.38
func (p *PullRequests) UpdateComment(co *PullRequestCommentOptions) (interface{}, error)
type PullRequestsMergeStrategy ¶ added in v0.9.95
type PullRequestsMergeStrategy string
const ( MergeCommit PullRequestsMergeStrategy = "merge_commit" Squash PullRequestsMergeStrategy = "squash" FastForward PullRequestsMergeStrategy = "fast_forward" SquashFastForward PullRequestsMergeStrategy = "squash_fast_forward" RebaseFastForward PullRequestsMergeStrategy = "rebase_fast_forward" RebaseMerge PullRequestsMergeStrategy = "rebase_merge" )
type PullRequestsOptions ¶
type PullRequestsOptions struct {
ID string `json:"id"`
CommentID string `json:"comment_id"`
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Title string `json:"title"`
Description string `json:"description"`
CloseSourceBranch bool `json:"close_source_branch"`
SourceBranch string `json:"source_branch"`
SourceRepository string `json:"source_repository"`
DestinationBranch string `json:"destination_branch"`
DestinationCommit string `json:"destination_repository"`
MergeStrategy PullRequestsMergeStrategy `json:"merge_strategy"`
Message string `json:"message"`
Reviewers []string `json:"reviewers"`
States []string `json:"states"`
Query string `json:"query"`
Sort string `json:"sort"`
Draft bool `json:"draft"`
Commit string `json:"commit"`
// contains filtered or unexported fields
}
func (*PullRequestsOptions) WithContext ¶ added in v0.9.80
func (po *PullRequestsOptions) WithContext(ctx context.Context) *PullRequestsOptions
type Repositories ¶
type Repositories struct {
PullRequests *PullRequests
Issues *Issues
Pipelines *Pipelines
Repository *Repository
Commits *Commits
Diff *Diff
BranchRestrictions *BranchRestrictions
Webhooks *Webhooks
Downloads *Downloads
DeployKeys *DeployKeys
// contains filtered or unexported fields
}
func (*Repositories) ListForAccount ¶
func (r *Repositories) ListForAccount(ro *RepositoriesOptions) (*RepositoriesRes, error)
func (*Repositories) ListForTeam
deprecated
func (r *Repositories) ListForTeam(ro *RepositoriesOptions) (*RepositoriesRes, error)
Deprecated: Use ListForAccount instead
func (*Repositories) ListProject ¶ added in v0.9.78
func (r *Repositories) ListProject(ro *RepositoriesOptions) (*RepositoriesRes, error)
Return all repositories that belong to a project
func (*Repositories) ListPublic ¶
func (r *Repositories) ListPublic() (*RepositoriesRes, error)
type RepositoriesOptions ¶
type RepositoriesRes ¶ added in v0.5.0
type RepositoriesRes struct {
Page int32
Pagelen int32
Size int32
Items []Repository
}
type Repository ¶
type Repository struct {
Project Project
Uuid string
Name string
Slug string
Full_name string
Description string
Fork_policy string
Language string
Is_private bool
Has_issues bool
Has_wiki bool
Mainbranch RepositoryBranch
Type string
// Deprecated: CreatedOn is deprecated use CreatedOnTime
CreatedOn string `mapstructure:"created_on"`
// Deprecated: UpdatedOn is deprecated use UpdatedOnTime
UpdatedOn string `mapstructure:"updated_on"`
Owner map[string]interface{}
Links map[string]interface{}
Parent *Repository
CreatedOnTime *time.Time `mapstructure:"created_on"`
UpdatedOnTime *time.Time `mapstructure:"updated_on"`
// contains filtered or unexported fields
}
func (*Repository) AddDefaultReviewer ¶ added in v0.9.14
func (r *Repository) AddDefaultReviewer(rdro *RepositoryDefaultReviewerOptions) (*DefaultReviewer, error)
func (*Repository) AddDeploymentVariable ¶ added in v0.9.6
func (r *Repository) AddDeploymentVariable(opt *RepositoryDeploymentVariableOptions) (*DeploymentVariable, error)
func (*Repository) AddEnvironment ¶ added in v0.9.6
func (r *Repository) AddEnvironment(opt *RepositoryEnvironmentOptions) (*Environment, error)
func (*Repository) AddPipelineKeyPair ¶ added in v0.3.1
func (r *Repository) AddPipelineKeyPair(rpkpo *RepositoryPipelineKeyPairOptions) (*PipelineKeyPair, error)
func (*Repository) AddPipelineVariable ¶ added in v0.3.1
func (r *Repository) AddPipelineVariable(rpvo *RepositoryPipelineVariableOptions) (*PipelineVariable, error)
func (*Repository) BranchingModel ¶ added in v0.5.6
func (r *Repository) BranchingModel(rbmo *RepositoryBranchingModelOptions) (*BranchingModel, error)
func (*Repository) Create ¶
func (r *Repository) Create(ro *RepositoryOptions) (*Repository, error)
func (*Repository) CreateBranch ¶ added in v0.9.20
func (r *Repository) CreateBranch(rbo *RepositoryBranchCreationOptions) (*RepositoryBranch, error)
func (*Repository) CreateTag ¶ added in v0.8.0
func (r *Repository) CreateTag(rbo *RepositoryTagCreationOptions) (*RepositoryTag, error)
func (*Repository) Delete ¶
func (r *Repository) Delete(ro *RepositoryOptions) (interface{}, error)
func (*Repository) DeleteBranch ¶ added in v0.9.28
func (r *Repository) DeleteBranch(rbo *RepositoryBranchDeleteOptions) error
func (*Repository) DeleteDefaultReviewer ¶ added in v0.9.14
func (r *Repository) DeleteDefaultReviewer(rdro *RepositoryDefaultReviewerOptions) (interface{}, error)
func (*Repository) DeleteDeploymentVariable ¶ added in v0.9.6
func (r *Repository) DeleteDeploymentVariable(opt *RepositoryDeploymentVariableDeleteOptions) (interface{}, error)
func (*Repository) DeleteEnvironment ¶ added in v0.9.6
func (r *Repository) DeleteEnvironment(opt *RepositoryEnvironmentDeleteOptions) (interface{}, error)
func (*Repository) DeleteGroupPermissions ¶ added in v0.9.50
func (r *Repository) DeleteGroupPermissions(rgo *RepositoryGroupPermissionsOptions) (interface{}, error)
func (*Repository) DeletePipelineKeyPair ¶ added in v0.9.52
func (r *Repository) DeletePipelineKeyPair(rpkpo *RepositoryPipelineKeyPairOptions) (interface{}, error)
func (*Repository) DeletePipelineVariable ¶ added in v0.9.5
func (r *Repository) DeletePipelineVariable(opt *RepositoryPipelineVariableDeleteOptions) (interface{}, error)
func (*Repository) DeleteTag ¶ added in v0.10.0
func (r *Repository) DeleteTag(rbo *RepositoryTagDeleteOptions) error
func (*Repository) DeleteUserPermissions ¶ added in v0.9.50
func (r *Repository) DeleteUserPermissions(rgo *RepositoryUserPermissionsOptions) (interface{}, error)
func (*Repository) Fork ¶ added in v0.6.2
func (r *Repository) Fork(fo *RepositoryForkOptions) (*Repository, error)
func (*Repository) Get ¶
func (r *Repository) Get(ro *RepositoryOptions) (*Repository, error)
func (*Repository) GetBranch ¶ added in v0.6.3
func (r *Repository) GetBranch(rbo *RepositoryBranchOptions) (*RepositoryBranch, error)
func (*Repository) GetDefaultReviewer ¶ added in v0.9.14
func (r *Repository) GetDefaultReviewer(rdro *RepositoryDefaultReviewerOptions) (*DefaultReviewer, error)
func (*Repository) GetEnvironment ¶ added in v0.9.6
func (r *Repository) GetEnvironment(opt *RepositoryEnvironmentOptions) (*Environment, error)
func (*Repository) GetFileBlob ¶ added in v0.5.0
func (r *Repository) GetFileBlob(ro *RepositoryBlobOptions) (*RepositoryBlob, error)
func (*Repository) GetFileContent ¶ added in v0.9.46
func (r *Repository) GetFileContent(ro *RepositoryFilesOptions) ([]byte, error)
func (*Repository) GetGroupPermissions ¶ added in v0.9.50
func (r *Repository) GetGroupPermissions(rgo *RepositoryGroupPermissionsOptions) (*GroupPermission, error)
func (*Repository) GetPipelineConfig ¶ added in v0.9.33
func (r *Repository) GetPipelineConfig(rpo *RepositoryPipelineOptions) (*Pipeline, error)
func (*Repository) GetPipelineKeyPair ¶ added in v0.9.52
func (r *Repository) GetPipelineKeyPair(rpkpo *RepositoryPipelineKeyPairOptions) (*PipelineKeyPair, error)
func (*Repository) GetPipelineVariable ¶ added in v0.9.9
func (r *Repository) GetPipelineVariable(opt *RepositoryPipelineVariableOptions) (*PipelineVariable, error)
func (*Repository) GetUserPermissions ¶ added in v0.9.50
func (r *Repository) GetUserPermissions(rgo *RepositoryUserPermissionsOptions) (*UserPermission, error)
func (*Repository) ListBranches ¶ added in v0.5.0
func (r *Repository) ListBranches(rbo *RepositoryBranchOptions) (*RepositoryBranches, error)
ListBranches gets all branches in the Bitbucket repository and returns them as a RepositoryBranches. You can pass query parameter to filter branches by name.
Bitbucket API docs: https://developer.atlassian.com/cloud/bitbucket/rest/api-group-refs/#api-repositories-workspace-repo-slug-refs-get
func (*Repository) ListDefaultReviewers ¶ added in v0.8.0
func (r *Repository) ListDefaultReviewers(ro *RepositoryOptions) (*DefaultReviewers, error)
func (*Repository) ListDeploymentVariables ¶ added in v0.9.6
func (r *Repository) ListDeploymentVariables(opt *RepositoryDeploymentVariablesOptions) (*DeploymentVariables, error)
func (*Repository) ListEffectiveDefaultReviewers ¶ added in v0.9.63
func (r *Repository) ListEffectiveDefaultReviewers(ro *RepositoryOptions) (*EffectiveDefaultReviewers, error)
func (*Repository) ListEnvironments ¶ added in v0.9.6
func (r *Repository) ListEnvironments(opt *RepositoryEnvironmentsOptions) (*Environments, error)
func (*Repository) ListFiles ¶ added in v0.5.0
func (r *Repository) ListFiles(ro *RepositoryFilesOptions) ([]RepositoryFile, error)
func (*Repository) ListForks ¶
func (r *Repository) ListForks(ro *RepositoryOptions) (interface{}, error)
func (*Repository) ListGroupPermissions ¶ added in v0.9.50
func (r *Repository) ListGroupPermissions(ro *RepositoryOptions) (*GroupPermissions, error)
func (*Repository) ListPipelineVariables ¶ added in v0.9.4
func (r *Repository) ListPipelineVariables(opt *RepositoryPipelineVariablesOptions) (*PipelineVariables, error)
func (*Repository) ListRefs ¶ added in v0.9.24
func (r *Repository) ListRefs(rbo *RepositoryRefOptions) (*RepositoryRefs, error)
ListRefs gets all refs in the Bitbucket repository and returns them as a RepositoryRefs. It takes in a RepositoryRefOptions instance as its only parameter.
func (*Repository) ListTags ¶ added in v0.5.1
func (r *Repository) ListTags(rbo *RepositoryTagOptions) (*RepositoryTags, error)
func (*Repository) ListUserPermissions ¶ added in v0.9.50
func (r *Repository) ListUserPermissions(ro *RepositoryOptions) (*UserPermissions, error)
func (*Repository) ListWatchers ¶
func (r *Repository) ListWatchers(ro *RepositoryOptions) (interface{}, error)
func (*Repository) SetGroupPermissions ¶ added in v0.9.50
func (r *Repository) SetGroupPermissions(rgo *RepositoryGroupPermissionsOptions) (*GroupPermission, error)
func (*Repository) SetUserPermissions ¶ added in v0.9.50
func (r *Repository) SetUserPermissions(rgo *RepositoryUserPermissionsOptions) (*UserPermission, error)
func (*Repository) Update ¶ added in v0.9.12
func (r *Repository) Update(ro *RepositoryOptions) (*Repository, error)
func (*Repository) UpdateDeploymentVariable ¶ added in v0.9.6
func (r *Repository) UpdateDeploymentVariable(opt *RepositoryDeploymentVariableOptions) (*DeploymentVariable, error)
func (*Repository) UpdatePipelineBuildNumber ¶ added in v0.5.3
func (r *Repository) UpdatePipelineBuildNumber(rpbno *RepositoryPipelineBuildNumberOptions) (*PipelineBuildNumber, error)
func (*Repository) UpdatePipelineConfig ¶ added in v0.3.1
func (r *Repository) UpdatePipelineConfig(rpo *RepositoryPipelineOptions) (*Pipeline, error)
func (*Repository) UpdatePipelineVariable ¶ added in v0.9.9
func (r *Repository) UpdatePipelineVariable(opt *RepositoryPipelineVariableOptions) (*PipelineVariable, error)
func (*Repository) WriteFileBlob ¶ added in v0.9.10
func (r *Repository) WriteFileBlob(ro *RepositoryBlobWriteOptions) error
func (*Repository) WriteFileContent ¶ added in v0.10.0
func (r *Repository) WriteFileContent(ro *RepositoryContentWriteOptions) error
WriteFileContent commits one or more files using their raw in-memory content. This avoids the temporary-file dance required by WriteFileBlob and uses the URL-encoded form variant of the source endpoint.
type RepositoryBlob ¶ added in v0.5.0
type RepositoryBlob struct {
Content []byte
}
func (RepositoryBlob) String ¶ added in v0.5.0
func (rb RepositoryBlob) String() string
type RepositoryBlobOptions ¶ added in v0.5.0
type RepositoryBlobWriteOptions ¶ added in v0.9.10
type RepositoryBlobWriteOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
FilePath string `json:"filepath"`
FileName string `json:"filename"`
Files []File `json:"files"`
FilesToDelete []string `json:"files_to_delete"`
Author string `json:"author"`
Message string `json:"message"`
Branch string `json:"branch"`
// contains filtered or unexported fields
}
func (*RepositoryBlobWriteOptions) WithContext ¶ added in v0.9.80
func (ro *RepositoryBlobWriteOptions) WithContext(ctx context.Context) *RepositoryBlobWriteOptions
type RepositoryBranch ¶ added in v0.5.0
type RepositoryBranchCreationOptions ¶ added in v0.9.20
type RepositoryBranchCreationOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Name string `json:"name"`
Target RepositoryBranchTarget `json:"target"`
}
type RepositoryBranchDeleteOptions ¶ added in v0.9.28
type RepositoryBranchOptions ¶ added in v0.5.0
type RepositoryBranchTarget ¶ added in v0.9.20
type RepositoryBranchTarget struct {
Hash string `json:"hash"`
}
type RepositoryBranches ¶ added in v0.5.0
type RepositoryBranchingModelOptions ¶ added in v0.5.6
type RepositoryContentWriteOptions ¶ added in v0.10.0
type RepositoryContentWriteOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
// Files maps the destination path inside the repository to the raw file
// content to upload.
Files map[string]string `json:"files"`
// FilesToDelete lists repo paths to remove in the same commit.
FilesToDelete []string `json:"files_to_delete"`
Author string `json:"author"`
Message string `json:"message"`
Branch string `json:"branch"`
// contains filtered or unexported fields
}
RepositoryContentWriteOptions describes a commit that writes one or more files to a repository using the URL-encoded form variant of the source endpoint. Unlike RepositoryBlobWriteOptions, contents are passed inline so no temporary file on disk is required.
func (*RepositoryContentWriteOptions) WithContext ¶ added in v0.10.0
func (ro *RepositoryContentWriteOptions) WithContext(ctx context.Context) *RepositoryContentWriteOptions
type RepositoryDefaultReviewerOptions ¶ added in v0.9.14
type RepositoryDeploymentVariableDeleteOptions ¶ added in v0.9.6
type RepositoryDeploymentVariableDeleteOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Environment *Environment `json:"environment"`
Uuid string `json:"uuid"`
}
type RepositoryDeploymentVariableOptions ¶ added in v0.9.6
type RepositoryDeploymentVariableOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Environment *Environment `json:"environment"`
Uuid string `json:"uuid"`
Key string `json:"key"`
Value string `json:"value"`
Secured bool `json:"secured"`
// contains filtered or unexported fields
}
func (*RepositoryDeploymentVariableOptions) WithContext ¶ added in v0.9.80
func (rdvo *RepositoryDeploymentVariableOptions) WithContext(ctx context.Context) *RepositoryDeploymentVariableOptions
type RepositoryDeploymentVariablesOptions ¶ added in v0.9.6
type RepositoryEnvironmentDeleteOptions ¶ added in v0.9.6
type RepositoryEnvironmentOptions ¶ added in v0.9.6
type RepositoryEnvironmentOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Uuid string `json:"uuid"`
Name string `json:"name"`
EnvironmentType RepositoryEnvironmentTypeOption `json:"environment_type"`
Rank int `json:"rank"`
// contains filtered or unexported fields
}
func (*RepositoryEnvironmentOptions) WithContext ¶ added in v0.9.80
func (reo *RepositoryEnvironmentOptions) WithContext(ctx context.Context) *RepositoryEnvironmentOptions
type RepositoryEnvironmentTypeOption ¶ added in v0.9.6
type RepositoryEnvironmentTypeOption int
const ( Test RepositoryEnvironmentTypeOption = iota Staging Production )
func (RepositoryEnvironmentTypeOption) String ¶ added in v0.9.6
func (e RepositoryEnvironmentTypeOption) String() string
type RepositoryEnvironmentsOptions ¶ added in v0.9.6
type RepositoryFile ¶ added in v0.5.0
type RepositoryFile struct {
Mimetype string
Links map[string]interface{}
Path string
Commit map[string]interface{}
Attributes []string
Type string
Size int
}
func (RepositoryFile) String ¶ added in v0.5.0
func (rf RepositoryFile) String() string
type RepositoryFilesOptions ¶ added in v0.5.0
type RepositoryForkOptions ¶ added in v0.6.2
type RepositoryForkOptions struct {
FromOwner string `json:"from_owner"`
FromSlug string `json:"from_slug"`
Owner string `json:"owner"`
// TODO: does the API supports specifying slug on forks?
// see: https://developer.atlassian.com/bitbucket/api/2/reference/resource/repositories/%7Bworkspace%7D/%7Brepo_slug%7D/forks#post
Name string `json:"name"`
IsPrivate string `json:"is_private"`
Description string `json:"description"`
ForkPolicy string `json:"fork_policy"`
Language string `json:"language"`
HasIssues string `json:"has_issues"`
HasWiki string `json:"has_wiki"`
Project string `json:"project"`
// contains filtered or unexported fields
}
func (*RepositoryForkOptions) WithContext ¶ added in v0.9.80
func (fo *RepositoryForkOptions) WithContext(ctx context.Context) *RepositoryForkOptions
type RepositoryGroupPermissionsOptions ¶ added in v0.9.50
type RepositoryOptions ¶
type RepositoryOptions struct {
Uuid string `json:"uuid"`
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Scm string `json:"scm"`
// Name string `json:"name"`
IsPrivate string `json:"is_private"`
Description string `json:"description"`
ForkPolicy string `json:"fork_policy"`
Language string `json:"language"`
HasIssues string `json:"has_issues"`
HasWiki string `json:"has_wiki"`
Project string `json:"project"`
// contains filtered or unexported fields
}
func (*RepositoryOptions) WithContext ¶ added in v0.9.80
func (ro *RepositoryOptions) WithContext(ctx context.Context) *RepositoryOptions
type RepositoryPipelineBuildNumberOptions ¶ added in v0.5.3
type RepositoryPipelineKeyPairOptions ¶ added in v0.3.1
type RepositoryPipelineOptions ¶ added in v0.3.1
type RepositoryPipelineVariableDeleteOptions ¶ added in v0.9.5
type RepositoryPipelineVariableOptions ¶ added in v0.3.1
type RepositoryPipelineVariableOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Uuid string `json:"uuid"`
Key string `json:"key"`
Value string `json:"value"`
Secured bool `json:"secured"`
// contains filtered or unexported fields
}
func (*RepositoryPipelineVariableOptions) WithContext ¶ added in v0.9.80
func (rpvo *RepositoryPipelineVariableOptions) WithContext(ctx context.Context) *RepositoryPipelineVariableOptions
type RepositoryPipelineVariablesOptions ¶ added in v0.9.4
type RepositoryRefOptions ¶ added in v0.9.24
type RepositoryRefOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Query string `json:"query"`
Sort string `json:"sort"`
PageNum int `json:"page"`
Pagelen int `json:"pagelen"`
MaxDepth int `json:"max_depth"`
Name string `json:"name"`
BranchFlg bool
}
RepositoryRefOptions represents the options for describing a repository's refs (i.e. tags and branches). The field BranchFlg is a boolean that is indicates whether a specific RepositoryRefOptions instance is meant for Branch specific set of api methods.
type RepositoryRefs ¶ added in v0.9.24
type RepositoryTag ¶ added in v0.5.1
type RepositoryTagCreationOptions ¶ added in v0.8.0
type RepositoryTagCreationOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Name string `json:"name"`
Target RepositoryTagTarget `json:"target"`
}
type RepositoryTagDeleteOptions ¶ added in v0.10.0
type RepositoryTagOptions ¶ added in v0.5.1
type RepositoryTagTarget ¶ added in v0.8.0
type RepositoryTagTarget struct {
Hash string `json:"hash"`
}
type RepositoryTags ¶ added in v0.5.1
type RepositoryUserPermissionsOptions ¶ added in v0.9.50
type SSHKeyOptions ¶ added in v0.9.81
type SSHKeys ¶ added in v0.9.81
type SSHKeys struct {
// contains filtered or unexported fields
}
func (*SSHKeys) Create ¶ added in v0.9.81
func (sk *SSHKeys) Create(ro *SSHKeyOptions) (*SSHKey, error)
func (*SSHKeys) Delete ¶ added in v0.9.81
func (sk *SSHKeys) Delete(ro *SSHKeyOptions) (interface{}, error)
type Teams ¶
type Teams struct {
// contains filtered or unexported fields
}
func (*Teams) Repositories ¶
type UnexpectedResponseStatusError ¶ added in v0.9.37
UnexpectedResponseStatusError represents an unexpected status code returned from the API, along with the body, if it could be read. If the body could not be read, the body contains the error message trying to read it.
func (*UnexpectedResponseStatusError) Error ¶ added in v0.9.37
func (e *UnexpectedResponseStatusError) Error() string
func (*UnexpectedResponseStatusError) ErrorWithBody ¶ added in v0.9.37
func (e *UnexpectedResponseStatusError) ErrorWithBody() error
ErrorWithBody returns an error with the given status and body.
type User ¶
type User struct {
Uuid string
Username string
Nickname string
Website string
AccountId string `mapstructure:"account_id"`
AccountStatus string `mapstructure:"account_status"`
DisplayName string `mapstructure:"display_name"`
CreatedOn string `mapstructure:"created_on"`
Has2faEnabled bool `mapstructure:"has_2fa_enabled"`
Links map[string]interface{}
// contains filtered or unexported fields
}
User is the sub struct of Client Reference: https://developer.atlassian.com/bitbucket/api/2/reference/resource/user
type UserPermission ¶ added in v0.9.50
type UserPermissions ¶ added in v0.9.50
type Users ¶
type Users struct {
SSHKeys *SSHKeys
// contains filtered or unexported fields
}
func (*Users) Repositories ¶
type Webhook ¶ added in v0.9.30
type Webhook struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Uuid string `json:"uuid"`
Secret string `json:"secret"`
Description string `json:"description"`
Url string `json:"url"`
Active bool `json:"active"`
Events []string `json:"events"` // EX: {'repo:push','issue:created',..} REF: https://bit.ly/3FjRHHu
}
type Webhooks ¶
type Webhooks struct {
// contains filtered or unexported fields
}
func (*Webhooks) Delete ¶
func (r *Webhooks) Delete(ro *WebhooksOptions) (interface{}, error)
func (*Webhooks) Gets ¶
func (r *Webhooks) Gets(ro *WebhooksOptions) (interface{}, error)
Deprecate Gets for List call
type WebhooksOptions ¶
type WebhooksOptions struct {
Owner string `json:"owner"`
RepoSlug string `json:"repo_slug"`
Uuid string `json:"uuid"`
Secret string `json:"secret"`
Description string `json:"description"`
Url string `json:"url"`
Active bool `json:"active"`
Events []string `json:"events"` // EX: {'repo:push','issue:created',..} REF: https://bit.ly/3FjRHHu
// contains filtered or unexported fields
}
func (*WebhooksOptions) WithContext ¶ added in v0.9.80
func (wo *WebhooksOptions) WithContext(ctx context.Context) *WebhooksOptions
type Workspace ¶ added in v0.7.0
type Workspace struct {
Repositories *Repositories
Permissions *Permission
UUID string
Type string
Slug string
Is_Private bool
Name string
// contains filtered or unexported fields
}
func (*Workspace) CreateProject ¶ added in v0.9.14
func (t *Workspace) CreateProject(opt *ProjectOptions) (*Project, error)
func (*Workspace) DeleteProject ¶ added in v0.9.14
func (t *Workspace) DeleteProject(opt *ProjectOptions) (interface{}, error)
func (*Workspace) GetProject ¶ added in v0.9.14
func (t *Workspace) GetProject(opt *ProjectOptions) (*Project, error)
func (*Workspace) List ¶ added in v0.7.0
func (t *Workspace) List() (*WorkspaceList, error)
func (*Workspace) Members ¶ added in v0.9.2
func (w *Workspace) Members(teamname string) (*WorkspaceMembers, error)
func (*Workspace) Projects ¶ added in v0.9.2
func (w *Workspace) Projects(teamname string) (*ProjectsRes, error)
func (*Workspace) UpdateProject ¶ added in v0.9.14
func (t *Workspace) UpdateProject(opt *ProjectOptions) (*Project, error)