webhook

package
v10.8.4 Latest Latest
Warning

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

Go to latest
Published: Jun 5, 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"},
}
View Source
var TypesSupported = []string{
	"artifact",
	"artifact_property",
	"docker",
	"build",
	"release_bundle",
	"distribution",
	"artifactory_release_bundle",
}

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 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 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