You are an expert in writing code in many different languages. Your goal is to perform code completion for the following code, keeping in mind the rest of the code and the file meta data.
    Metadata details:
    filename: sigstore.go
    path of file: ./repos/podman/vendor/github.com/containers/image/v5/pkg/cli/sigstore
    
    the code of the file until where you have to start completion: package sigstore

import (
	"errors"
	"fmt"
	"io"
	"net/url"

	"github.com/containers/image/v5/pkg/cli"
	"github.com/containers/image/v5/pkg/c
    
func newSignerFromParameterData(params *params.SigningParameterFile, options *Options) (*signer.Signer, error) {
	opts := []sigstore.Option{}
	if params.PrivateKeyFile != "" {
		var getPassphrase func(keyFile string) (string, error)
		switch {
		case params.PrivateKeyPassphraseFile != "":
			getPassphrase = func(_ string) (string, error) {
				return cli.ReadPassphraseFile(params.PrivateKeyPassphraseFile)
			}
		case options.PrivateKeyPassphrasePrompt != nil:
			getPassphrase = options.PrivateKeyPassphrasePrompt
		default: // This shouldnâ€™t happen, the caller is expected to set options.PrivateKeyPassphrasePrompt
			return nil, fmt.Errorf("private key %s specified, but no way to get a passphrase", params.PrivateKeyFile)
		}
		passphrase, err := getPassphrase(params.PrivateKeyFile)
		if err != nil {
			return nil, err
		}
		opts = append(opts, sigstore.WithPrivateKeyFile(params.PrivateKeyFile, []byte(passphrase)))
	}

	if params.Fulcio != nil {
		fulcioOpt, err := fulcioOption(params.Fulcio, options)
		if err != nil {
			return nil, err
		}
		opts = append(opts, fulcioOpt)
	}

	if params.RekorURL != "" {
		rekorURL, err := url.Parse(params.RekorURL)
		if err != nil {
			return nil, fmt.Errorf("parsing rekorURL %q: %w", params.RekorURL, err)
		}
		opts = append(opts, rekor.WithRekor(rekorURL))
	}

	return sigstore.NewSigner(opts...)
}