func SaveWidget(widgetName string, data []byte) (widget Widget, err error) {
	err = json.Unmarshal(data, &widget)
	if err != nil {
		return
	}
	err = Insert("widgets", Widgets{widgetName: widget})
	return
}
SaveWidget reads and unmarshals a byte slice and inserts it into the db
package config
import (
	"encoding/json"
	"strconv"
	"strings"
	"github.com/aws/aws-sdk-go/aws"
	"github.com/aws/aws-sdk-go/aws/session"
	"github.com/aws/aws-sdk-go/service/simpledb"
)
type Widgets map[string]Widget
type WidgetSlice []Widget
type Widget struct {
	WidgetType string `json:"widgetType" awsmWidget:"Widget Type"`
	Title      string `json:"title" awsmWidget:"Title"`
	RssURL     string `json:"rssUrl" awsmWidget:"RSS URL"`
	Index      int    `json:"index"`
	Enabled    bool   `json:"enabled" awsmWidget:"Enabled"`
	Count      int    `json:"count" awsmWidget:"Count"`
	Name       string `json:"-"`  
}
func (f WidgetSlice) Len() int {
	return len(f)
}
func (f WidgetSlice) Less(i, j int) bool {
	return f[i].Index < f[j].Index
}
func (f WidgetSlice) Swap(i, j int) {
	f[i], f[j] = f[j], f[i]
}
func DefaultWidgets() Widgets {
	defaultWidgets := make(Widgets)
	defaultWidgets["events"] = Widget{
		WidgetType: "events",
		Title:      "AWS Events",
		Index:      0,
		Enabled:    true,
	}
	defaultWidgets["securitybulletins"] = Widget{
		WidgetType: "rss",
		Title:      "AWS Security Bulletins",
		RssURL:     "http://aws.amazon.com/security/security-bulletins/feed/",
		Count:      10,
		Index:      1,
		Enabled:    true,
	}
	defaultWidgets["awsblog"] = Widget{
		WidgetType: "rss",
		Title:      "AWS Blog",
		RssURL:     "http://feeds.feedburner.com/AmazonWebServicesBlog",
		Count:      10,
		Index:      2,
		Enabled:    true,
	}
	return defaultWidgets
}