kvstore

package
v0.0.0-...-66acf6f Latest Latest
Warning

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

Go to latest
Published: Jan 18, 2024 License: BSD-3-Clause Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DeletedOrNonExistent = ""

Variables

This section is empty.

Functions

func NewKVRevisionError

func NewKVRevisionError(msg string) error

Types

type KVCacheError

type KVCacheError struct {
	Message string
}

func (KVCacheError) Error

func (e KVCacheError) Error() string

type KVRevisionCache

type KVRevisionCache struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewKVRevisionCache

func NewKVRevisionCache(g *libkb.GlobalContext) *KVRevisionCache

func (*KVRevisionCache) Check

func (k *KVRevisionCache) Check(mctx libkb.MetaContext, entryID keybase1.KVEntryID, ciphertext *string, teamKeyGen keybase1.PerTeamKeyGeneration, revision int) (err error)

func (*KVRevisionCache) CheckForUpdate

func (k *KVRevisionCache) CheckForUpdate(mctx libkb.MetaContext, entryID keybase1.KVEntryID, revision int) (err error)

func (*KVRevisionCache) Inspect

func (k *KVRevisionCache) Inspect(entryID keybase1.KVEntryID) (entryHash string, generation keybase1.PerTeamKeyGeneration, revision int)

Inspect is only really useful for testing

func (*KVRevisionCache) MarkDeleted

func (k *KVRevisionCache) MarkDeleted(mctx libkb.MetaContext, entryID keybase1.KVEntryID, revision int) (err error)

func (*KVRevisionCache) OnDbNuke

func (k *KVRevisionCache) OnDbNuke(m libkb.MetaContext) error

func (*KVRevisionCache) OnLogout

func (k *KVRevisionCache) OnLogout(m libkb.MetaContext) error

func (*KVRevisionCache) Put

func (k *KVRevisionCache) Put(mctx libkb.MetaContext, entryID keybase1.KVEntryID, ciphertext *string, teamKeyGen keybase1.PerTeamKeyGeneration, revision int) (err error)

type KVStoreBoxer

type KVStoreBoxer interface {
	Box(mctx libkb.MetaContext, entryID keybase1.KVEntryID, revision int, cleartextValue string) (ciphertext string,
		teamKeyGen keybase1.PerTeamKeyGeneration, ciphertextVersion int, err error)
	Unbox(mctx libkb.MetaContext, entryID keybase1.KVEntryID, revision int, ciphertext string, teamKeyGen keybase1.PerTeamKeyGeneration, formatVersion int,
		senderUID keybase1.UID, senderEldestSeqno keybase1.Seqno, senderDeviceID keybase1.DeviceID) (cleartext string, err error)
}

type KVStoreRealBoxer

type KVStoreRealBoxer struct {
	libkb.Contextified
}

func NewKVStoreBoxer

func NewKVStoreBoxer(g *libkb.GlobalContext) *KVStoreRealBoxer

func (*KVStoreRealBoxer) Box

func (b *KVStoreRealBoxer) Box(mctx libkb.MetaContext, entryID keybase1.KVEntryID, revision int, cleartext string) (
	ciphertext string, teamKeyGen keybase1.PerTeamKeyGeneration, version int, err error)

func (*KVStoreRealBoxer) Unbox

func (b *KVStoreRealBoxer) Unbox(mctx libkb.MetaContext, entryID keybase1.KVEntryID, revision int, ciphertext string,
	teamKeyGen keybase1.PerTeamKeyGeneration, formatVersion int, senderUID keybase1.UID, senderEldestSeqno keybase1.Seqno,
	senderDeviceID keybase1.DeviceID) (cleartext string, err error)

Jump to

Keyboard shortcuts

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