Initial cloud-services repo - gateway service + pkg modules

This commit is contained in:
Chris Rai
2026-01-30 23:14:52 -05:00
commit fbb820d7b3
1037 changed files with 171318 additions and 0 deletions

View File

@@ -0,0 +1,37 @@
package actionlogger
import (
"time"
"fiskerinc.com/modules/common/dbbasemodel"
"github.com/google/uuid"
)
// Use Action Log to track actions taken against a car including remote commands, car updates etc. Mostly worried about car commands for now
type ActionLog struct {
VIN string
UserIdentifier string
//UserType string // Not sure how different users can be identified between fisker customers and api admins
Action Action // Short Hand of description
Description string // JSON string explaining full action
// TrackingID *uuid.UUID // If we want to log the same action as it goes through, this tracking ID will follow the same request through
CallLocation string // Informative field where we created this. Can use runtime reflection if we want, but is more expensive
dbbasemodel.DBModelBase
}
type Action string
const (
RemoteCommand Action = "RemoteCommand"
CarConfigurationUpdate Action = "CarConfigurationUpdate"
CarUpdate Action = "CarUpdate"
)
type ActionLogFilter struct {
VINs []string `pg:",array"`
Actions []string `pg:",array"`
Before time.Time
After time.Time
Limit int
TrackingID *uuid.UUID
}