in secretcache/cache.go [105:123]
func (c *Cache) GetSecretStringWithStageWithContext(ctx context.Context, secretId string, versionStage string) (string, error) {
secretCacheItem := c.getCachedSecret(secretId)
getSecretValueOutput, err := secretCacheItem.getSecretValue(ctx, versionStage)
if err != nil {
return "", err
}
if getSecretValueOutput.SecretString == nil {
return "", &InvalidOperationError{
baseError{
Message: "requested secret version does not contain SecretString",
},
}
}
return *getSecretValueOutput.SecretString, nil
}