File: validation.go

package info (click to toggle)
golang-github-go-ap-activitypub 0.0~git20250501.71edba4-3
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 920 kB
  • sloc: makefile: 26
file content (16 lines) | stat: -rw-r--r-- 501 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
package activitypub

// ValidationErrors is an aggregated error interface that allows
// a Validator implementation to return all possible errors.
type ValidationErrors interface {
	error
	Errors() []error
	Add(error)
}

// Validator is the interface that needs to be implemented by objects that
// provide a validation mechanism for incoming ActivityPub Objects or IRIs
// against an external set of rules.
type Validator interface {
	Validate(receiver IRI, incoming Item) (bool, ValidationErrors)
}