-
Notifications
You must be signed in to change notification settings - Fork 33
Expand file tree
/
Copy pathevent.go
More file actions
42 lines (33 loc) · 904 Bytes
/
event.go
File metadata and controls
42 lines (33 loc) · 904 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
30
31
32
33
34
35
36
37
38
39
40
41
42
package mock
import (
"github.com/src-d/lookout"
)
// FakeEvent is just an invalid event to be used for testing purposes.
type FakeEvent struct{}
// ID honors the Event interface.
func (e *FakeEvent) ID() lookout.EventID {
var id [20]byte
return id
}
// Type honors the Event interface.
func (e *FakeEvent) Type() lookout.EventType {
return 100
}
// Revision honors the Event interface.
func (e *FakeEvent) Revision() *lookout.CommitRevision {
return &lookout.CommitRevision{}
}
// Validate honors the Event interface.
func (e *FakeEvent) Validate() error {
return nil
}
// GetProvider returns the name of the provider that created this event
func (e *FakeEvent) GetProvider() string {
return ""
}
// GetOrganizationID returns the organization to which this event's repository
// belongs to
func (e *FakeEvent) GetOrganizationID() string {
return ""
}
var _ lookout.Event = &FakeEvent{}