Documentation
¶
Index ¶
- func NewWebhookClient(url string, secret *string) *webhookClient
- type TestPayloadType
- type WebhookIntegration
- func (w *WebhookIntegration) CreateIssue(ctx context.Context, asset models.Asset, assetVersionName string, ...) error
- func (w *WebhookIntegration) CreateLabels(ctx context.Context, asset models.Asset) error
- func (w *WebhookIntegration) Delete(ctx core.Context) error
- func (w *WebhookIntegration) GetID() core.IntegrationID
- func (w *WebhookIntegration) GetRoleInGroup(ctx context.Context, userID string, providerID string, groupID string) (string, error)
- func (w *WebhookIntegration) GetRoleInProject(ctx context.Context, userID string, providerID string, projectID string) (string, error)
- func (w *WebhookIntegration) GetUsers(org models.Org) []core.User
- func (w *WebhookIntegration) HandleEvent(event any) error
- func (w *WebhookIntegration) HandleWebhook(ctx core.Context) error
- func (w *WebhookIntegration) HasAccessToExternalEntityProvider(ctx core.Context, externalEntityProviderID string) (bool, error)
- func (w *WebhookIntegration) ListGroups(ctx context.Context, userID string, providerID string) ([]models.Project, []core.Role, error)
- func (w *WebhookIntegration) ListOrgs(ctx core.Context) ([]models.Org, error)
- func (w *WebhookIntegration) ListProjects(ctx context.Context, userID string, providerID string, groupID string) ([]models.Asset, []core.Role, error)
- func (w *WebhookIntegration) ListRepositories(ctx core.Context) ([]core.Repository, error)
- func (w *WebhookIntegration) Save(ctx core.Context) error
- func (w *WebhookIntegration) Test(ctx core.Context) error
- func (w *WebhookIntegration) Update(ctx core.Context) error
- func (w *WebhookIntegration) UpdateIssue(ctx context.Context, asset models.Asset, assetVersionSlug string, ...) error
- func (w *WebhookIntegration) WantsToHandleWebhook(ctx core.Context) bool
- type WebhookStruct
- type WebhookType
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewWebhookClient ¶
Types ¶
type TestPayloadType ¶
type TestPayloadType string
const ( TestPayloadTypeEmpty TestPayloadType = "empty" TestPayloadTypeSampleSBOM TestPayloadType = "sampleSbom" TestPayloadTypeSampleDependencyVulns TestPayloadType = "sampleDependencyVulns" TestPayloadTypeSampleFirstPartyVulns TestPayloadType = "sampleFirstPartyVulns" )
type WebhookIntegration ¶
type WebhookIntegration struct {
// contains filtered or unexported fields
}
func NewWebhookIntegration ¶
func NewWebhookIntegration(db core.DB) *WebhookIntegration
func (*WebhookIntegration) CreateIssue ¶
func (*WebhookIntegration) CreateLabels ¶ added in v0.17.3
func (*WebhookIntegration) GetID ¶
func (w *WebhookIntegration) GetID() core.IntegrationID
func (*WebhookIntegration) GetRoleInGroup ¶
func (*WebhookIntegration) GetRoleInProject ¶
func (*WebhookIntegration) GetUsers ¶
func (w *WebhookIntegration) GetUsers(org models.Org) []core.User
func (*WebhookIntegration) HandleEvent ¶
func (w *WebhookIntegration) HandleEvent(event any) error
func (*WebhookIntegration) HandleWebhook ¶
func (w *WebhookIntegration) HandleWebhook(ctx core.Context) error
func (*WebhookIntegration) HasAccessToExternalEntityProvider ¶
func (*WebhookIntegration) ListGroups ¶
func (*WebhookIntegration) ListProjects ¶
func (*WebhookIntegration) ListRepositories ¶
func (w *WebhookIntegration) ListRepositories(ctx core.Context) ([]core.Repository, error)
func (*WebhookIntegration) UpdateIssue ¶
func (*WebhookIntegration) WantsToHandleWebhook ¶
func (w *WebhookIntegration) WantsToHandleWebhook(ctx core.Context) bool
type WebhookStruct ¶
type WebhookStruct struct { Organization core.OrgObject `json:"organization"` Project core.ProjectObject `json:"project"` Asset core.AssetObject `json:"asset"` AssetVersion core.AssetVersionObject `json:"assetVersion"` Payload any `json:"payload"` Type WebhookType `json:"type"` Artifact core.ArtifactObject `json:"artifact,omitempty"` }
type WebhookType ¶
type WebhookType string
const ( WebhookTypeSBOM WebhookType = "sbom" WebhookTypeFirstPartyVulnerabilities WebhookType = "firstPartyVulnerabilities" WebhookTypeDependencyVulnerabilities WebhookType = "dependencyVulnerabilities" WebhookTypeTest WebhookType = "test" )
Click to show internal directories.
Click to hide internal directories.