vor temaplte
This commit is contained in:
@@ -13,11 +13,11 @@ import (
|
||||
type ID = string
|
||||
|
||||
type File struct {
|
||||
ID ID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
// weitere Metadaten optional: Size, Hash, Owner, Tags, ...
|
||||
UpdatedAt int64 `json:"updatedAt"` // UnixNano für LWW
|
||||
Deleted bool `json:"deleted"` // Tombstone für Mesh-Delete
|
||||
ID ID `json:"id"`
|
||||
Name string `json:"name"`
|
||||
UpdatedAt int64 `json:"updatedAt"` // UnixNano für LWW
|
||||
Deleted bool `json:"deleted"` // Tombstone für Mesh-Delete
|
||||
Owner string `json:"owner"` //AdvertURL/NodeID des Erzeugers
|
||||
}
|
||||
|
||||
/*** Fehler ***/
|
||||
@@ -36,11 +36,10 @@ type Store interface {
|
||||
// Lesen & Auflisten
|
||||
Get(ctx context.Context, id ID) (File, error)
|
||||
List(ctx context.Context, next ID, limit int) (items []File, nextOut ID, err error)
|
||||
|
||||
// Mutationen mit LWW-Semantik (UpdatedAt wird intern gesetzt, außer bei ApplyRemote)
|
||||
Create(ctx context.Context, name string) (File, error)
|
||||
Rename(ctx context.Context, id ID, newName string) (File, error)
|
||||
Delete(ctx context.Context, id ID) (File, error)
|
||||
Rename(ctx context.Context, id ID, newName string) (File, error) // nur Owner darf
|
||||
Delete(ctx context.Context, id ID) (File, error) // nur Owner darf
|
||||
TakeoverOwner(ctx context.Context, id ID, newOwner string) (File, error)
|
||||
}
|
||||
|
||||
/*** Mesh-Replikation ***/
|
||||
|
||||
Reference in New Issue
Block a user