github.com/kastenhq/syft@v0.0.0-20230821225854-0710af25cdbe/syft/event/event.go (about) 1 /* 2 Package event provides event types for all events that the syft library published onto the event bus. By convention, for each event 3 defined here there should be a corresponding event parser defined in the parsers/ child package. 4 */ 5 package event 6 7 import ( 8 "github.com/wagoodman/go-partybus" 9 10 "github.com/kastenhq/syft/internal" 11 ) 12 13 const ( 14 typePrefix = internal.ApplicationName 15 cliTypePrefix = typePrefix + "-cli" 16 17 // Events from the syft library 18 19 // PackageCatalogerStarted is a partybus event that occurs when the package cataloging has begun 20 PackageCatalogerStarted partybus.EventType = typePrefix + "-package-cataloger-started-event" 21 22 //nolint:gosec 23 // SecretsCatalogerStarted is a partybus event that occurs when the secrets cataloging has begun 24 SecretsCatalogerStarted partybus.EventType = typePrefix + "-secrets-cataloger-started-event" 25 26 // FileMetadataCatalogerStarted is a partybus event that occurs when the file metadata cataloging has begun 27 FileMetadataCatalogerStarted partybus.EventType = typePrefix + "-file-metadata-cataloger-started-event" 28 29 // FileDigestsCatalogerStarted is a partybus event that occurs when the file digests cataloging has begun 30 FileDigestsCatalogerStarted partybus.EventType = typePrefix + "-file-digests-cataloger-started-event" 31 32 // FileIndexingStarted is a partybus event that occurs when the directory resolver begins indexing a filesystem 33 FileIndexingStarted partybus.EventType = typePrefix + "-file-indexing-started-event" 34 35 // AttestationStarted is a partybus event that occurs when starting an SBOM attestation process 36 AttestationStarted partybus.EventType = typePrefix + "-attestation-started-event" 37 38 // CatalogerTaskStarted is a partybus event that occurs when starting a task within a cataloger 39 CatalogerTaskStarted partybus.EventType = typePrefix + "-cataloger-task-started" 40 41 // Events exclusively for the CLI 42 43 // CLIAppUpdateAvailable is a partybus event that occurs when an application update is available 44 CLIAppUpdateAvailable partybus.EventType = cliTypePrefix + "-app-update-available" 45 46 // CLIReport is a partybus event that occurs when an analysis result is ready for final presentation to stdout 47 CLIReport partybus.EventType = cliTypePrefix + "-report" 48 49 // CLINotification is a partybus event that occurs when auxiliary information is ready for presentation to stderr 50 CLINotification partybus.EventType = cliTypePrefix + "-notification" 51 52 // CLIExit is a partybus event that occurs when an analysis result is ready for final presentation 53 CLIExit partybus.EventType = cliTypePrefix + "-exit-event" 54 )