ds

package
v0.0.0-...-c042da3 Latest Latest
Warning

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

Go to latest
Published: Feb 11, 2021 License: GPL-3.0 Imports: 2 Imported by: 6

Documentation

Overview

Package ds provides an interface for application calls to the datastore. To add a data source simply implement the methods

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataSource

type DataSource interface {
	ConnectDs(cs fdc.Config) error
	Get(q string, f interface{}) error
	Query(q string, f *[]interface{}) error
	Counts(bucket string, doctype string, c *[]interface{}) error
	GetDictionary(dsname string, doctype string, offset int64, limit int64) ([]interface{}, error)
	Browse(bucket string, where string, offset int64, limit int64, sort string, order string) ([]interface{}, error)
	Search(sr fdc.SearchRequest, foods *[]interface{}) (int, error)
	NutrientReport(bucket string, nr fdc.NutrientReportRequest, nutrients *[]interface{}) error
	Update(id string, r interface{}) error
	Remove(id string) error
	FoodExists(id string) bool
	Bulk(n *[]fdc.NutrientData) error
	BulkInsert(v []gocb.BulkOp) error
	CloseDs()
}

DataSource wraps the basic methods used for accessing and updating a data store.

Directories

Path Synopsis
Package cb implements the DataStore interface for CouchBase
Package cb implements the DataStore interface for CouchBase

Jump to

Keyboard shortcuts

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