leveldb

package
v0.0.0-...-620b1b6 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2024 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Overview

******************************************************************************

  • Copyright 2017 Dell Inc.
  • Copyright (c) 2019 Intel Corporation *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

******************************************************************************

  • Copyright 2017 Dell Inc.
  • Copyright (c) 2019 Intel Corporation *
  • Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except
  • in compliance with the License. You may obtain a copy of the License at *
  • http://www.apache.org/licenses/LICENSE-2.0 *
  • Unless required by applicable law or agreed to in writing, software distributed under the License
  • is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express
  • or implied. See the License for the specific language governing permissions and limitations under
  • the License. ******************************************************************************

Index

Constants

View Source
const (
	DeviceIdDpId = "DeviceIdDpId"
	Tab          = ":"
)

Variables

This section is empty.

Functions

func NewClient

func NewClient(config dtos.Configuration, lc logger.LoggingClient) (c interfaces.DataDBClient, errEdgeX error)

Types

type Client

type Client struct {
	// contains filtered or unexported fields
}

func (*Client) AddDatabaseField

func (c *Client) AddDatabaseField(ctx context.Context, tableName string, specsType constants.SpecsType, code string, name string) (err error)

func (*Client) CloseSession

func (c *Client) CloseSession()

func (*Client) CreateStable

func (c *Client) CreateStable(ctx context.Context, product models.Product) (err error)

func (*Client) CreateTable

func (c *Client) CreateTable(ctx context.Context, stable, table string) (err error)

func (*Client) DelDatabaseField

func (c *Client) DelDatabaseField(ctx context.Context, tableName, code string) (err error)

func (*Client) DropStable

func (c *Client) DropStable(ctx context.Context, table string) (err error)

func (*Client) DropTable

func (c *Client) DropTable(ctx context.Context, table string) (err error)

func (*Client) GetDataDBType

func (c *Client) GetDataDBType() constants.DataType

func (*Client) GetDeviceEvent

func (c *Client) GetDeviceEvent(req dtos.ThingModelEventDataRequest, device models.Device, product models.Product) ([]dtos.EventData, int, error)

func (*Client) GetDeviceEventCount

func (c *Client) GetDeviceEventCount(req dtos.ThingModelEventDataRequest) (int, error)

func (*Client) GetDeviceMsgCountByGiveTime

func (c *Client) GetDeviceMsgCountByGiveTime(deviceId string, startTime, endTime int64) (int, error)

func (*Client) GetDeviceProperty

func (c *Client) GetDeviceProperty(req dtos.ThingModelPropertyDataRequest, device models.Device) ([]dtos.ReportData, int, error)

func (*Client) GetDevicePropertyCount

func (c *Client) GetDevicePropertyCount(req dtos.ThingModelPropertyDataRequest) (int, error)

func (*Client) GetDeviceService

func (c *Client) GetDeviceService(req dtos.ThingModelServiceDataRequest, device models.Device, product models.Product) ([]dtos.SaveServiceIssueData, int, error)

func (*Client) Insert

func (c *Client) Insert(ctx context.Context, table string, data map[string]interface{}) (err error)

func (*Client) ModifyDatabaseField

func (c *Client) ModifyDatabaseField(ctx context.Context, tableName string, specsType constants.SpecsType, code string, name string) (err error)

type DriverStorageClient

type DriverStorageClient struct {
	// contains filtered or unexported fields
}

func NewDriverStorageClient

func NewDriverStorageClient(filePath, subPath string, lc logger.LoggingClient) (*DriverStorageClient, error)

func (*DriverStorageClient) All

func (dsc *DriverStorageClient) All() (map[string][]byte, error)

func (*DriverStorageClient) CloseSession

func (dsc *DriverStorageClient) CloseSession()

func (*DriverStorageClient) Delete

func (dsc *DriverStorageClient) Delete(keys []string) error

func (*DriverStorageClient) Get

func (dsc *DriverStorageClient) Get(keys []string) (map[string][]byte, error)

func (*DriverStorageClient) Put

func (dsc *DriverStorageClient) Put(kvs map[string][]byte) error

type LevelDB

type LevelDB struct {
	*leveldb.DB
}

Jump to

Keyboard shortcuts

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