@@ -109,19 +109,19 @@ type RuleAction struct {
109
109
PerformedAt time.Time
110
110
}
111
111
112
- // ActionsDB represents a DB backend that contains Action entries that can
112
+ // ActionsListDB represents a DB backend that contains Action entries that can
113
113
// be queried. It allows us to abstract away the details of the data storage
114
114
// method.
115
- type ActionsDB interface {
115
+ type ActionsListDB interface {
116
116
// ListActions returns a list of past Action items.
117
117
ListActions (ctx context.Context ) ([]* RuleAction , error )
118
118
}
119
119
120
120
// ActionsReadDB is an abstraction gives a caller access to either a group
121
121
// specific or group and feature specific rules.ActionDB.
122
122
type ActionsReadDB interface {
123
- GroupActionsDB () ActionsDB
124
- GroupFeatureActionsDB () ActionsDB
123
+ GroupActionsDB () ActionsListDB
124
+ GroupFeatureActionsDB () ActionsListDB
125
125
}
126
126
127
127
// ActionReadDBGetter represents a function that can be used to construct
@@ -150,25 +150,25 @@ type allActionsReadDB struct {
150
150
151
151
var _ ActionsReadDB = (* allActionsReadDB )(nil )
152
152
153
- // GroupActionsDB returns a rules.ActionsDB that will give the caller access
153
+ // GroupActionsDB returns a rules.ActionsListDB that will give the caller access
154
154
// to all of a groups Actions.
155
- func (a * allActionsReadDB ) GroupActionsDB () ActionsDB {
155
+ func (a * allActionsReadDB ) GroupActionsDB () ActionsListDB {
156
156
return & groupActionsReadDB {a }
157
157
}
158
158
159
- // GroupFeatureActionsDB returns a rules.ActionsDB that will give the caller
159
+ // GroupFeatureActionsDB returns a rules.ActionsListDB that will give the caller
160
160
// access to only a specific features Actions in a specific group.
161
- func (a * allActionsReadDB ) GroupFeatureActionsDB () ActionsDB {
161
+ func (a * allActionsReadDB ) GroupFeatureActionsDB () ActionsListDB {
162
162
return & groupFeatureActionsReadDB {a }
163
163
}
164
164
165
- // groupActionsReadDB is an implementation of the rules.ActionsDB that will
165
+ // groupActionsReadDB is an implementation of the rules.ActionsListDB that will
166
166
// provide read access to all the Actions of a particular group.
167
167
type groupActionsReadDB struct {
168
168
* allActionsReadDB
169
169
}
170
170
171
- var _ ActionsDB = (* groupActionsReadDB )(nil )
171
+ var _ ActionsListDB = (* groupActionsReadDB )(nil )
172
172
173
173
// ListActions will return all the Actions for a particular group.
174
174
func (s * groupActionsReadDB ) ListActions (ctx context.Context ) ([]* RuleAction ,
@@ -191,14 +191,14 @@ func (s *groupActionsReadDB) ListActions(ctx context.Context) ([]*RuleAction,
191
191
return actions , nil
192
192
}
193
193
194
- // groupFeatureActionsReadDB is an implementation of the rules.ActionsDB that
194
+ // groupFeatureActionsReadDB is an implementation of the rules.ActionsListDB that
195
195
// will provide read access to all the Actions of a feature within a particular
196
196
// group.
197
197
type groupFeatureActionsReadDB struct {
198
198
* allActionsReadDB
199
199
}
200
200
201
- var _ ActionsDB = (* groupFeatureActionsReadDB )(nil )
201
+ var _ ActionsListDB = (* groupFeatureActionsReadDB )(nil )
202
202
203
203
// ListActions will return all the Actions for a particular group that were
204
204
// executed by a particular feature.
0 commit comments