func (col *Collection) Save(doc interface{}) error {
	var err error
	var res *nap.Response
	if col.Type == 2 {
		res, err = col.db.send("document?collection="+col.Name, "", "POST", doc, &doc, &doc)
	} else {
		return errors.New("Trying to save doc into EdgeCollection")
	}
	if err != nil {
		return err
	}
	switch res.Status() {
	case 201:
		return nil
	case 202:
		return nil
	case 400:
		return errors.New("Invalid document json")
	case 404:
		return errors.New("Collection does not exist")
	default:
		return nil
	}
}
Save saves doc into collection, doc should have Document Embedded to retrieve error and Key later.
package aranGO
import (
	"errors"
	nap "github.com/diegogub/napping"
)
type CollectionOptions struct {
	Name        string                 `json:"name"`
	Type        uint                   `json:"type"`
	Sync        bool                   `json:"waitForSync,omitempty"`
	Compact     bool                   `json:"doCompact,omitempty"`
	JournalSize int                    `json:"journalSize,omitempty"`
	System      bool                   `json:"isSystem,omitempty"`
	Volatile    bool                   `json:"isVolatile,omitempty"`
	Keys        map[string]interface{} `json:"keyOptions,omitempty"`
	Count int64 `json:"count"`
	Shards    int      `json:"numberOfShards,omitempty"`
	ShardKeys []string `json:"shardKeys,omitempty"`
}
func NewCollectionOptions(name string, sync bool) *CollectionOptions {
	var copt CollectionOptions
	copt.Name = name
	copt.Sync = sync
	return &copt
}
func (opt *CollectionOptions) IsEdge() {
	opt.Type = 3
	return
}
func (opt *CollectionOptions) IsDocument() {
	opt.Type = 2
	return
}
func (opt *CollectionOptions) MustSync() {
	opt.Sync = true
	return
}
func (opt *CollectionOptions) IsVolatile() {
	opt.Volatile = true
	return
}
func (opt *CollectionOptions) Journal(size int) {
	if size <= 0 {
		size = 1
	}
	size = size * 1024 * 1024
	opt.JournalSize = size
}
func (opt *CollectionOptions) Shard(num int) {
	if num <= 0 {
		num = 1
	}
	opt.Shards = num
}
func (opt *CollectionOptions) ShardKey(keys []string) {
	if len(keys) == 0 {
		return
	}
	if opt.ShardKeys == nil {
		opt.ShardKeys = make([]string, 0)
	}
	opt.ShardKeys = keys
}
type Collection struct {
	db     *Database `json:"db"`
	Name   string    `json:"name"`
	System bool      `json:"isSystem"`
	Status int       `json:"status"`
	Type     int    `json:"type"`
	policy   string `json:"-"`
	revision bool   `json:"-"`
}
func (col *Collection) Load() error {
	payload := map[string]bool{"count": false}
	res, err := col.db.send("collection", col.Name+"/load", "PUT", payload, nil, nil)
	if err != nil {
		return err
	}
	switch res.Status() {
	case 400, 404:
		return errors.New("Invalid collection to load")
	default:
		return nil
	}
}
func (col *Collection) Count() int64 {
	var cop CollectionOptions
	res, err := col.db.get("collection", col.Name+"/count", "GET", nil, &cop, &cop)
	if err != nil {
		return 0
	}
	switch res.Status() {
	case 400, 404:
		return 0
	default:
		return cop.Count
	}
}