any-sync/thread/models.go
2022-07-08 10:19:43 +02:00

22 lines
362 B
Go

package thread
import (
"context"
)
type Thread interface {
ID() string
Heads() []string
MaybeHeads() []string
GetChange(ctx context.Context, recordID string) (*RawChange, error)
SetHeads(heads []string)
SetMaybeHeads(heads []string)
AddChange(change *RawChange) error
}
type RawChange struct {
Payload []byte
Signature []byte
Id string
}