Files
PandeyandGitHub 4f4b2dfad5 refactor: rename types package to domain (#108)
## Summary
- Rename internal/types to internal/domain
- Update imports and call sites to use the domain package
- Document the domain package boundaries
- Remove api/v1alpha1 dependency on internal/domain

## Tests
- GOCACHE=/private/tmp/foundry-go-cache go test ./...
2026-05-01 09:26:16 +05:30

22 lines
643 B
Go

package patch
import (
"context"
"path/filepath"
"github.com/signoz/foundry/api/v1alpha1"
"github.com/signoz/foundry/internal/domain"
)
// Patch applies a single patch entry to generated materials.
type Patch interface {
// Apply applies a single patch entry to matching materials and returns the patched materials.
Apply(ctx context.Context, materials []domain.Material, patch v1alpha1.PatchEntry) ([]domain.Material, error)
}
// MatchTarget checks if a material path matches a target pattern.
// Supports exact paths and glob patterns.
func MatchTarget(pattern, path string) (bool, error) {
return filepath.Match(pattern, path)
}