SG: Add a proper secret api that can be reused across commands
Created by: jhchabran
This adds a generic API to store tokens across the various commands.
Because each commands are their own domain rfc
, (and the upcomingslack
, ci
) the secret store delegates to those packages how to handle serialisation. The store persists and loads those "bucket" from the disk and provide a convenient Get(key, &yourStruct)
to access the data.
I added along the way a small function that migrates the old secrets into the new one seamlessly.