github.com/anchore/syft@v1.38.2/syft/event/monitor/generic_task.go (about)

     1  package monitor
     2  
     3  import (
     4  	"io"
     5  
     6  	"github.com/wagoodman/go-progress"
     7  )
     8  
     9  const (
    10  	TopLevelCatalogingTaskID = "cataloging"
    11  	PackageCatalogingTaskID  = "package-cataloging"
    12  )
    13  
    14  type ShellProgress struct {
    15  	io.Reader
    16  	progress.Progressable
    17  }
    18  
    19  type Title struct {
    20  	Default      string
    21  	WhileRunning string
    22  	OnSuccess    string
    23  }
    24  
    25  type GenericTask struct {
    26  
    27  	// required fields
    28  
    29  	Title Title
    30  
    31  	// optional format fields
    32  
    33  	HideOnSuccess      bool
    34  	HideStageOnSuccess bool
    35  
    36  	// optional fields
    37  
    38  	ID       string
    39  	ParentID string
    40  	Context  string
    41  }
    42  
    43  type TaskProgress struct {
    44  	*progress.AtomicStage
    45  	*progress.Manual
    46  }