UserSecretsManager.TrySetSecret
Method
type UserSecretsManager interface { // ... omitted for brevity TrySetSecret( name string, value string, ) (bool, error)}Signature
method
TrySetSecret Attempts to set a user secret value synchronously.
TrySetSecret( name string, value string,) (bool, error)Parameters
namestringThe name of the secret.valuestringThe value of the secret.Returns
(bool, error) True if the secret was set successfully; otherwise, false.
Returns (bool, error).
Defined on
This method is defined on the following type: