Documentation
¶
Index ¶
- func InitRepo(config *InitConfig) error
- func MigrateRepo(config *MigrateConfig) error
- func NewWallet(wordCount int) (string, error)
- func WalletAccountAt(phrase string, index int, password string) ([]byte, error)
- type Callback
- type Event
- type InitConfig
- type Messenger
- type MigrateConfig
- type Mobile
- func (m *Mobile) AcceptExternalInvite(id string, key string) (string, error)
- func (m *Mobile) AcceptInvite(id string) (string, error)
- func (m *Mobile) AcceptInviteViaNotification(id string) (string, error)
- func (m *Mobile) AccountContact() ([]byte, error)
- func (m *Mobile) AccountThread() ([]byte, error)
- func (m *Mobile) AddComment(blockId string, body string) (string, error)
- func (m *Mobile) AddContact(contact []byte) error
- func (m *Mobile) AddExternalInvite(threadId string) ([]byte, error)
- func (m *Mobile) AddFiles(dir []byte, threadId string, caption string) ([]byte, error)
- func (m *Mobile) AddFilesByTarget(target string, threadId string, caption string) ([]byte, error)
- func (m *Mobile) AddFlag(blockId string) (string, error)
- func (m *Mobile) AddIgnore(blockId string) (string, error)
- func (m *Mobile) AddInvite(threadId string, address string) error
- func (m *Mobile) AddLike(blockId string) (string, error)
- func (m *Mobile) AddMessage(threadId string, body string) (string, error)
- func (m *Mobile) AddOrUpdateThread(thrd []byte) error
- func (m *Mobile) AddSchema(node []byte) ([]byte, error)
- func (m *Mobile) AddThread(config []byte) ([]byte, error)
- func (m *Mobile) Address() string
- func (m *Mobile) Avatar() (string, error)
- func (m *Mobile) CafeHTTPRequest(id string) ([]byte, error)
- func (m *Mobile) CafeRequestGroupStatus(group string) ([]byte, error)
- func (m *Mobile) CafeRequests(offset string, limit int) ([]byte, error)
- func (m *Mobile) CafeSession(id string) ([]byte, error)
- func (m *Mobile) CafeSessions() ([]byte, error)
- func (m *Mobile) CheckCafeMessages() error
- func (m *Mobile) CleanupCafeRequests() error
- func (m *Mobile) Contact(address string) ([]byte, error)
- func (m *Mobile) ContactThreads(address string) ([]byte, error)
- func (m *Mobile) Contacts() ([]byte, error)
- func (m *Mobile) CountUnreadNotifications() int
- func (m *Mobile) DataAtPath(pth string) ([]byte, error)
- func (m *Mobile) Decrypt(input []byte) ([]byte, error)
- func (m *Mobile) DeregisterCafe(id string) error
- func (m *Mobile) Encrypt(input []byte) ([]byte, error)
- func (m *Mobile) Feed(req []byte) ([]byte, error)
- func (m *Mobile) FileData(hash string) (string, error)
- func (m *Mobile) Files(threadId string, offset string, limit int) ([]byte, error)
- func (m *Mobile) GitSummary() string
- func (m *Mobile) IgnoreInvite(id string) error
- func (m *Mobile) IgnoreInviteViaNotification(id string) error
- func (m *Mobile) ImageFileDataForMinWidth(pth string, minWidth int) (string, error)
- func (m *Mobile) Invites() ([]byte, error)
- func (m *Mobile) Messages(offset string, limit int, threadId string) ([]byte, error)
- func (m *Mobile) Name() (string, error)
- func (m *Mobile) Notifications(offset string, limit int) ([]byte, error)
- func (m *Mobile) OnlineCh() <-chan struct{}
- func (m *Mobile) PeerId() (string, error)
- func (m *Mobile) PrepareFiles(data string, threadId string, cb Callback)
- func (m *Mobile) PrepareFilesByPath(path string, threadId string, cb Callback)
- func (m *Mobile) PrepareFilesByPathSync(path string, threadId string) ([]byte, error)
- func (m *Mobile) PrepareFilesSync(data string, threadId string) ([]byte, error)
- func (m *Mobile) Profile() ([]byte, error)
- func (m *Mobile) ReadAllNotifications() error
- func (m *Mobile) ReadNotification(id string) error
- func (m *Mobile) RefreshCafeSession(id string) ([]byte, error)
- func (m *Mobile) RegisterCafe(host string, token string) error
- func (m *Mobile) RemoveContact(address string) error
- func (m *Mobile) RemoveThread(id string) (string, error)
- func (m *Mobile) RenameThread(id string, name string) error
- func (m *Mobile) SearchContacts(query []byte, options []byte) (*SearchHandle, error)
- func (m *Mobile) SearchThreadSnapshots(query []byte, options []byte) (*SearchHandle, error)
- func (m *Mobile) Seed() string
- func (m *Mobile) SetCafeRequestComplete(id string) error
- func (m *Mobile) SetCafeRequestPending(id string) error
- func (m *Mobile) SetLogLevel(level []byte) error
- func (m *Mobile) SetName(username string) error
- func (m *Mobile) SnapshotThreads() error
- func (m *Mobile) Start() error
- func (m *Mobile) Stop() error
- func (m *Mobile) Summary() ([]byte, error)
- func (m *Mobile) SyncAccount(options []byte) (*SearchHandle, error)
- func (m *Mobile) Thread(id string) ([]byte, error)
- func (m *Mobile) ThreadPeers(id string) ([]byte, error)
- func (m *Mobile) Threads() ([]byte, error)
- func (m *Mobile) Version() string
- type RunConfig
- type SearchHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitRepo ¶ added in v0.1.10
func InitRepo(config *InitConfig) error
InitRepo calls core InitRepo
func MigrateRepo ¶ added in v0.1.10
func MigrateRepo(config *MigrateConfig) error
MigrateRepo calls core MigrateRepo
Types ¶
type Event ¶
Event is sent by Messenger to the bridge (data is a protobuf, name is the string value of a pb.MobileEvent_Type)
type InitConfig ¶ added in v0.1.10
InitConfig is used to setup a textile node
type Messenger ¶
type Messenger interface {
Notify(event *Event)
}
Messenger is a push mechanism to the bridge
type MigrateConfig ¶ added in v0.1.10
type MigrateConfig struct {
RepoPath string
}
MigrateConfig is used to define options during a major migration
type Mobile ¶
type Mobile struct { RepoPath string // contains filtered or unexported fields }
Mobile is the name of the framework (must match package name)
func NewTextile ¶ added in v0.1.10
Create a gomobile compatible wrapper around Textile
func (*Mobile) AcceptExternalInvite ¶ added in v0.1.10
AcceptExternalInvite calls core AcceptExternalInvite
func (*Mobile) AcceptInvite ¶ added in v0.1.12
AcceptInvite calls core AcceptInvite
func (*Mobile) AcceptInviteViaNotification ¶ added in v0.1.10
AcceptInviteViaNotification call core AcceptInviteViaNotification
func (*Mobile) AccountContact ¶ added in v0.1.10
AccountContact calls core AccountContact
func (*Mobile) AccountThread ¶ added in v0.1.13
AccountThread calls core AccountThread
func (*Mobile) AddComment ¶ added in v0.1.10
AddComment adds a comment targeted at the given block
func (*Mobile) AddContact ¶ added in v0.1.10
AddContact calls core AddContact
func (*Mobile) AddExternalInvite ¶ added in v0.1.10
AddExternalInvite generates a new external invite link to a thread
func (*Mobile) AddFilesByTarget ¶ added in v0.1.10
AddFilesByTarget adds a prepared file to a thread by referencing its top level hash
func (*Mobile) AddIgnore ¶ added in v0.1.10
AddIgnore adds an ignore targeted at the given block and unpins any associated target data
func (*Mobile) AddMessage ¶ added in v0.1.10
AddMessage adds a message to a thread
func (*Mobile) AddOrUpdateThread ¶ added in v0.1.10
AddOrUpdateThread calls core AddOrUpdateThread
func (*Mobile) CafeHTTPRequest ¶ added in v0.1.12
CafeHTTPRequest calls core CafeHTTPRequest
func (*Mobile) CafeRequestGroupStatus ¶ added in v0.1.12
CafeRequestGroupStatus calls core CafeRequestGroupStatus
func (*Mobile) CafeRequests ¶ added in v0.1.12
CafeRequests calls core ListCafeRequests
func (*Mobile) CafeSession ¶ added in v0.1.10
CafeSession calls core CafeSession
func (*Mobile) CafeSessions ¶ added in v0.1.10
CafeSessions calls core CafeSessions
func (*Mobile) CheckCafeMessages ¶ added in v0.1.10
CheckCafeMessages calls core CheckCafeMessages
func (*Mobile) CleanupCafeRequests ¶ added in v0.1.12
CleanupCafeRequests calls core CleanupCafeRequests
func (*Mobile) ContactThreads ¶
ContactThreads calls core ContactThreads
func (*Mobile) CountUnreadNotifications ¶
CountUnreadNotifications calls core CountUnreadNotifications
func (*Mobile) DataAtPath ¶ added in v0.1.10
DataAtPath calls core DataAtPath
func (*Mobile) DeregisterCafe ¶ added in v0.1.10
DeegisterCafe calls core DeregisterCafe
func (*Mobile) GitSummary ¶ added in v0.1.10
GitSummary returns common GitSummary
func (*Mobile) IgnoreInvite ¶ added in v0.1.12
IgnoreInvite calls core IgnoreInvite
func (*Mobile) IgnoreInviteViaNotification ¶ added in v0.1.10
IgnoreInviteViaNotification call core IgnoreInviteViaNotification
func (*Mobile) ImageFileDataForMinWidth ¶ added in v0.1.10
ImageFileDataForMinWidth returns a data url of an image at or above requested size, or the next best option. Note: Now that consumers are in control of image sizes via schemas, handling this here doesn't feel right. We can eventually push this up to RN, Obj-C, Java. Note: pth is <target>/<index>, e.g., "Qm.../0"
func (*Mobile) Notifications ¶ added in v0.1.10
Notifications call core Notifications
func (*Mobile) OnlineCh ¶ added in v0.1.10
func (m *Mobile) OnlineCh() <-chan struct{}
OnlineCh returns core OnlineCh
func (*Mobile) PrepareFiles ¶ added in v0.1.10
PrepareFiles processes base64 encoded data for a thread, but does NOT share it
func (*Mobile) PrepareFilesByPath ¶ added in v0.1.10
PrepareFilesByPath processes a file by path for a thread, but does NOT share it
func (*Mobile) PrepareFilesByPathSync ¶ added in v0.1.10
PrepareFilesByPath processes a file by path for a thread, but does NOT share it
func (*Mobile) PrepareFilesSync ¶ added in v0.1.10
PrepareFiles processes base64 encoded data for a thread, but does NOT share it
func (*Mobile) ReadAllNotifications ¶
ReadAllNotifications calls core ReadAllNotifications
func (*Mobile) ReadNotification ¶
ReadNotification calls core ReadNotification
func (*Mobile) RefreshCafeSession ¶ added in v0.1.10
RefreshCafeSession calls core RefreshCafeSession
func (*Mobile) RegisterCafe ¶ added in v0.1.10
RegisterCafe calls core RegisterCafe
func (*Mobile) RemoveContact ¶ added in v0.1.10
RemoveContact calls core RemoveContact
func (*Mobile) RemoveThread ¶
RemoveThread call core RemoveThread
func (*Mobile) RenameThread ¶ added in v0.1.10
RenameThread call core RenameThread
func (*Mobile) SearchContacts ¶ added in v0.1.10
func (m *Mobile) SearchContacts(query []byte, options []byte) (*SearchHandle, error)
SearchContacts calls core SearchContacts
func (*Mobile) SearchThreadSnapshots ¶ added in v0.1.10
func (m *Mobile) SearchThreadSnapshots(query []byte, options []byte) (*SearchHandle, error)
SearchThreadSnapshots calls core SearchThreadSnapshots
func (*Mobile) SetCafeRequestComplete ¶ added in v0.1.12
SetCafeRequestComplete marks a request as complete
func (*Mobile) SetCafeRequestPending ¶ added in v0.1.12
SetCafeRequestPending marks a request as pending
func (*Mobile) SetLogLevel ¶ added in v0.1.10
SetLogLevel calls core SetLogLevel
func (*Mobile) SnapshotThreads ¶ added in v0.1.10
SnapshotThreads calls core SnapshotThreads
func (*Mobile) SyncAccount ¶ added in v0.1.10
func (m *Mobile) SyncAccount(options []byte) (*SearchHandle, error)
SyncAccount calls core SyncAccount
func (*Mobile) ThreadPeers ¶ added in v0.1.10
ThreadPeers calls core ThreadPeers
type RunConfig ¶ added in v0.1.10
type RunConfig struct { RepoPath string Debug bool CafeOutboxHandler core.CafeOutboxHandler }
RunConfig is used to define run options for a mobile node
type SearchHandle ¶ added in v0.1.10
type SearchHandle struct { Id string // contains filtered or unexported fields }
SearchHandle is used to cancel an async search request
func (*SearchHandle) Cancel ¶ added in v0.1.10
func (h *SearchHandle) Cancel()
Cancel is used to cancel the request