Documentation ¶
Index ¶
- func AddCatalog(name string, url string)
- func LoadSources() map[string]*Source
- func RemoveCatalog(name string)
- func SaveToFile(registry *Config, file string) error
- func UpdateAllCatalogs()
- func UpdateCatalog(name string, source *Source)
- type Action
- type ActionAccess
- type ActionScope
- type ActionType
- type Config
- type ContainerAction
- type ContainerImage
- type ContainerMount
- type EnvAccess
- type ImageCache
- type ImageCerts
- type ImageSource
- type ProvidedBinary
- type Security
- type Source
- type Workflow
- type WorkflowAction
- type WorkflowExpressionType
- type WorkflowRule
- type WorkflowStage
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddCatalog ¶
func LoadSources ¶
func RemoveCatalog ¶
func RemoveCatalog(name string)
func SaveToFile ¶
func UpdateAllCatalogs ¶
func UpdateAllCatalogs()
func UpdateCatalog ¶
Types ¶
type Action ¶
type Action struct { Repository string `yaml:"repository,omitempty"` Name string `required:"true" yaml:"name"` Category string `yaml:"category,omitempty"` Enabled bool `default:"true" yaml:"enabled,omitempty"` Type ActionType `required:"true" yaml:"type"` Container ContainerAction `yaml:"container,omitempty"` // Container contains the configuration for containerized actions Description string `yaml:"description,omitempty"` Version string `yaml:"version,omitempty"` Scope ActionScope `required:"true" yaml:"scope"` Rules []WorkflowRule `yaml:"rules,omitempty"` Access ActionAccess `yaml:"access,omitempty"` }
type ActionAccess ¶
type ActionAccess struct {
Env []EnvAccess `yaml:"env"`
}
type ActionScope ¶
type ActionScope string
const ( ActionScopeProject ActionScope = "project" ActionScopeModule ActionScope = "module" )
type ActionType ¶
type ActionType string
const ( ActionTypeContainer ActionType = "container" ActionTypeGitHubAction ActionType = "githubaction" )
type Config ¶
type Config struct { // Actions Actions []Action `yaml:"actions,omitempty"` // ContainerImages ContainerImages []ContainerImage `yaml:"images,omitempty"` // Workflows Workflows []Workflow `yaml:"workflows,omitempty"` }
Config is a registry configuration with placeholders
func LoadCatalogs ¶
func LoadFromDirectory ¶
func LoadFromFile ¶
func ProcessCatalog ¶
func (*Config) FindAction ¶
FindAction finds an action by id
func (*Config) FindWorkflow ¶
FindWorkflow finds a workflow by name
type ContainerAction ¶
type ContainerAction struct { Image string `yaml:"image"` // Image is the full image reference including the registry Command string `yaml:"command"` // Command is the command that should be executed in the container image to start the action. Certs []ImageCerts `yaml:"certs,omitempty"` }
type ContainerImage ¶
type ContainerImage struct { Repository string `yaml:"repository,omitempty"` Image string `yaml:"image"` Digest string `yaml:"digest,omitempty"` Provides []ProvidedBinary `yaml:"provides"` Cache []ImageCache `yaml:"cache,omitempty"` Security Security `yaml:"security,omitempty"` User string `yaml:"user,omitempty"` Entrypoint *string `yaml:"entrypoint,omitempty"` Certs []ImageCerts `yaml:"certs,omitempty"` Mounts []ContainerMount `yaml:"mounts,omitempty"` // Mounts Source ImageSource `yaml:"source,omitempty"` // Source }
type ContainerMount ¶
type EnvAccess ¶
type EnvAccess struct { Value string `yaml:"value"` // Value of the property Pattern bool `yaml:"pattern"` // Pattern is a flag to indicate if the value is a regular expression Description string `yaml:"description"` // Description of the property Required bool `yaml:"required"` // Required is a flag to indicate if the property is required Internal bool `yaml:"internal"` // Internal is a flag to indicates if the property should be documented }
type ImageCache ¶
type ImageCerts ¶
type ImageSource ¶
type ImageSource struct {
RegistryURL string `yaml:"registry_url"`
}
type ProvidedBinary ¶
type Workflow ¶
type Workflow struct { Repository string `yaml:"repository,omitempty"` Name string `required:"true" yaml:"name,omitempty"` Description string `yaml:"description,omitempty"` Version string `yaml:"version,omitempty"` Rules []WorkflowRule `yaml:"rules,omitempty"` Stages []WorkflowStage `yaml:"stages,omitempty"` }
func (*Workflow) ActionCount ¶
ActionCount returns the total count of actions across all stages
type WorkflowAction ¶
type WorkflowAction struct { ID string `required:"true" yaml:"id"` Rules []WorkflowRule `yaml:"rules,omitempty"` Config interface{} `yaml:"config,omitempty"` Module *analyzerapi.ProjectModule `yaml:"-"` }
type WorkflowExpressionType ¶
type WorkflowExpressionType string
const (
WorkflowExpressionCEL WorkflowExpressionType = "cel"
)
type WorkflowRule ¶
type WorkflowRule struct { Type WorkflowExpressionType `default:"cel" yaml:"type,omitempty"` Expression string `yaml:"expression,omitempty"` }
type WorkflowStage ¶
type WorkflowStage struct { Name string `required:"true" yaml:"name,omitempty"` Rules []WorkflowRule `yaml:"rules,omitempty"` Actions []WorkflowAction `yaml:"actions,omitempty"` }
Click to show internal directories.
Click to hide internal directories.