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: repo.go
    path of file: ./repos/ente/server/pkg/repo/cast
    
    the code of the file until where you have to start completion: package cast

import (
	"context"
	"database/sql"
	"github.com/ente-io/museum/ente"
	"github.com/ente-io/museum/pkg/utils/random"
	"github.com/ente-io/stacktrace"
	"github.com/google/uuid"
	"strings"
)

type Repos
    
func (r *Repository) GetPubKey(ctx context.Context, code string) (string, error) {
	var pubKey string
	row := r.DB.QueryRowContext(ctx, "SELECT public_key FROM casting WHERE code = $1 and is_deleted=false", code)
	err := row.Scan(&pubKey)
	if err != nil {
		if err == sql.ErrNoRows {
			return "", ente.ErrNotFoundError.NewErr("code not found")
		}
		return "", err
	}
	return pubKey, nil
}