Documentation ¶
Index ¶
- func ResolveMongoCollectionName(ent EntityType) string
- type MongoStore
- func (m *MongoStore) Delete(ent EntityType, id string) (err error)
- func (m *MongoStore) Init()
- func (m *MongoStore) Insert(rp ResourcePath, payload SensorThing) error
- func (m *MongoStore) Patch(payload SensorThing) (err error)
- func (m *MongoStore) Query(rp ResourcePath, opts QueryOptions) (interface{}, error)
- func (m *MongoStore) Shutdown()
- func (m *MongoStore) Update(payload SensorThing) (err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResolveMongoCollectionName ¶
func ResolveMongoCollectionName(ent EntityType) string
Types ¶
type MongoStore ¶
type MongoStore struct {
// contains filtered or unexported fields
}
func NewMongoStore ¶
func NewMongoStore(hosts string, db string) *MongoStore
func (*MongoStore) Delete ¶
func (m *MongoStore) Delete(ent EntityType, id string) (err error)
func (*MongoStore) Init ¶
func (m *MongoStore) Init()
func (*MongoStore) Insert ¶
func (m *MongoStore) Insert(rp ResourcePath, payload SensorThing) error
func (*MongoStore) Patch ¶
func (m *MongoStore) Patch(payload SensorThing) (err error)
func (*MongoStore) Query ¶
func (m *MongoStore) Query(rp ResourcePath, opts QueryOptions) (interface{}, error)
func (*MongoStore) Shutdown ¶
func (m *MongoStore) Shutdown()
func (*MongoStore) Update ¶
func (m *MongoStore) Update(payload SensorThing) (err error)
Click to show internal directories.
Click to hide internal directories.