Define API and implement an in-memory store.
This commit is contained in:
parent
b8a4ad02d7
commit
b01c6fb05e
4 changed files with 150 additions and 0 deletions
17
pkg/api/api.go
Normal file
17
pkg/api/api.go
Normal 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
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue