webhook

package
v0.0.0-...-431a833 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2024 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RegisterRouter

func RegisterRouter(e *gin.Engine)

Types

type ArtifactEvent

type ArtifactEvent struct {
	MetadataInfo `json:",inline"`
	EventData    ArtifactEventData `json:"event_data"`
}

ArtifactEvent 结构体

type ArtifactEventData

type ArtifactEventData struct {
	Resources  []ArtifactResources `json:"resources"`
	Repository ArtifactRepository  `json:"repository"`
}

ArtifactEventData represents the data part of the event

type ArtifactRepository

type ArtifactRepository struct {
	DateCreated  int64  `json:"date_created"`
	Name         string `json:"name"`
	Namespace    string `json:"namespace"`
	RepoFullName string `json:"repo_full_name"`
	RepoType     string `json:"repo_type"`
}

ArtifactRepository contains repository details

type ArtifactResources

type ArtifactResources struct {
	Digest      string `json:"digest"`
	Tag         string `json:"tag"`
	ResourceURL string `json:"resource_url"`
}

ArtifactResources represents the details of the resources involved in the event

type CustomAttributes

type CustomAttributes struct {
	Details string `json:"Details"`
}

CustomAttributes contains additional details related to the event

type MetadataInfo

type MetadataInfo struct {
	Type     string `json:"type"`
	OccurAt  int64  `json:"occur_at"`
	Operator string `json:"operator"`
}

type QuotaEvent

type QuotaEvent struct {
	MetadataInfo `json:",inline"`
	EventData    QuotaEventData `json:"event_data"`
}

QuotaEvent 结构体

type QuotaEventData

type QuotaEventData struct {
	Resources        []QuotaResource  `json:"resources"`
	Repository       QuotaRepository  `json:"repository"`
	CustomAttributes CustomAttributes `json:"custom_attributes"`
}

type QuotaRepository

type QuotaRepository struct {
	Name         string `json:"name"`
	Namespace    string `json:"namespace"`
	RepoFullName string `json:"repo_full_name"`
	RepoType     string `json:"repo_type"`
}

QuotaRepository contains repository details

type QuotaResource

type QuotaResource struct {
	Digest string `json:"digest"`
}

QuotaResource represents the details of the resources involved in the event

type ReplicationArtifact

type ReplicationArtifact struct {
	Type    string `json:"type"`
	Status  string `json:"status"`
	NameTag string `json:"name_tag"`
}

ReplicationArtifact represents a successfully replicated artifact

type ReplicationData

type ReplicationData struct {
	HarborHostname      string                `json:"harbor_hostname"`
	JobStatus           string                `json:"job_status"`
	ArtifactType        string                `json:"artifact_type"`
	OverrideMode        bool                  `json:"override_mode"`
	TriggerType         string                `json:"trigger_type"`
	PolicyCreator       string                `json:"policy_creator"`
	ExecutionTimestamp  int64                 `json:"execution_timestamp"`
	SrcResource         ReplicationResource   `json:"src_resource"`
	DestResource        ReplicationResource   `json:"dest_resource"`
	SuccessfulArtifacts []ReplicationArtifact `json:"successful_artifact"`
}

ReplicationData represents the replication details in the event

type ReplicationEvent

type ReplicationEvent struct {
	MetadataInfo `json:",inline"`
	EventData    ReplicationEventData `json:"event_data"`
}

ReplicationEvent 结构体

type ReplicationEventData

type ReplicationEventData struct {
	Replication ReplicationData `json:"replication"`
}

type ReplicationResource

type ReplicationResource struct {
	RegistryName string `json:"registry_name,omitempty"`
	RegistryType string `json:"registry_type"`
	Endpoint     string `json:"endpoint"`
	Namespace    string `json:"namespace"`
}

ReplicationResource represents a source or destination resource in the replication event

type RetentionData

type RetentionData struct {
	Total             int                `json:"total"`
	Retained          int                `json:"retained"`
	HarborHostname    string             `json:"harbor_hostname"`
	ProjectName       string             `json:"project_name"`
	RetentionPolicyID int                `json:"retention_policy_id"`
	RetentionRule     []TagRetentionRule `json:"retention_rule"`
	Result            string             `json:"result"`
	DeletedArtifacts  []TagArtifact      `json:"deleted_artifact"`
}

RetentionData represents the tag retention details in the event

type ScanningEvent

type ScanningEvent struct {
	MetadataInfo `json:",inline"`
	EventData    ScanningEventData `json:"event_data"`
}

ScanningEvent 结构体

type ScanningEventData

type ScanningEventData struct {
	Resources  []ScanningResource `json:"resources"`
	Repository ScanningRepository `json:"repository"`
}

type ScanningReport

type ScanningReport struct {
	ReportID        string          `json:"report_id"`
	ScanStatus      string          `json:"scan_status"`
	Severity        string          `json:"severity"`
	Duration        int             `json:"duration"`
	Summary         ScanningSummary `json:"summary"`
	StartTime       time.Time       `json:"start_time"`
	EndTime         time.Time       `json:"end_time"`
	Scanner         ScanningScanner `json:"scanner"`
	CompletePercent int             `json:"complete_percent"`
}

type ScanningRepository

type ScanningRepository struct {
	Name         string `json:"name"`
	Namespace    string `json:"namespace"`
	RepoFullName string `json:"repo_full_name"`
	RepoType     string `json:"repo_type"`
}

type ScanningResource

type ScanningResource struct {
	Digest       string                    `json:"digest"`
	ResourceURL  string                    `json:"resource_url"`
	ScanOverview map[string]ScanningReport `json:"scan_overview"`
}

type ScanningScanner

type ScanningScanner struct {
	Name    string `json:"name"`
	Vendor  string `json:"vendor"`
	Version string `json:"version"`
}

type ScanningSummary

type ScanningSummary struct {
	Total   int            `json:"total"`
	Fixable int            `json:"fixable"`
	Details map[string]int `json:"summary"`
}

type ScopeSelector

type ScopeSelector struct {
	Repository []TagRepositorySelector `json:"repository"`
}

ScopeSelector represents the repository selection criteria in the retention rule

type TagArtifact

type TagArtifact struct {
	Type    string `json:"type"`
	Status  string `json:"status"`
	NameTag string `json:"name_tag"`
}

TagArtifact represents a deleted artifact during tag retention

type TagEvent

type TagEvent struct {
	MetadataInfo `json:",inline"`
	EventData    TagEventData `json:"event_data"`
}

TagEvent 结构体

type TagEventData

type TagEventData struct {
	Retention RetentionData `json:"retention"`
}

type TagRepositorySelector

type TagRepositorySelector struct {
	Kind       string `json:"kind"`
	Decoration string `json:"decoration"`
	Pattern    string `json:"pattern"`
	Extras     string `json:"extras"`
}

TagRepositorySelector represents the details of repository selection

type TagRetentionRule

type TagRetentionRule struct {
	Template       string        `json:"template"`
	TagSelectors   []TagSelector `json:"tag_selectors"`
	ScopeSelectors ScopeSelector `json:"scope_selectors"`
}

TagRetentionRule represents a retention rule for tag retention

type TagSelector

type TagSelector struct {
	Kind       string `json:"kind"`
	Decoration string `json:"decoration"`
	Pattern    string `json:"pattern"`
	Extras     string `json:"extras"`
}

TagSelector represents the tag selection criteria in the retention rule

Jump to

Keyboard shortcuts

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