( port string, baseURL *url.URL, metadataStorer WebFeatureMetadataStorer, wptMetricsStorer WPTMetricsStorer, eventPublisher EventPublisher, rawBytesDataCacher RawBytesDataCacher, routeCacheOptions RouteCacheOptions, userGitHubClientFactory UserGitHubClientFactory, preRequestValidationMiddlewares []func(http.Handler) http.Handler, authMiddleware func(http.Handler) http.Handler)
| 259 | // This interface is intended for use in scenarios where data needs to be |
| 260 | // cached as raw bytes, rather than structured data types. |
| 261 | // Implementations of this interface should provide methods to store and |
| 262 | // retrieve byte slices associated with string keys. |
| 263 | // Currently implemented by the valkey cache layer. |
| 264 | type RawBytesDataCacher interface { |
| 265 | // Cache stores a value associated with a key in the cache. |
| 266 | Cache(context.Context, string, []byte, ...cachetypes.CacheOption) error |
| 267 | // Get retrieves a value from the cache by its key. |
| 268 | Get(context.Context, string) ([]byte, error) |
| 269 | } |
| 270 | |
| 271 | // RouteCacheOptions contains options for caching routes. |
| 272 | type RouteCacheOptions struct { |
| 273 | // AggregatedFeatureStatsOptions applies cache options for routes that only contain stats on features. |
| 274 | // Any routes with multiple data sources are not included (e.g. WPT Metrics) |
| 275 | AggregatedFeatureStatsOptions []cachetypes.CacheOption |
| 276 | } |
| 277 | |
| 278 | type EventPublisher interface { |
| 279 | PublishSearchConfigurationChanged(ctx context.Context, resp *backend.SavedSearchResponse, |
| 280 | userID string, isCreation bool) error |
| 281 | PublishCodeScanTask(ctx context.Context, task codescantaskv1.CodeScanTaskEvent) error |
| 282 | } |
| 283 | |
| 284 | type WebhookVerifier interface { |
| 285 | VerifySignature(payload []byte, signature string) error |
| 286 | } |
| 287 |
nothing calls this directly
no test coverage detected