kdb

package
v0.0.0-...-9b07614 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2023 License: MulanPSL-2.0 Imports: 3 Imported by: 0

Documentation

Overview

kdb package implements the access to the database in kcms.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreateKdbManager

func CreateKdbManager(dbType, dbConfig string)

CreateKdbManager creates a new kdb manager and a database connection poll to enhance performance.

func DeleteKeyInfo

func DeleteKeyInfo(taid, keyid string) error

DeleteKeyInfo deletes a specific keyinfo by taid and keyid.

func DeleteKeyInfoByID

func DeleteKeyInfoByID(id int64) error

DeleteKeyInfoByID deletes a specific keyinfo by keyinfo id.

func DeletePubKeyInfo

func DeletePubKeyInfo(deviceid int64) error

DeletePubKeyInfo deletes a specific keyinfo by deviceid.

func DeletePubKeyInfoByID

func DeletePubKeyInfoByID(id int64) error

DeletePubKeyInfoByID deletes a specific pubkeyinfo by pubkeyinfo id.

func FindKeyInfo

func FindKeyInfo(taid, keyid string) (*typdefs.KeyinfoRow, error)

FindKeyInfo queries the keyinfo by taid and keyid.

func FindPubKeyInfo

func FindPubKeyInfo(deviceid int64) (*typdefs.PubKeyinfoRow, error)

FindPubKeyInfo returns the pubkeyinfo by deviceid.

func ReleaseKdbManager

func ReleaseKdbManager()

ReleaseKdbManager releases the manager database connection.

func SaveKeyInfo

func SaveKeyInfo(taid, keyid, cipherkey string) (*typdefs.KeyinfoRow, error)

SaveKeyInfo insert a new keyinfo to database, including taid, keyid, cipherkey.

func SavePubKeyInfo

func SavePubKeyInfo(deviceid int64, pubkeycert string) (*typdefs.PubKeyinfoRow, error)

SavePubKeyInfo insert a new keyinfo to database, including deviceid, pubkey.

Types

type KdbManager

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

required struct KdbManager handles all key information in key database.

Jump to

Keyboard shortcuts

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