webhook

package
v6.37.0 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2023 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const WhUrl = webhooksUrl + "/{webhookKey}"

Variables

View Source
var DomainEventTypesSupported = map[string][]string{
	"artifact":                   {"deployed", "deleted", "moved", "copied", "cached"},
	"artifact_property":          {"added", "deleted"},
	"docker":                     {"pushed", "deleted", "promoted"},
	"build":                      {"uploaded", "deleted", "promoted"},
	"release_bundle":             {"created", "signed", "deleted"},
	"distribution":               {"distribute_started", "distribute_completed", "distribute_aborted", "distribute_failed", "delete_started", "delete_completed", "delete_failed"},
	"artifactory_release_bundle": {"received", "delete_started", "delete_completed", "delete_failed"},
}
View Source
var TypesSupported = []string{
	"artifact",
	"artifact_property",
	"docker",
	"build",
	"release_bundle",
	"distribution",
	"artifactory_release_bundle",
}

Functions

func ResourceArtifactoryWebhook

func ResourceArtifactoryWebhook(webhookType string) *schema.Resource

func ResourceStateUpgradeV1 added in v6.7.0

func ResourceStateUpgradeV1(_ context.Context, rawState map[string]interface{}, _ interface{}) (map[string]interface{}, error)

ResourceStateUpgradeV1 see the corresponding unit test TestWebhookResourceStateUpgradeV1 for more details on the schema transformation

Types

type BaseParams added in v6.10.0

type BaseParams struct {
	Key         string      `json:"key"`
	Description string      `json:"description"`
	Enabled     bool        `json:"enabled"`
	EventFilter EventFilter `json:"event_filter"`
	Handlers    []Handler   `json:"handlers"`
}

func (BaseParams) Id added in v6.10.0

func (w BaseParams) Id() string

type BaseWebhookCriteria

type BaseWebhookCriteria struct {
	IncludePatterns []string `json:"includePatterns"`
	ExcludePatterns []string `json:"excludePatterns"`
}

type BuildWebhookCriteria

type BuildWebhookCriteria struct {
	BaseWebhookCriteria
	AnyBuild       bool     `json:"anyBuild"`
	SelectedBuilds []string `json:"selectedBuilds"`
}

type CustomHttpHeader added in v6.10.0

type CustomHttpHeader struct {
	Name  string `json:"name"`
	Value string `json:"value"`
}

type EventFilter added in v6.10.0

type EventFilter struct {
	Domain     string      `json:"domain"`
	EventTypes []string    `json:"event_types"`
	Criteria   interface{} `json:"criteria"`
}

type Handler added in v6.10.0

type Handler struct {
	HandlerType       string             `json:"handler_type"`
	Url               string             `json:"url"`
	Secret            string             `json:"secret"`
	Proxy             string             `json:"proxy"`
	CustomHttpHeaders []CustomHttpHeader `json:"custom_http_headers"`
}

type ReleaseBundleWebhookCriteria

type ReleaseBundleWebhookCriteria struct {
	BaseWebhookCriteria
	AnyReleaseBundle              bool     `json:"anyReleaseBundle"`
	RegisteredReleaseBundlesNames []string `json:"registeredReleaseBundlesNames"`
}

type RepoWebhookCriteria

type RepoWebhookCriteria struct {
	BaseWebhookCriteria
	AnyLocal  bool     `json:"anyLocal"`
	AnyRemote bool     `json:"anyRemote"`
	RepoKeys  []string `json:"repoKeys"`
}

Jump to

Keyboard shortcuts

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