webhook

package
v11.6.0 Latest Latest
Warning

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

Go to latest
Published: Aug 12, 2024 License: Apache-2.0 Imports: 16 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"},
	"destination":                 {"received", "delete_started", "delete_completed", "delete_failed"},
	"user":                        {"locked"},
	"release_bundle_v2":           {"release_bundle_v2_started", "release_bundle_v2_failed", "release_bundle_v2_completed"},
	"release_bundle_v2_promotion": {"release_bundle_v2_promotion_completed", "release_bundle_v2_promotion_failed", "release_bundle_v2_promotion_started"},
	"artifact_lifecycle":          {"archive", "restore"},
}
View Source
var TypesSupported = []string{
	"artifact",
	"artifact_property",
	"docker",
	"build",
	"release_bundle",
	"distribution",
	"artifactory_release_bundle",
	"destination",
	"user",
	"release_bundle_v2",
	"release_bundle_v2_promotion",
	"artifact_lifecycle",
}

Functions

func ResourceArtifactoryCustomWebhook

func ResourceArtifactoryCustomWebhook(webhookType string) *schema.Resource

func ResourceArtifactoryWebhook

func ResourceArtifactoryWebhook(webhookType string) *schema.Resource

func ResourceStateUpgradeV1

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

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

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 CustomBaseParams

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

func (CustomBaseParams) Id

func (w CustomBaseParams) Id() string

type CustomHandler

type CustomHandler struct {
	HandlerType string         `json:"handler_type"`
	Url         string         `json:"url"`
	Secrets     []KeyValuePair `json:"secrets"`
	Proxy       string         `json:"proxy"`
	HttpHeaders []KeyValuePair `json:"http_headers"`
	Payload     string         `json:"payload,omitempty"`
}

type EmptyWebhookCriteria added in v11.2.0

type EmptyWebhookCriteria struct{}

type EventFilter

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

type Handler

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

type KeyValuePair

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

type ReleaseBundleV2PromotionWebhookCriteria added in v11.2.0

type ReleaseBundleV2PromotionWebhookCriteria struct {
	SelectedEnvironments []string `json:"selectedEnvironments"`
}

type ReleaseBundleV2WebhookCriteria added in v11.2.0

type ReleaseBundleV2WebhookCriteria struct {
	BaseWebhookCriteria
	AnyReleaseBundle       bool     `json:"anyReleaseBundle"`
	SelectedReleaseBundles []string `json:"selectedReleaseBundles"`
}

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"`
	AnyFederated bool     `json:"anyFederated"`
	RepoKeys     []string `json:"repoKeys"`
}

type SecretName

type SecretName struct {
	Name string `json:"name"`
}

Jump to

Keyboard shortcuts

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