Skip to content

Commit

Permalink
feat(core): add GuardScanner interface and ScanResult data class #47
Browse files Browse the repository at this point in the history
This commit introduces a new GuardScanner interface and a corresponding ScanResult data class to the core module. The GuardScanner interface defines a method for scanning input, while the ScanResult class encapsulates the result of a scan operation.
  • Loading branch information
phodal committed Jul 31, 2024
1 parent 720cb48 commit b32b7d8
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions core/src/main/kotlin/com/phodal/shirecore/guard/GuardScanner.kt
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
package com.phodal.shirecore.guard

// Define a common interface for all scanners
interface GuardScanner {
fun scan(input: String): ScanResult
}

// Define a ScanResult class to encapsulate the result of a scan
data class ScanResult(
val isPassed: Boolean,
val modifiedInput: String? = null,
val message: String? = null
)

0 comments on commit b32b7d8

Please sign in to comment.