ocurity / dracon

Security scanning & static analysis tool - forked and rewritten from @thought-machine/dracon
https://ocurity.com
Apache License 2.0
61 stars 8 forks source link

Improve ComponentType and OrchestrationType enums #214

Closed ptzianos closed 3 weeks ago

ptzianos commented 3 weeks ago

We need to convert these enums into string enums and make sure that they are safe and can't have random values, along with the fact that they should be marshaled/unmarshalled correctly. We can do this easily by using this project: https://github.com/abice/go-enum

which can be invoked as a docker container as follows:

docker run -w /app -v $(pwd):/app abice/go-enum --file /app/pkg/types/v1/models.go --sqlnullstr --sql --mustparse --marshal

this way we can have more reasonably structured enums.