feat: rest validation on http requests (#3041)
This commit is contained in:
@@ -81,7 +81,7 @@ func (pe *PeriodicalExecutor) Flush() bool {
|
||||
}())
|
||||
}
|
||||
|
||||
// Sync lets caller to run fn thread-safe with pe, especially for the underlying container.
|
||||
// Sync lets caller run fn thread-safe with pe, especially for the underlying container.
|
||||
func (pe *PeriodicalExecutor) Sync(fn func()) {
|
||||
pe.lock.Lock()
|
||||
defer pe.lock.Unlock()
|
||||
|
||||
7
core/validation/validator.go
Normal file
7
core/validation/validator.go
Normal file
@@ -0,0 +1,7 @@
|
||||
package validation
|
||||
|
||||
// Validator represents a validator.
|
||||
type Validator interface {
|
||||
// Validate validates the value.
|
||||
Validate() error
|
||||
}
|
||||
Reference in New Issue
Block a user