update the file structure update Initialise function , update interface and update code and write table test cases
This commit is contained in:
16
shared/plugin/definition/validator.go
Normal file
16
shared/plugin/definition/validator.go
Normal file
@@ -0,0 +1,16 @@
|
||||
package definition
|
||||
|
||||
import (
|
||||
"context"
|
||||
"net/url"
|
||||
)
|
||||
|
||||
// Validator interface for schema validation
|
||||
type Validator interface {
|
||||
Validate(ctx context.Context, url url.URL, payload []byte) (bool, error)
|
||||
}
|
||||
|
||||
// ValidatorProvider interface for creating validators
|
||||
type ValidatorProvider interface {
|
||||
New(ctx context.Context, config map[string]string) (map[string]Validator, error)
|
||||
}
|
||||
Reference in New Issue
Block a user