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