db

package
v0.0.0-...-9592067 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckDataExists

func CheckDataExists(tableName string) (bool, error)

func InitDb

func InitDb(state *sqlite.DB) error

func InsertData

func InsertData(data Data, tableName string) error

func InsertVoucher

func InsertVoucher(voucher Voucher) error

func UpdateDataInDB

func UpdateDataInDB(data Data, tableName string) error

func UpdateOwnerKeys

func UpdateOwnerKeys(ownerKeys []OwnerKey) error

Types

type Data

type Data struct {
	Value interface{} `json:"value"`
}

func FetchData

func FetchData(tableName string) (Data, error)

type OwnerKey

type OwnerKey struct {
	Type      int    `json:"type"`
	PKCS8     []byte `json:"pkcs8"`
	X509Chain []byte `json:"x509_chain"`
}

func FetchOwnerKeys

func FetchOwnerKeys() ([]OwnerKey, error)

type Voucher

type Voucher struct {
	GUID []byte `json:"guid"`
	CBOR []byte `json:"cbor"`
}

func FetchVoucher

func FetchVoucher(guid []byte) (Voucher, error)

Jump to

Keyboard shortcuts

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