Documentation ¶
Overview ¶
kdb package implements the access to the database in kcms.
Index ¶
- func CreateKdbManager(dbType, dbConfig string)
- func DeleteKeyInfo(taid, keyid string) error
- func DeleteKeyInfoByID(id int64) error
- func DeletePubKeyInfo(deviceid int64) error
- func DeletePubKeyInfoByID(id int64) error
- func FindKeyInfo(taid, keyid string) (*typdefs.KeyinfoRow, error)
- func FindPubKeyInfo(deviceid int64) (*typdefs.PubKeyinfoRow, error)
- func ReleaseKdbManager()
- func SaveKeyInfo(taid, keyid, cipherkey string) (*typdefs.KeyinfoRow, error)
- func SavePubKeyInfo(deviceid int64, pubkeycert string) (*typdefs.PubKeyinfoRow, error)
- type KdbManager
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 ¶
DeleteKeyInfo deletes a specific keyinfo by taid and keyid.
func DeleteKeyInfoByID ¶
DeleteKeyInfoByID deletes a specific keyinfo by keyinfo id.
func DeletePubKeyInfo ¶
DeletePubKeyInfo deletes a specific keyinfo by deviceid.
func DeletePubKeyInfoByID ¶
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.