top
(README.md)
Go-CRUDMap
====

Golang simple map
----------------------------

CRUDMap is use for various purpose. i.e. user role management.

Default storage is MongoDB.

### Example

````go
import (
    "github.com/benzsuankularb/go-crudmap"
)

// New shortcode generator, You can implement your own, See Generator interface.
table := crudmap.NewMGOCRUDMap(/* pass mongo collecion */)

// Usage
targetId := "anyid"

// Create with given id 
id, err := table.Create(&targetId)

// Create without id (id generated automatically)
id, err = table.Create(nil)

// Set prop
// Value can be anything, I've implemented as "interface{}"
err = table.SetProp(id, "key", "val")

// Get prop
inf, err := table.GetProp(id, "key")

// Delete id
err = table.Delete(id)

````
### Author

benzsuankularb
benzsk130@gmail.com

Imported by 1 package(s)

  1. github.com/benzsuankularb/go-expirator

Imports 2 package(s)

  1. gopkg.in/mgo.v2/bson
  2. gopkg.in/mgo.v2

Test imports 1 package(s)

  1. github.com/smartystreets/goconvey/convey