Documentation ¶
Index ¶
- Variables
- func ChatPrivates(poolName string) ([]chat.Private, error)
- func ChatReceive(poolName string, after, before time.Time, limit int, private chat.Private) ([]chat.Message, error)
- func ChatSend(poolName string, contentType string, text string, bytes []byte, ...) (uint64, error)
- func Dump() map[string]any
- func FactoryReset() error
- func InviteReceive(poolName string, after int64, onlyMine bool) ([]invite.Invite, error)
- func LibraryFind(poolName string, id uint64) (library.File, error)
- func LibraryList(poolName string, folder string) (library.List, error)
- func LibraryReceive(poolName string, id uint64, localPath string) error
- func LibrarySave(poolName string, id uint64, dest string) error
- func LibrarySend(poolName string, localPath string, name string, solveConflicts bool, ...) (library.File, error)
- func PoolCreate(c pool.Config, apps []string) error
- func PoolGet(name string) (*pool.Pool, error)
- func PoolInvite(name string, ids []string, invitePool string) (string, error)
- func PoolJoin(token string) (pool.Config, error)
- func PoolLeave(name string) error
- func PoolParseInvite(token string) (invite.Invite, error)
- func PoolSub(name string, sub string, ids []string, apps []string) (string, error)
- func PoolUsers(poolName string) ([]security.Identity, error)
- func SetDbName(dbName string)
- func SetDbPath(dbPath string)
- func SetSelf(identity security.Identity) error
- func Start(dbPath string, availableBandwith pool.Bandwidth) error
- func Stop() error
- type Notification
Constants ¶
This section is empty.
Variables ¶
View Source
var Apps = []string{
"chat",
"library",
}
View Source
var Self security.Identity
Functions ¶
func ChatReceive ¶
func FactoryReset ¶
func FactoryReset() error
FactoryReset deletes and recreates the DB. It is useful during development to recover from inconsistent data and structure.
func InviteReceive ¶
func LibrarySend ¶
func PoolParseInvite ¶
PoolParseInvite checks the validity of the provided invite token and returns the token object
func SetDbName ¶
func SetDbName(dbName string)
SetDbName set the name of the DB file. Useful for test purpose
func SetDbPath ¶
func SetDbPath(dbPath string)
SetDbPath set the full path where the DB will be created. Useful on Android/iOS platforms
Types ¶
type Notification ¶
type Notification struct { Pool string `json:"pool"` App string `json:"app"` Message string `json:"message"` Count int `json:"count"` }
func Notifications ¶
func Notifications(ctime int64) []Notification
Click to show internal directories.
Click to hide internal directories.