This simply defines some constants we'll use later in the code.
Next, add the following code to 'cmd/api/api.go' (just before starting the webserver):
This will migrate any existing resources and users you've created into cerberus.
IMPORTANT!! replace the "admin" user lookup with a user of your own that you've created.
Don't worry about the details of this code. It simply loops through local data and creates corresponding users and resources in cerberus.
All commands in cerberus are idempotent, so this code can run multiple times without problems.
This type of approach is useful when you have an existing production app that you'd like to migrate to cerberus.