db

package
v1.0.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

View Source
const (
	// Databases
	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
}

Directories

Path Synopsis
****************************************************************************** * Copyright 2017 Dell Inc.
****************************************************************************** * Copyright 2017 Dell Inc.
models
****************************************************************************** * Copyright 2018 Dell Inc.
****************************************************************************** * Copyright 2018 Dell Inc.
****************************************************************************** * 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