Closed peterbogdan closed 2 months ago
@javuto should this be moved to https://github.com/jmpsec/osctrl/blob/main/types/osquery.go to avoid having to maintain multiple instances of the same type?
Hmmm in osquery.go
we have the standard types for osquery, and the other one is our internal type to handle data serialization. I think it better stays in db.go
since it is still our internal type.
but would it be better to define the type in a single place and use that instead of redefining it in both logging/db.go
and api/postgres.go
?
to not keep 2 versions up to date when things are changing
maybe something like this:
import (
"github.com/jmpsec/osctrl/logging"
)
var logs []logging.OsqueryQueryData
Okay that makes sense, and it is better to only have to maintain that type in a single place. Would you add it in this PR? Thank you for working on it! 🙏
updated
Update type for Data as reflected here: https://github.com/jmpsec/osctrl/blob/main/logging/db.go#L54-L54