testsupport

package
v0.0.0-...-ea65d50 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2022 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CheckPreKeysInterval = 200 * time.Millisecond

	LowPreKeysLimit            = 3
	NumPreKeysToRequest        = 4
	ForwardingTimeout          = 2000 * time.Millisecond
	MinForwardingRetryInterval = 200 * time.Millisecond
	UserTransferInterval       = 100 * time.Millisecond
	ChatNumberDomain           = "lantern.io"
)

Variables

This section is empty.

Functions

func NewNoopAttachmentsManager

func NewNoopAttachmentsManager() attachments.Manager

func TestService

func TestService(t *testing.T, testMultiClientMessaging bool, testRateLimiting bool, presenceRepo presence.Repository, buildServiceAndDB func(t *testing.T, serverID int) (service.Service, db.DB))

TestService runs a comprehensive test of the service API. If testMultiClientMessaging is false, it will omit scenarios that involve multiple recipient clients of the same messages. This is primarily used to avoid testing those scenarios on the membroker, which can't support them.

Types

type KeyPair

type KeyPair struct {
	Public  identity.PublicKey
	Private PrivateKey
}

KeyPair is a key pair with a Curve25519 public key and the corresponding Ed25519 private key

func GenerateKeyPair

func GenerateKeyPair() (*KeyPair, error)

GenerateKeyPair generates a new random KeyPair

type PrivateKey

type PrivateKey []byte

PrivateKey is an Ed25519 private key

func (PrivateKey) Sign

func (priv PrivateKey) Sign(data []byte) ([]byte, error)

Signs the given data and returns the resulting signature

Jump to

Keyboard shortcuts

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