package
0.0.0-20240831194536-2d10c8b25554
Repository: https://github.com/encryptedl/cryptfs.git
Documentation: pkg.go.dev

# Functions

NewAuthMessage constructs a message of KindAuth kind.
NewErrorMessage constructs a message of KindError kind.
NewGetMessage constructs a message of KindGet kind.
NewMonotoneTags creates a new Instance MonotoneTags .
NewPutMessage constructs a message of KindPut kind.
RandomBytes is a test helper.
RandomString is a test helper.
RandomTag is a test helper.
RandomVersion is a test helper.

# Constants

KindAuth is sent with a password value from client to server (only over a TLS connection) to authorize the client.
KindError is a message that is only sent from the server to the client.
KindGet is a message from the client to the server, stating the client wants to know the latest version of the value for a given key.
KindPut is a message that can be sent both by the client and the server.

# Variables

ErrBadMessage could be returned by Encoder.Encode, which would never happen if messages are constructed via the provided helper message, e.g., NewGetMessage.
ErrUnderflow is returned when not all bytes can be written (in the encoder) or read (in the decoder).

# Structs

Decoder is responsible for deserializing message from any reader (bytes to structs).
Encoder is responsible for encoding any message to any writer (e.g., a network connection, a file, a byte buffer...).
Message is a container for exchanging messages between clients and servers.
MonotoneTags provides thread-safe increasing tag numbers.

# Type aliases

Kind is a number representing the kind of a message—get, put, or error.