rules

package
v0.1.3 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2026 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Filter

type Filter struct {
	Query      string
	Languages  []string
	Types      []rule.Type
	Severities []shared.Severity
	Tags       []string
	CWE        []string
}

Filter represents normalized catalog query parameters.

func NewFilter

func NewFilter(query string, languages, types, severities, tags, cwe []string) (Filter, error)

NewFilter creates, normalizes, and validates a catalog filter.

type Service

type Service struct {
	// contains filtered or unexported fields
}

Service provides rule catalog queries.

func NewService

func NewService(catalog ports.RuleCatalog) (*Service, error)

NewService creates a new Service.

func (*Service) Get

func (s *Service) Get(ctx context.Context, key rule.Key) (rule.Rule, error)

Get returns the exact rule by key.

func (*Service) List

func (s *Service) List(ctx context.Context, filter Filter) ([]rule.Rule, error)

List returns catalog rules matching the filter, sorted by key.

Jump to

Keyboard shortcuts

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