@@ -117,7 +117,9 @@ type Action struct {
117117}
118118
119119// AddAction serialises and adds an Action to the DB under the given sessionID.
120- func (db * DB ) AddAction (sessionID session.ID , action * Action ) (uint64 , error ) {
120+ func (db * BoltDB ) AddAction (sessionID session.ID , action * Action ) (uint64 ,
121+ error ) {
122+
121123 var buf bytes.Buffer
122124 if err := SerializeAction (& buf , action ); err != nil {
123125 return 0 , err
@@ -231,7 +233,7 @@ func getAction(actionsBkt *bbolt.Bucket, al *ActionLocator) (*Action, error) {
231233
232234// SetActionState finds the action specified by the ActionLocator and sets its
233235// state to the given state.
234- func (db * DB ) SetActionState (al * ActionLocator , state ActionState ,
236+ func (db * BoltDB ) SetActionState (al * ActionLocator , state ActionState ,
235237 errorReason string ) error {
236238
237239 if errorReason != "" && state != ActionStateError {
@@ -293,7 +295,7 @@ type ListActionsFilterFn func(a *Action, reversed bool) (bool, bool)
293295// The indexOffset and maxNum params can be used to control the number of
294296// actions returned. The return values are the list of actions, the last index
295297// and the total count (iff query.CountTotal is set).
296- func (db * DB ) ListActions (filterFn ListActionsFilterFn ,
298+ func (db * BoltDB ) ListActions (filterFn ListActionsFilterFn ,
297299 query * ListActionsQuery ) ([]* Action , uint64 , uint64 , error ) {
298300
299301 var (
@@ -345,7 +347,7 @@ func (db *DB) ListActions(filterFn ListActionsFilterFn,
345347
346348// ListSessionActions returns a list of the given session's Actions that pass
347349// the filterFn requirements.
348- func (db * DB ) ListSessionActions (sessionID session.ID ,
350+ func (db * BoltDB ) ListSessionActions (sessionID session.ID ,
349351 filterFn ListActionsFilterFn , query * ListActionsQuery ) ([]* Action ,
350352 uint64 , uint64 , error ) {
351353
@@ -391,7 +393,7 @@ func (db *DB) ListSessionActions(sessionID session.ID,
391393// pass the filterFn requirements.
392394//
393395// TODO: update to allow for pagination.
394- func (db * DB ) ListGroupActions (ctx context.Context , groupID session.ID ,
396+ func (db * BoltDB ) ListGroupActions (ctx context.Context , groupID session.ID ,
395397 filterFn ListActionsFilterFn ) ([]* Action , error ) {
396398
397399 if filterFn == nil {
@@ -589,7 +591,7 @@ type ActionReadDBGetter interface {
589591}
590592
591593// GetActionsReadDB is a method on DB that constructs an ActionsReadDB.
592- func (db * DB ) GetActionsReadDB (groupID session.ID ,
594+ func (db * BoltDB ) GetActionsReadDB (groupID session.ID ,
593595 featureName string ) ActionsReadDB {
594596
595597 return & allActionsReadDB {
@@ -601,7 +603,7 @@ func (db *DB) GetActionsReadDB(groupID session.ID,
601603
602604// allActionsReadDb is an implementation of the ActionsReadDB.
603605type allActionsReadDB struct {
604- db * DB
606+ db * BoltDB
605607 groupID session.ID
606608 featureName string
607609}
0 commit comments