event

package
v0.0.0-...-9345fe3 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: Apache-2.0 Imports: 9 Imported by: 2

Documentation

Index

Constants

View Source
const (
	TopicCreateProject     = "CREATE_PROJECT"
	TopicDeleteProject     = "DELETE_PROJECT"
	TopicPushArtifact      = "PUSH_ARTIFACT"
	TopicPullArtifact      = "PULL_ARTIFACT"
	TopicDeleteArtifact    = "DELETE_ARTIFACT"
	TopicDeleteRepository  = "DELETE_REPOSITORY"
	TopicCreateTag         = "CREATE_TAG"
	TopicDeleteTag         = "DELETE_TAG"
	TopicScanningFailed    = "SCANNING_FAILED"
	TopicScanningStopped   = "SCANNING_STOPPED"
	TopicScanningCompleted = "SCANNING_COMPLETED"
	// QuotaExceedTopic is topic for quota warning event, the usage reaches the warning bar of limitation, like 85%
	TopicQuotaWarning    = "QUOTA_WARNING"
	TopicQuotaExceed     = "QUOTA_EXCEED"
	TopicReplication     = "REPLICATION"
	TopicArtifactLabeled = "ARTIFACT_LABELED"
	TopicTagRetention    = "TAG_RETENTION"
	TopicCreateRobot     = "CREATE_ROBOT"
	TopicDeleteRobot     = "DELETE_ROBOT"
)

const definition

Variables

This section is empty.

Functions

This section is empty.

Types

type ArtifactEvent

type ArtifactEvent struct {
	EventType  string
	Repository string
	Artifact   *artifact.Artifact
	Tags       []string // when the artifact is pushed by digest, the tag here will be null
	Operator   string
	OccurAt    time.Time
}

ArtifactEvent is the pushing/pulling artifact event

func (*ArtifactEvent) String

func (a *ArtifactEvent) String() string

type ArtifactLabeledEvent

type ArtifactLabeledEvent struct {
	ArtifactID int64
	LabelID    int64
	OccurAt    time.Time
	Operator   string
}

ArtifactLabeledEvent is event data of artifact labeled

func (*ArtifactLabeledEvent) String

func (al *ArtifactLabeledEvent) String() string

type CreateProjectEvent

type CreateProjectEvent struct {
	EventType string
	ProjectID int64
	Project   string
	Operator  string
	OccurAt   time.Time
}

CreateProjectEvent is the creating project event

func (*CreateProjectEvent) ResolveToAuditLog

func (c *CreateProjectEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*CreateProjectEvent) String

func (c *CreateProjectEvent) String() string

type CreateRobotEvent

type CreateRobotEvent struct {
	EventType string
	Robot     *robotModel.Robot
	Operator  string
	OccurAt   time.Time
}

CreateRobotEvent is the creating robot event

func (*CreateRobotEvent) ResolveToAuditLog

func (c *CreateRobotEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*CreateRobotEvent) String

func (c *CreateRobotEvent) String() string

type CreateTagEvent

type CreateTagEvent struct {
	EventType        string
	Repository       string
	Tag              string
	AttachedArtifact *artifact.Artifact
	Operator         string
	OccurAt          time.Time
}

CreateTagEvent is the creating tag event

func (*CreateTagEvent) ResolveToAuditLog

func (c *CreateTagEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*CreateTagEvent) String

func (c *CreateTagEvent) String() string

type DeleteArtifactEvent

type DeleteArtifactEvent struct {
	*ArtifactEvent
}

DeleteArtifactEvent is the deleting artifact event

func (*DeleteArtifactEvent) ResolveToAuditLog

func (d *DeleteArtifactEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*DeleteArtifactEvent) String

func (d *DeleteArtifactEvent) String() string

type DeleteProjectEvent

type DeleteProjectEvent struct {
	EventType string
	ProjectID int64
	Project   string
	Operator  string
	OccurAt   time.Time
}

DeleteProjectEvent is the deleting project event

func (*DeleteProjectEvent) ResolveToAuditLog

func (d *DeleteProjectEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*DeleteProjectEvent) String

func (d *DeleteProjectEvent) String() string

type DeleteRepositoryEvent

type DeleteRepositoryEvent struct {
	EventType  string
	ProjectID  int64
	Repository string
	Operator   string
	OccurAt    time.Time
}

DeleteRepositoryEvent is the deleting repository event

func (*DeleteRepositoryEvent) ResolveToAuditLog

func (d *DeleteRepositoryEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*DeleteRepositoryEvent) String

func (d *DeleteRepositoryEvent) String() string

type DeleteRobotEvent

type DeleteRobotEvent struct {
	EventType string
	Robot     *robotModel.Robot
	Operator  string
	OccurAt   time.Time
}

DeleteRobotEvent is the deleting robot event

func (*DeleteRobotEvent) ResolveToAuditLog

func (c *DeleteRobotEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*DeleteRobotEvent) String

func (c *DeleteRobotEvent) String() string

type DeleteTagEvent

type DeleteTagEvent struct {
	EventType        string
	Repository       string
	Tag              string
	AttachedArtifact *artifact.Artifact
	Operator         string
	OccurAt          time.Time
}

DeleteTagEvent is the deleting tag event

func (*DeleteTagEvent) ResolveToAuditLog

func (d *DeleteTagEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*DeleteTagEvent) String

func (d *DeleteTagEvent) String() string

type ImgResource

type ImgResource struct {
	Digest string
	Tag    string
}

ImgResource include image digest and tag

type PullArtifactEvent

type PullArtifactEvent struct {
	*ArtifactEvent
}

PullArtifactEvent is the pulling artifact event

func (*PullArtifactEvent) ResolveToAuditLog

func (p *PullArtifactEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*PullArtifactEvent) String

func (p *PullArtifactEvent) String() string

type PushArtifactEvent

type PushArtifactEvent struct {
	*ArtifactEvent
}

PushArtifactEvent is the pushing artifact event

func (*PushArtifactEvent) ResolveToAuditLog

func (p *PushArtifactEvent) ResolveToAuditLog() (*model.AuditLog, error)

ResolveToAuditLog ...

func (*PushArtifactEvent) String

func (p *PushArtifactEvent) String() string

type QuotaEvent

type QuotaEvent struct {
	EventType string
	Project   *proModels.Project
	Resource  *ImgResource
	OccurAt   time.Time
	RepoName  string
	Msg       string
	Operator  string
}

QuotaEvent is project quota related event data to publish

func (*QuotaEvent) String

func (q *QuotaEvent) String() string

type ReplicationEvent

type ReplicationEvent struct {
	EventType         string
	ReplicationTaskID int64
	OccurAt           time.Time
	Status            string
}

ReplicationEvent is replication related event data to publish

func (*ReplicationEvent) String

func (r *ReplicationEvent) String() string

type RetentionEvent

type RetentionEvent struct {
	TaskID    int64
	EventType string
	OccurAt   time.Time
	Status    string
	Deleted   []*selector.Result
	Total     int
	Retained  int
}

RetentionEvent is tag retention related event data to publish

func (*RetentionEvent) String

func (r *RetentionEvent) String() string

type ScanImageEvent

type ScanImageEvent struct {
	EventType string
	ScanType  string
	Artifact  *v1.Artifact
	OccurAt   time.Time
	Operator  string
}

ScanImageEvent is scanning image related event data to publish

func (*ScanImageEvent) String

func (s *ScanImageEvent) String() string

Jump to

Keyboard shortcuts

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