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: update.go
    path of file: ./repos/nanobox/generators/hooks/component
    
    the code of the file until where you have to start completion: package component

import (
	"encoding/json"

	"github.com/nanobox-io/nanobox/models"
)

type updatePayload struct {
	Config map[string]interface{} `json:"config"`
}

// UpdatePayload returns a string for the update hook payload
func UpdatePayload(c *models.Component) string {
	config, err := componentConfig(c)
	if err != nil {
		// log the failure
		return "{}"
	}

	payl
    
func UpdatePayload(c *models.Component) string {
	config, err := componentConfig(c)
	if err != nil {
		// log the failure
		return "{}"
	}

	payload := updatePayload{
		Config: config,
	}

	switch c.Name {
	case "portal", "logvac", "hoarder", "mist":
		payload.Config["token"] = "123"
	}

	j, err := json.Marshal(payload)
	if err != nil {
		// log the failure
		return "{}"
	}

	return string(j)
}