database

package
v1.6.7 Latest Latest
Warning

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

Go to latest
Published: Mar 27, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type IKVDatabase

type IKVDatabase interface {
	types.ICloser
	PushRequestID([]byte) (bool, error)

	Size(IRelation) uint64
	Push(IRelation, IMessage) error
	Load(IRelation, uint64, uint64) ([]IMessage, error)
}

func NewKeyValueDB

func NewKeyValueDB(pSettings database.ISettings) (IKVDatabase, error)

type IMessage

type IMessage interface {
	IsIncoming() bool
	GetPseudonym() string
	GetTimestamp() string
	GetMessage() []byte
	ToBytes() []byte
}

func LoadMessage

func LoadMessage(pMsgBytes []byte) IMessage

func NewMessage

func NewMessage(pIsIncoming bool, pPseudonym string, pMessage []byte) IMessage

type IRelation

type IRelation interface {
	IAm() asymmetric.IPubKey
	Friend() asymmetric.IPubKey
}

func NewRelation

func NewRelation(pIAm, pFriend asymmetric.IPubKey) IRelation

Jump to

Keyboard shortcuts

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