Define API and implement an in-memory store.

This commit is contained in:
Mariano Uvalle 2023-11-06 01:48:10 +00:00
parent b8a4ad02d7
commit b01c6fb05e
4 changed files with 150 additions and 0 deletions

17
pkg/api/api.go Normal file
View file

@ -0,0 +1,17 @@
package api
type User struct {
ID string
PasswordHash string
}
type Device struct {
ID string
PublicKey []byte
}
type Clipboard struct {
SenderDeviceID string
// Payloads maps DeviceIDs to base64 encoded data.
Payloads map[string]string
}