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: manifold_model.go
    path of file: ./repos/juju/worker/storageprovisioner
    
    the code of the file until where you have to start completion: // Copyright 2015 Canonical Ltd.
// Licensed under the AGPLv3, see LICENCE file for details.

package storageprovisioner

import (
	"github.com/juju/clock"
	"github.com/juju/errors"
	"github.com/juju/names/v5"
	"github.com/juju/worker/v3"
	"github.com/juju/worker/v3/dependency"

	"github.com/juju/juju/api/agent/storageprovisioner"
	"github.com/juju/juju/api/base"
	"github.com/juju/juju/storage"
	"github.com/juju/juju/worker/common"
)

// ModelManifoldConfig defines a storage provisioner's configuration and dependencies.
type ModelManifoldConfig struct {
	APICallerName       string
	StorageRegistryName string

	Clock                        clock.Clock
	Model                        names.ModelTag
	StorageDir                   string
	NewCredentialValidatorFacade func(base.APICaller) (common.CredentialAPI, error)
	NewWorker                    func(config Config) (worker.Worker, error)
	Logger                       Logger
}

// ModelManifold returns a dependency.Manifold that runs a storage provisioner.
func ModelManifold(config ModelManifoldConfig) dependency.Manifold {
	return dependency.Manifold{
		Inputs: []string{conf
    
func ModelManifold(config ModelManifoldConfig) dependency.Manifold {
	return dependency.Manifold{
		Inputs: []string{config.APICallerName, config.StorageRegistryName},
		Start: func(context dependency.Context) (worker.Worker, error) {

			var apiCaller base.APICaller
			if err := context.Get(config.APICallerName, &apiCaller); err != nil {
				return nil, errors.Trace(err)
			}
			var registry storage.ProviderRegistry
			if err := context.Get(config.StorageRegistryName, &registry); err != nil {
				return nil, errors.Trace(err)
			}

			api, err := storageprovisioner.NewState(apiCaller)
			if err != nil {
				return nil, errors.Trace(err)
			}

			credentialAPI, err := config.NewCredentialValidatorFacade(apiCaller)
			if err != nil {
				return nil, errors.Trace(err)
			}
			w, err := config.NewWorker(Config{
				Model:                config.Model,
				Scope:                config.Model,
				StorageDir:           config.StorageDir,
				Applications:         api,
				Volumes:              api,
				Filesystems:          api,
				Life:                 api,
				Registry:             registry,
				Machines:             api,
				Status:               api,
				Clock:                config.Clock,
				Logger:               config.Logger,
				CloudCallContextFunc: common.NewCloudCallContextFunc(credentialAPI),
			})
			if err != nil {
				return nil, errors.Trace(err)
			}
			return w, nil
		},
	}
}