tokens

package
v0.0.0-...-810cf82 Latest Latest
Warning

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

Go to latest
Published: Dec 29, 2019 License: MIT Imports: 0 Imported by: 20

Documentation

Overview

Package tokens contains constant values that are used by several packages.

Index

Constants

View Source
const (
	// The DB bucket that contains general-purpose Bazil data not tied to
	// any specific volume.
	BucketBazil = "bazil"

	// The DB bucket that contains a sub-bucket per volume, named by
	// the volume ID.
	BucketVolume = "volume"

	// The DB bucket that contains a key per volume, named by the
	// human-readable volume name. Value is volume ID.
	BucketVolName = "volName"

	// The DB bucket that contains sharing groups, for convergent
	// encryption. Key is user-friendly name, value is the 32-byte
	// secret.
	BucketSharing = "sharing"

	// The DB bucket that contains peers by public key.
	BucketPeer = "peer"

	// The DB bucket that contains peers by sequential ID. Value is
	// just the raw public key, or empty for tombstone. Peer IDs are
	// never reused.
	BucketPeerID = "peerID"
)
View Source
const (
	PeerStateID = "id"

	// The DB bucket that contains addresses for the peer. Key is peer
	// host:port, value is empty for now
	PeerStateLocation = "location"

	// The DB bucket that configures what storage to offer to peer.
	// Key is storage backend, value is empty for now. Later this may
	// include quota style restrictions.
	PeerStateStorage = "storage"

	// The DB bucket that configures what volumes peer can see.
	// Key is volume ID, value is empty for now.
	PeerStateVolume = "volume"
)

Keys in the bucket BucketPeer/PUB

View Source
const (
	VolumeStateDir   = "dir"
	VolumeStateInode = "inode"
	VolumeStateSnap  = "snap"
	VolumeStateEpoch = "epoch"

	// The DB bucket that configures what storage the volume uses.
	// Key is name, value is protobuf bazil.db.VolumeStorage.
	VolumeStateStorage = "storage"

	// The DB bucket that stores logical clocks tracking file
	// changes.
	//
	// Key is <dirInode:uint64_be><name>, value is binary marshaled
	// clock.Version. For the purposes of this, the root directory has
	// parent inode 0 and empty string as name.
	VolumeStateClock = "clock"

	// The DB bucket that stores alternate versions of this directory
	// entry.
	//
	// The entries may not actually be conflicting; incoming sync to
	// open files is deferred.
	//
	// Key is <dirInode:uint64_be><name>"\x00"<clock>, value is
	// protobuf bazil.snap.Dirent with fields name and clock empty.
	// For the purposes of this, the root directory has parent inode 0
	// and empty string as name.
	VolumeStateConflict = "conflict"
)

Keys in the bucket BucketVolume/VOLID

View Source
const (
	InodeRoot        uint64 = 1
	InodeSnap        uint64 = 2
	MaxReservedInode uint64 = 1023
)

Reserved inode numbers.

View Source
const (
	InodeKindMask    uint64 = 1 << 63
	InodeKindDynamic uint64 = 1 << 63
	InodeKindNormal  uint64 = 0
)

the top half of inode space is reserved for dynamically allocated inodes

View Source
const Blake2bPersonalizationConvergentKey = "bazil-crypt-key"

Blake2b personalization prefix for convergent encryption keys

View Source
const Blake2bPersonalizationConvergentNonce = "bazil-crypt-nonc"

Blake2b personalization prefix for convergent encryption nonces

View Source
const (
	GlobalStateKey = "key"
)

Keys in the bucket BucketBazil.

View Source
const (
	// TCP port to listen on for HTTP, including web UI and peer API.
	// If you squint, it says "bazil".
	TCPPortHTTP = 34211
)

Variables

This section is empty.

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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