Versions in this module Expand all Collapse all v0 v0.0.3 Jun 5, 2025 Changes in this version + var ErrWorkflowDirNotFound = NewProcessingError(ErrorTypeWorkflowDirNotFound, "workflow directory not found", nil) type ErrorType + const ErrorTypeActionFetch + const ErrorTypeWorkflowDirNotFound v0.0.2 May 24, 2025 Changes in this version + func IsNetworkError(err error) bool + func IsPinnedWithSHA(action string) bool + func IsRateLimitError(err error) bool + func IsRetryable(err error) bool + func IsTestEnvironment() bool + func RetryOperation(operation func() error, config RetryConfig) error + func RetryOperationWithResult[T any](operation func() (T, error), config RetryConfig) (T, error) + type Action struct + Content string + IsComposite bool + IsRemote bool + Owner string + Ref string + Repo string + SHA string + Tag string + Type string + type ActionLookup interface + Lookup func(ctx context.Context, action, version string) (string, error) + type ActionLookupClientInterface interface + GetFileContent func(ctx context.Context, owner, repo, path, ref string) (string, error) + Lookup func(ctx context.Context, actionPath, ref string) (string, error) + type Cache struct + func NewCache(ttl time.Duration) *Cache + func (c *Cache) Cleanup() + func (c *Cache) Clear() + func (c *Cache) Close() error + func (c *Cache) GetActionResults(actionRef string) ([]types.DeepResult, bool) + func (c *Cache) GetWorkflow(path string) (*types.WorkflowFile, bool) + func (c *Cache) SetActionResults(actionRef string, results []types.DeepResult) + func (c *Cache) SetWorkflow(path string, workflow *types.WorkflowFile) + func (c *Cache) Size() int + type CompositeAction struct + Description string + Name string + Runs Runs + type CompositeActionParser struct + func NewCompositeActionParser() *CompositeActionParser + func (p *CompositeActionParser) Parse(content []byte) (*WorkflowFile, error) + type DeepProcessor struct + func NewDeepProcessor(opts ...DeepProcessorOption) *DeepProcessor + func (p *DeepProcessor) AddError(err error) + func (p *DeepProcessor) ClearErrors() + func (p *DeepProcessor) GetAction(ctx context.Context, actionRef string) (Action, error) + func (p *DeepProcessor) GetErrors() []error + func (p *DeepProcessor) HasErrors() bool + func (p *DeepProcessor) Process(path string, parser WorkflowParserInterface) ([]DeepResult, error) + type DeepProcessorOption func(*DeepProcessor) + func WithActionLookupClient(client ActionLookupClientInterface) DeepProcessorOption + func WithBaseDir(baseDir string) DeepProcessorOption + func WithCache(cache cache.Cache) DeepProcessorOption + func WithCompositeParser(parser WorkflowParserInterface) DeepProcessorOption + func WithDeepProcessorWriter(w io.Writer) DeepProcessorOption + func WithDeepScan(deepScan bool) DeepProcessorOption + func WithGitHubToken(token string) DeepProcessorOption + func WithIgnoreErrors(ignoreErrors bool) DeepProcessorOption + func WithMaxDepth(depth int) DeepProcessorOption + func WithRemoteWorkflowFetcher(fetcher RemoteWorkflowFetcherInterface) DeepProcessorOption + func WithRetryConfig(config RetryConfig) DeepProcessorOption + func WithReusableWorkflowParser(parser WorkflowParserInterface) DeepProcessorOption + func WithVerbose(verbose bool) DeepProcessorOption + func WithWorkflowParser(parser WorkflowParserInterface) DeepProcessorOption + type DeepResult struct + Action string + ActionRef string + DependencyPath []string + FilePath string + Fixable bool + JobName string + LineNumber int + SourceType string + StepName string + type ErrorType string + const ErrorTypeIO + const ErrorTypeInternal + const ErrorTypeLookup + const ErrorTypeNetwork + const ErrorTypeParser + const ErrorTypeRateLimit + const ErrorTypeValidation + type Fixer struct + func NewFixer(client ActionLookup, opts ...FixerOption) *Fixer + func (f *Fixer) ApplyFixes(ctx context.Context, results []Result) error + type FixerOption func(*Fixer) + func WithFixerWriter(w io.Writer) FixerOption + type Job struct + Name string + Steps []Step + Uses string + UsesLineNumber int + type ParserOption func(*WorkflowParser) + type ProcessingError struct + ActionRef string + DependencyPath []string + Depth int + FilePath string + Message string + Retryable bool + Type ErrorType + Wrapped error + func NewProcessingError(errType ErrorType, message string, wrapped error) *ProcessingError + func (e *ProcessingError) Error() string + func (e *ProcessingError) Unwrap() error + func (e *ProcessingError) WithActionRef(actionRef string) *ProcessingError + func (e *ProcessingError) WithDependencyPath(dependencyPath []string) *ProcessingError + func (e *ProcessingError) WithDepth(depth int) *ProcessingError + func (e *ProcessingError) WithFilePath(filePath string) *ProcessingError + func (e *ProcessingError) WithParentAction(parentAction string) *ProcessingError + func (e *ProcessingError) WithRetryable(retryable bool) *ProcessingError + type Processor struct + func NewProcessor(opts ...ProcessorOption) *Processor + func (p *Processor) Process(baseDir string, parser WorkflowParserInterface) ([]Result, error) + type ProcessorOption func(*Processor) + func WithProcessorWriter(w io.Writer) ProcessorOption + type RemoteWorkflowFetcher struct + func NewRemoteWorkflowFetcher(client *actionlookup.Client, outWriter io.Writer) *RemoteWorkflowFetcher + func (f *RemoteWorkflowFetcher) Cleanup(ctx context.Context) error + func (f *RemoteWorkflowFetcher) FetchWorkflow(ctx context.Context, workflowRef string) (string, error) + func (f *RemoteWorkflowFetcher) WithBaseURL(baseURL string) *RemoteWorkflowFetcher + func (f *RemoteWorkflowFetcher) WithCacheDir(cacheDir string) *RemoteWorkflowFetcher + func (f *RemoteWorkflowFetcher) WithCacheTTL(ttl time.Duration) *RemoteWorkflowFetcher + type RemoteWorkflowFetcherInterface interface + FetchWorkflow func(ctx context.Context, workflowRef string) (string, error) + type RemoteWorkflowOption func(*RemoteWorkflowFetcher) + type Result struct + Action string + FilePath string + JobName string + LineNumber int + StepName string + type RetryConfig struct + BackoffFactor float64 + InitialDelay time.Duration + MaxDelay time.Duration + MaxRetries int + OutWriter io.Writer + RetryableCheck func(error) bool + func DefaultRetryConfig() RetryConfig + func TestRetryConfig() RetryConfig + func (c RetryConfig) WithBackoffFactor(backoffFactor float64) RetryConfig + func (c RetryConfig) WithInitialDelay(initialDelay time.Duration) RetryConfig + func (c RetryConfig) WithMaxDelay(maxDelay time.Duration) RetryConfig + func (c RetryConfig) WithMaxRetries(maxRetries int) RetryConfig + func (c RetryConfig) WithOutWriter(outWriter io.Writer) RetryConfig + func (c RetryConfig) WithRetryableCheck(retryableCheck func(error) bool) RetryConfig + type ReusableWorkflowParser struct + func NewReusableWorkflowParser() *ReusableWorkflowParser + func (p *ReusableWorkflowParser) Parse(content []byte) (*WorkflowFile, error) + type Runs struct + Steps []Step + Using string + type Step struct + LineNumber int + Name string + Uses string + type WorkflowFile struct + Jobs map[string]Job + Name string + On any + type WorkflowParser struct + func NewParser(opts ...ParserOption) *WorkflowParser + func (p *WorkflowParser) Parse(content []byte) (*WorkflowFile, error) + type WorkflowParserInterface interface + Parse func(content []byte) (*WorkflowFile, error)