keyconfig.SetConfig sets a struct type containing config key/values to the secret store of the current OS using the configID value as the identifier.

infamousjoeg / go-keyconfig Public

submited by
Style Pass
2022-01-15 05:00:04

keyconfig.SetConfig sets a struct type containing config key/values to the secret store of the current OS using the configID value as the identifier. It first encodes the struct to JSON and then Base64 encodes it for prior to setting in the secret store. Only an error will be returned, if one occurs.

keyconfig.GetConfig gets a Base64-encoded key/value config from the current OS secret store using the configID value as the identifier. It then Base64 decodes to JSON and then will unmarshal the JSON data into the struct provided as the config interface{} value. Since the struct is provided when the function is called, only an error will be returned otherwise, if one occurs.

keyconfig.DeleteConfig removes a Base64-encoded key/value config from the current OS secret store using the configID value as the identifier. Only an error will be returned, if one occurs.

Leave a Comment
Related Posts