db

package
v1.2.2-dev.32 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2020 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (

	// MongoDB the unique identifier used in configuring the system to signal the underlying database used is MongoDB.
	//
	// Deprecated: Mongo functionality is deprecated as of the Geneva release.
	MongoDB = "mongodb"
	RedisDB = "redisdb"

	// Data
	EventsCollection          = "event"
	ReadingsCollection        = "reading"
	ValueDescriptorCollection = "valueDescriptor"

	//Export
	ExportCollection = "exportConfiguration"

	//Logging
	LogsCollection = "logEntry"

	// Metadata
	Device           = "device"
	DeviceProfile    = "deviceProfile"
	DeviceService    = "deviceService"
	Addressable      = "addressable"
	Command          = "command"
	DeviceReport     = "deviceReport"
	ProvisionWatcher = "provisionWatcher"
	Interval         = "interval"
	IntervalAction   = "intervalAction"

	// Notification
	Notification = "notification"
	Subscription = "subscription"
	Transmission = "transmission"
)

Variables

View Source
var (
	ErrNotFound            = errors.New("Item not found")
	ErrUnsupportedDatabase = errors.New("Unsupported database type")
	ErrInvalidObjectId     = errors.New("Invalid object ID")
	ErrNotUnique           = errors.New("Resource already exists")
	ErrCommandStillInUse   = errors.New("Command is still in use by device profiles")
	ErrSlugEmpty           = errors.New("Slug is nil or empty")
	ErrNameEmpty           = errors.New("Name is required")
)

Functions

func MakeTimestamp

func MakeTimestamp() int64

Types

type Configuration

type Configuration struct {
	DbType       string
	Host         string
	Port         int
	Timeout      int
	DatabaseName string
	Username     string
	Password     string
	BatchSize    int
}

Directories

Path Synopsis
Package mongo provides an implementation of DBClient which uses MongoDB as the underlying data-store.
Package mongo provides an implementation of DBClient which uses MongoDB as the underlying data-store.
models
Package models provides an internal representation of data structures that can be used when interacting with MongoDB.
Package models provides an internal representation of data structures that can be used when interacting with MongoDB.
****************************************************************************** * Copyright 2018 Redis Labs Inc.
****************************************************************************** * Copyright 2018 Redis Labs Inc.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL