Documentation
¶
Index ¶
- Constants
- type Bitbucket
- func (b *Bitbucket) Actions() []core.Action
- func (b *Bitbucket) Cleanup(ctx core.IntegrationCleanupContext) error
- func (b *Bitbucket) Components() []core.Component
- func (b *Bitbucket) Configuration() []configuration.Field
- func (b *Bitbucket) Description() string
- func (b *Bitbucket) HandleAction(ctx core.IntegrationActionContext) error
- func (b *Bitbucket) HandleRequest(ctx core.HTTPRequestContext)
- func (b *Bitbucket) Icon() string
- func (b *Bitbucket) Instructions() string
- func (b *Bitbucket) Label() string
- func (b *Bitbucket) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
- func (b *Bitbucket) Name() string
- func (b *Bitbucket) Sync(ctx core.SyncContext) error
- func (b *Bitbucket) Triggers() []core.Trigger
- type BitbucketHookRequest
- type BitbucketHookResponse
- type BitbucketWebhook
- type BitbucketWebhookHandler
- func (h *BitbucketWebhookHandler) Cleanup(ctx core.WebhookHandlerContext) error
- func (h *BitbucketWebhookHandler) CompareConfig(a, b any) (bool, error)
- func (h *BitbucketWebhookHandler) Merge(current, requested any) (any, bool, error)
- func (h *BitbucketWebhookHandler) Setup(ctx core.WebhookHandlerContext) (any, error)
- type Client
- func (c *Client) CreateWebhook(workspace, repoSlug, webhookURL, secret string, events []string) (*BitbucketHookResponse, error)
- func (c *Client) DeleteWebhook(workspace, repoSlug, webhookUID string) error
- func (c *Client) GetWorkspace(workspaceSlug string) (*Workspace, error)
- func (c *Client) ListRepositories(workspace string) ([]Repository, error)
- type Configuration
- type Metadata
- type NodeMetadata
- type OnPush
- func (p *OnPush) Actions() []core.Action
- func (p *OnPush) Cleanup(ctx core.TriggerContext) error
- func (p *OnPush) Color() string
- func (p *OnPush) Configuration() []configuration.Field
- func (p *OnPush) Description() string
- func (p *OnPush) Documentation() string
- func (t *OnPush) ExampleData() map[string]any
- func (p *OnPush) HandleAction(ctx core.TriggerActionContext) (map[string]any, error)
- func (p *OnPush) HandleWebhook(ctx core.WebhookRequestContext) (int, error)
- func (p *OnPush) Icon() string
- func (p *OnPush) Label() string
- func (p *OnPush) Name() string
- func (p *OnPush) Setup(ctx core.TriggerContext) error
- type OnPushConfiguration
- type Repository
- type RepositoryLink
- type RepositoryMetadata
- type RepositoryResponse
- type WebhookConfiguration
- type Workspace
- type WorkspaceMetadata
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) Components ¶
func (*Bitbucket) Configuration ¶
func (b *Bitbucket) Configuration() []configuration.Field
func (*Bitbucket) Description ¶
func (*Bitbucket) HandleAction ¶
func (b *Bitbucket) HandleAction(ctx core.IntegrationActionContext) error
func (*Bitbucket) HandleRequest ¶
func (b *Bitbucket) HandleRequest(ctx core.HTTPRequestContext)
func (*Bitbucket) Instructions ¶
func (*Bitbucket) ListResources ¶
func (b *Bitbucket) ListResources(resourceType string, ctx core.ListResourcesContext) ([]core.IntegrationResource, error)
type BitbucketHookRequest ¶
type BitbucketHookResponse ¶
type BitbucketWebhook ¶
type BitbucketWebhook struct {
UUID string `json:"uuid"`
}
type BitbucketWebhookHandler ¶
type BitbucketWebhookHandler struct{}
func (*BitbucketWebhookHandler) Cleanup ¶
func (h *BitbucketWebhookHandler) Cleanup(ctx core.WebhookHandlerContext) error
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 ¶
func (h *BitbucketWebhookHandler) Setup(ctx core.WebhookHandlerContext) (any, error)
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 (*Client) GetWorkspace ¶
func (*Client) ListRepositories ¶
func (c *Client) ListRepositories(workspace string) ([]Repository, error)
type Configuration ¶
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) Configuration ¶
func (p *OnPush) Configuration() []configuration.Field
func (*OnPush) Description ¶
func (*OnPush) Documentation ¶
func (*OnPush) ExampleData ¶
func (*OnPush) HandleAction ¶
func (*OnPush) HandleWebhook ¶
func (p *OnPush) HandleWebhook(ctx core.WebhookRequestContext) (int, 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 ¶
type RepositoryLink struct {
HTML struct {
Href string `json:"href" mapstructure:"href"`
} `json:"html" mapstructure:"html"`
}
type RepositoryMetadata ¶
type RepositoryResponse ¶
type RepositoryResponse struct {
Values []Repository `json:"values"`
Next string `json:"next"`
}
type WebhookConfiguration ¶
type WorkspaceMetadata ¶
Click to show internal directories.
Click to hide internal directories.