bitbucket

package
v0.9.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	AuthTypeAPIToken             = "apiToken"
	AuthTypeWorkspaceAccessToken = "workspaceAccessToken"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bitbucket

type Bitbucket struct{}

func (*Bitbucket) Actions

func (b *Bitbucket) Actions() []core.Action

func (*Bitbucket) Cleanup

func (*Bitbucket) Components

func (b *Bitbucket) Components() []core.Component

func (*Bitbucket) Configuration

func (b *Bitbucket) Configuration() []configuration.Field

func (*Bitbucket) Description

func (b *Bitbucket) Description() string

func (*Bitbucket) HandleAction

func (b *Bitbucket) HandleAction(ctx core.IntegrationActionContext) error

func (*Bitbucket) HandleRequest

func (b *Bitbucket) HandleRequest(ctx core.HTTPRequestContext)

func (*Bitbucket) Icon

func (b *Bitbucket) Icon() string

func (*Bitbucket) Instructions

func (b *Bitbucket) Instructions() string

func (*Bitbucket) Label

func (b *Bitbucket) Label() string

func (*Bitbucket) ListResources

func (b *Bitbucket) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)

func (*Bitbucket) Name

func (b *Bitbucket) Name() string

func (*Bitbucket) Sync

func (b *Bitbucket) Sync(ctx core.SyncContext) error

func (*Bitbucket) Triggers

func (b *Bitbucket) Triggers() []core.Trigger

type BitbucketHookRequest

type BitbucketHookRequest struct {
	Description string   `json:"description"`
	URL         string   `json:"url"`
	Active      bool     `json:"active"`
	Secret      string   `json:"secret,omitempty"`
	Events      []string `json:"events"`
}

type BitbucketHookResponse

type BitbucketHookResponse struct {
	UUID   string `json:"uuid"`
	URL    string `json:"url"`
	Active bool   `json:"active"`
}

type BitbucketWebhook

type BitbucketWebhook struct {
	UUID string `json:"uuid"`
}

type BitbucketWebhookHandler

type BitbucketWebhookHandler struct{}

func (*BitbucketWebhookHandler) Cleanup

func (*BitbucketWebhookHandler) CompareConfig

func (h *BitbucketWebhookHandler) CompareConfig(a, b any) (bool, error)

func (*BitbucketWebhookHandler) Merge

func (h *BitbucketWebhookHandler) Merge(current, requested any) (any, bool, error)

func (*BitbucketWebhookHandler) Setup

type Client

type Client struct {
	AuthType string
	Email    string
	Token    string
	HTTP     core.HTTPContext
}

func NewClient

func NewClient(authType string, httpContext core.HTTPContext, integration core.IntegrationContext) (*Client, error)

func (*Client) CreateWebhook

func (c *Client) CreateWebhook(workspace, repoSlug, webhookURL, secret string, events []string) (*BitbucketHookResponse, error)

func (*Client) DeleteWebhook

func (c *Client) DeleteWebhook(workspace, repoSlug, webhookUID string) error

func (*Client) GetWorkspace

func (c *Client) GetWorkspace(workspaceSlug string) (*Workspace, error)

func (*Client) ListRepositories

func (c *Client) ListRepositories(workspace string) ([]Repository, error)

type Configuration

type Configuration struct {
	Workspace string  `json:"workspace"`
	AuthType  string  `json:"authType"`
	Token     *string `json:"token"`
	Email     *string `json:"email"`
}

type Metadata

type Metadata struct {
	AuthType  string             `json:"authType" mapstructure:"authType"`
	Workspace *WorkspaceMetadata `json:"workspace,omitempty" mapstructure:"workspace,omitempty"`
}

type NodeMetadata

type NodeMetadata struct {
	Repository *RepositoryMetadata `json:"repository" mapstructure:"repository"`
}

type OnPush

type OnPush struct{}

func (*OnPush) Actions

func (p *OnPush) Actions() []core.Action

func (*OnPush) Cleanup

func (p *OnPush) Cleanup(ctx core.TriggerContext) error

func (*OnPush) Color

func (p *OnPush) Color() string

func (*OnPush) Configuration

func (p *OnPush) Configuration() []configuration.Field

func (*OnPush) Description

func (p *OnPush) Description() string

func (*OnPush) Documentation

func (p *OnPush) Documentation() string

func (*OnPush) ExampleData

func (t *OnPush) ExampleData() map[string]any

func (*OnPush) HandleAction

func (p *OnPush) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)

func (*OnPush) HandleWebhook

func (p *OnPush) HandleWebhook(ctx core.WebhookRequestContext) (int, error)

func (*OnPush) Icon

func (p *OnPush) Icon() string

func (*OnPush) Label

func (p *OnPush) Label() string

func (*OnPush) Name

func (p *OnPush) Name() string

func (*OnPush) Setup

func (p *OnPush) Setup(ctx core.TriggerContext) error

type OnPushConfiguration

type OnPushConfiguration struct {
	Repository string                    `json:"repository" mapstructure:"repository"`
	Refs       []configuration.Predicate `json:"refs" mapstructure:"refs"`
}

type Repository

type Repository struct {
	UUID     string         `json:"uuid" mapstructure:"uuid"`
	Name     string         `json:"name" mapstructure:"name"`
	FullName string         `json:"full_name" mapstructure:"full_name"`
	Slug     string         `json:"slug" mapstructure:"slug"`
	Links    RepositoryLink `json:"links" mapstructure:"links"`
}
type RepositoryLink struct {
	HTML struct {
		Href string `json:"href" mapstructure:"href"`
	} `json:"html" mapstructure:"html"`
}

type RepositoryMetadata

type RepositoryMetadata struct {
	UUID     string `json:"uuid" mapstructure:"uuid"`
	Name     string `json:"name" mapstructure:"name"`
	FullName string `json:"full_name" mapstructure:"full_name"`
	Slug     string `json:"slug" mapstructure:"slug"`
}

type RepositoryResponse

type RepositoryResponse struct {
	Values []Repository `json:"values"`
	Next   string       `json:"next"`
}

type WebhookConfiguration

type WebhookConfiguration struct {
	EventTypes     []string `json:"eventTypes"`
	RepositorySlug string   `json:"repositorySlug"`
}

type Workspace

type Workspace struct {
	UUID string `json:"uuid" mapstructure:"uuid"`
	Name string `json:"name" mapstructure:"name"`
	Slug string `json:"slug" mapstructure:"slug"`
}

type WorkspaceMetadata

type WorkspaceMetadata struct {
	UUID string `json:"uuid" mapstructure:"uuid"`
	Name string `json:"name" mapstructure:"name"`
	Slug string `json:"slug" mapstructure:"slug"`
}

Jump to

Keyboard shortcuts

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