ramble

package module
v0.0.0-...-f8c8cd4 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2019 License: GPL-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package ramble provides the structures used when communicating with a ramble server.

Index

Constants

View Source
const (
	DeleteAll uint8 = iota
	DeletePublic
	DeleteConversations
)

TODO: these have no meaning yet

View Source
const (
	// ViewConversations asks to view a list of conversations you are
	// associated with.
	ViewConversations uint8 = iota

	// ViewMessages asks to view a list messages within a conversion.
	ViewMessages
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DeleteHelloReq

type DeleteHelloReq struct {
	// Sender's public key fingerprint.
	Sender string `json:"sender"`

	// Type of data to delete, representing an enumerated type.
	Type uint8 `json:"type"`
}

DeleteHelloReq is sent by the client as the initial request to delete stored data.

type DeleteHelloResp

type DeleteHelloResp HelloResponse

DeleteHelloResp is sent by the server in response to DeleteHelloReq.

type DeleteVerifyReq

type DeleteVerifyReq VerifyRequest

DeleteVerifyReq is sent by the client in response to DeleteHelloResp.

type DeleteVerifyResp

type DeleteVerifyResp struct{}

DeleteVerifyResp is sent by the server in response to DeleteVerifyReq and terminates the hello-verify handshake.

type HelloResponse

type HelloResponse struct {
	// Nonce to be signed and passed to the verify request.
	Nonce string `json:"nonce"`

	// UUID to be passed to the verify request.
	UUID string `json:"uuid"`
}

HelloResponse is sent from the server indicating that it needs verification before continuing.

type SendHelloReq

type SendHelloReq struct {
	// Conversation UUID representing a pre-existing conversation, or empty
	// to start a new conversation.
	Conversation string `json:"conv"`

	// Message PGP encrypted. The list of encryption recipients should match
	// the "recipients" member.
	Message string `json:"msg"`

	// Recipients' public key fingerprints.
	Recipients []string `json:"recipients"`

	// Sender's public key fingerprint.
	Sender string `json:"sender"`
}

SendHelloReq is sent by the client as the initial hello request to append a message to a conversion.

type SendHelloResp

type SendHelloResp HelloResponse

SendHelloResp is sent by the server in response to SendHelloReq.

type SendVerifyReq

type SendVerifyReq VerifyRequest

SendVerifyReq is sent by the client in response to SendHelloResp.

type SendVerifyResp

type SendVerifyResp struct {
	// Conversation UUID. If the hello request conversation UUID was empty,
	// this UUID is for the new conversation.
	Conversation string `json:"conv"`
}

SendVerifyResp is sent by the server in response to SendVerifyReq and terminates the hello-verify handshake.

type VerifyRequest

type VerifyRequest struct {
	// Signature is the detached signature of the hello response nonce.
	Signature string `json:"sig"`

	// UUID from the hello response.
	UUID string `json:"uuid"`
}

VerifyRequest is sent from the client with verification details. The signature is used to verify ownership of a private key.

type ViewHelloReq

type ViewHelloReq struct {
	// Count of how many items to return, 0 for all.
	Count uint64 `json:"count"`

	// Sender's public key fingerprint.
	Sender string `json:"sender"`

	// Type of data to view, representing an enumerated type.
	Type uint8 `json:"type"`
}

ViewHelloReq is sent by the client as the initial request to view a list of stored messages.

type ViewHelloResp

type ViewHelloResp HelloResponse

ViewHelloResp is sent by the server in response to ViewHelloReq.

type ViewVerifyReq

type ViewVerifyReq VerifyRequest

ViewVerifyReq is sent by the client in response to ViewHelloResp.

type ViewVerifyResp

type ViewVerifyResp struct {
	// List of data.
	List string `json:"list"`
}

ViewVerifyResp is sent by the server in response to ViewVerifyReq and terminates the hello-verify handshake. The list items are encrypted with the sender's public key in an amalgamated string using speculative key IDs.

type WelcomeHelloReq

type WelcomeHelloReq struct {
	// Public key.
	Public string `json:"public"`
}

WelcomeHelloReq is sent from the client asking to add this public key to storage. This is required before all other requests, since all other requests initiate based on the sender's fingerprint, not full public key.

type WelcomeHelloResp

type WelcomeHelloResp HelloResponse

WelcomeHelloResp is sent by the server in response to WelcomeHelloReq.

type WelcomeVerifyReq

type WelcomeVerifyReq VerifyRequest

WelcomeVerifyReq is sent by the client in response to WelcomeHelloResp.

type WelcomeVerifyResp

type WelcomeVerifyResp struct{}

WelcomeVerifyResp is sent by the server in response to WelcomeVerifyReq and terminates the hello-verify handshake.

Directories

Path Synopsis
cmd
internal
pgp
pkg
server
Package server implements a ramble server.
Package server implements a ramble server.

Jump to

Keyboard shortcuts

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