(cacheMap map[string]any, entry *CacheMemoryEntry)
| 244 | } |
| 245 | |
| 246 | func parseCacheMemoryScope(cacheMap map[string]any, entry *CacheMemoryEntry) error { |
| 247 | if scopeStr, ok := cacheMap["scope"].(string); ok { |
| 248 | entry.Scope = scopeStr |
| 249 | } |
| 250 | if entry.Scope == "" { |
| 251 | entry.Scope = "workflow" |
| 252 | } |
| 253 | if slices.Contains(validCacheMemoryScopes, entry.Scope) { |
| 254 | return nil |
| 255 | } |
| 256 | return fmt.Errorf("invalid cache-memory scope %q: must be one of %v", entry.Scope, validCacheMemoryScopes) |
| 257 | } |
| 258 | |
| 259 | func parseCacheMemoryAllowedExtensions(cacheMap map[string]any, entry *CacheMemoryEntry) error { |
| 260 | allowedExts, exists := cacheMap["allowed-extensions"] |
no test coverage detected