-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinterfaces.go
More file actions
51 lines (41 loc) · 1.07 KB
/
interfaces.go
File metadata and controls
51 lines (41 loc) · 1.07 KB
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
43
44
45
46
47
48
49
50
51
package models
import (
"errors"
"github.com/elos/data"
)
var ErrEmptyLink = errors.New("EMPTY LINK")
/*
ActionableOps is the interface for the operations
an Actionable should support.
It should be noted that ActionableOps and EventableOps
can be combined to make an Actionable and Eventable
model interface, without having the repeated data.Model
and Userable interfaces. An example is Fixture.
*/
type ActionableOps interface {
NextAction(data.DB) (Action, error)
StartAction(data.DB, Action) error
CompleteAction(data.DB, Action) error
}
/*
EventableOps is the interface for the operations
an Eventable should support.
It should be noted that EventableOps and ActionableOps
can be combined to make an Eventable and Actionable
model interface, without having the repeated data.Model
and Userable interfaces. An example is Fixture.
*/
type EventableOps interface {
NextEvent(data.DB) (Event, error)
}
type Actionable interface {
data.Record
ActionableOps
}
type Eventable interface {
data.Record
EventableOps
}
type IntegrationCredentials interface {
data.Record
}