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: upload.go
    path of file: ./repos/gitea/models/repo
    
    the code of the file until where you have to start completion: // Copyright 2016 The Gogs Authors. All rights reserved.
// Copyright 2019
    
func GetUploadByUUID(ctx context.Context, uuid string) (*Upload, error) {
	upload := &Upload{}
	has, err := db.GetEngine(ctx).Where("uuid=?", uuid).Get(upload)
	if err != nil {
		return nil, err
	} else if !has {
		return nil, ErrUploadNotExist{0, uuid}
	}
	return upload, nil
}