forked from src-d/lookout
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathevent.go
More file actions
29 lines (24 loc) · 722 Bytes
/
event.go
File metadata and controls
29 lines (24 loc) · 722 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package lookout
import (
"gopkg.in/src-d/lookout-sdk.v0/pb"
)
// Event represents a repository event.
type Event interface {
// ID returns the EventID.
ID() EventID
// Type returns the EventType, in order to identify the concreate type of
// the event.
Type() EventType
// Revision returns a commit revision, containing the head and the base of
// the changes.
Revision() *CommitRevision
// Validate returns an error if the event is malformed
Validate() error
}
type EventID = pb.EventID
type EventType = pb.EventType
type CommitRevision = pb.CommitRevision
type RepositoryInfo = pb.RepositoryInfo
type ReferencePointer = pb.ReferencePointer
type PushEvent = pb.PushEvent
type ReviewEvent = pb.ReviewEvent