Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is the API endpoint handler.
func (*Handler) RemoteJoin ¶
func (h *Handler) RemoteJoin(w http.ResponseWriter, r *http.Request)
RemoteJoin authenticates a remote Disco node. The request is expected to contain an Authorization header with a random token encoded as a base 58 string, and its signature. If the token matches an existing and valid invitation record, the request body is read, which is expected to contain the client's X25519 public key. If successful, ECDH key exchange is performed to generate the shared secret key, which is used to verify the token signature, and encrypt the generated TLS client certificate that is sent in the response.
func (*Handler) StoreGet ¶
func (h *Handler) StoreGet(w http.ResponseWriter, r *http.Request)
StoreGet returns the value associated to the received key.
Click to show internal directories.
Click to hide internal directories.