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: config_tls.go
    path of file: ./repos/photoprism/internal/config
    
    the code of the file until where you have to start completion: package config

import (
	"path/filepath"

	"github.com/photoprism/photoprism/pkg/clean"
	"github.com/photoprism/photoprism/pkg/fs"
)

const (
	PrivateKeyExt = ".key"
	Publ
    
func (c *Config) TLSKey() string {
	keyName := c.options.TLSKey

	if keyName == "" {
		keyName = c.SiteDomain() + PrivateKeyExt
	} else if fs.FileExistsNotEmpty(keyName) {
		return keyName
	}

	// find looks for an existing private key file.
	find := func(keyName string) string {
		if fileName := filepath.Join(c.CertificatesPath(), keyName); fs.FileExistsNotEmpty(fileName) {
			return fileName
		} else if fileName = filepath.Join("/etc/ssl/private", keyName); fs.FileExistsNotEmpty(fileName) {
			return fileName
		} else {
			return ""
		}
	}

	// Find matching private key.
	if fileName := find(keyName); fileName != "" {
		return fileName
	}

	// Find default key file.
	if c.DefaultTLS() {
		return find("photoprism" + PrivateKeyExt)
	}

	// Not found.
	return ""
}