Method
trackLifetimeUsage
(ctx context.Context, userID bson.ObjectID, projectID string, cost float64, success bool, now time.Time)
Source from the content-addressed store, hash-verified
| 182 | } |
| 183 | |
| 184 | func (s *UsageService) trackLifetimeUsage(ctx context.Context, userID bson.ObjectID, projectID string, cost float64, success bool, now time.Time) error { |
| 185 | filter := bson.M{ |
| 186 | "user_id": userID, |
| 187 | "project_id": projectID, |
| 188 | } |
| 189 | return s.upsertUsage(ctx, s.lifetimeCollection, filter, cost, success, now) |
| 190 | } |
Tested by
no test coverage detected