Documentation ¶
Index ¶
- func AccountRepoExists(baseRepoPath string, accountAddress string) bool
- func InitRepo(config *InitConfig) error
- func MigrateRepo(config *MigrateConfig) error
- func NewWallet(wordCount int) (string, error)
- func RepoExists(repoPath string) bool
- func WalletAccountAt(mnemonic string, index int, passphrase string) ([]byte, error)
- type Callback
- type DataCallback
- 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) AddData(data string, threadId string, caption string, cb ProtoCallback)
- func (m *Mobile) AddExternalInvite(threadId string) ([]byte, error)
- func (m *Mobile) AddFiles(paths string, threadId string, caption string, cb ProtoCallback)
- 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) CafeRequestNotPending(id string) error
- func (m *Mobile) CafeRequestPending(id string) error
- func (m *Mobile) CafeRequests(limit int) ([]byte, error)
- func (m *Mobile) CafeSession(id string) ([]byte, error)
- func (m *Mobile) CafeSessions() ([]byte, error)
- func (m *Mobile) CancelIpfsPubsubSub(queryId string)
- func (m *Mobile) CheckCafeMessages(cb Callback)
- func (m *Mobile) CompleteCafeRequest(id string) 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, cb DataCallback)
- func (m *Mobile) Decrypt(input []byte) ([]byte, error)
- func (m *Mobile) DeregisterCafe(id string, cb Callback)
- func (m *Mobile) Encrypt(input []byte) ([]byte, error)
- func (m *Mobile) FailCafeRequest(id string, reason string) error
- func (m *Mobile) Feed(req []byte) ([]byte, error)
- func (m *Mobile) File(blockId string) ([]byte, error)
- func (m *Mobile) FileContent(hash string, cb DataCallback)
- 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) ImageFileContentForMinWidth(pth string, minWidth int, cb DataCallback)
- func (m *Mobile) Invites() ([]byte, error)
- func (m *Mobile) IpfsPubsubPub(topic string, data string) error
- func (m *Mobile) IpfsPubsubSub(topic string) (string, 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) Online() bool
- func (m *Mobile) PeerId() (string, 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, cb ProtoCallback)
- func (m *Mobile) RegisterCafe(id string, token string, cb Callback)
- 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) SetAvatar(pth string, cb ProtoCallback)
- func (m *Mobile) SetLogLevel(level []byte) error
- func (m *Mobile) SetName(username string) error
- func (m *Mobile) ShareFiles(data string, threadId string, caption string, cb ProtoCallback)
- func (m *Mobile) Sign(input []byte) ([]byte, error)
- func (m *Mobile) SnapshotThreads() error
- func (m *Mobile) Start() error
- func (m *Mobile) Stop(cb Callback)
- func (m *Mobile) Summary() ([]byte, error)
- func (m *Mobile) SwarmConnect(address string) (string, 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) UpdateCafeRequestProgress(id string, transferred int64, total int64) error
- func (m *Mobile) Verify(input []byte, sig []byte) error
- func (m *Mobile) Version() string
- func (m *Mobile) WaitAdd(delta int, src string)
- func (m *Mobile) WaitDone(src string)
- func (m *Mobile) WriteCafeRequest(group string, cb ProtoCallback)
- type ProtoCallback
- type RunConfig
- type SearchHandle
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AccountRepoExists ¶ added in v0.7.4
AccountRepoExists return whether or not the repo at repoPath exists
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
func NewWallet ¶ added in v0.1.10
NewWallet creates a brand new wallet and returns its recovery phrase
func RepoExists ¶ added in v0.7.4
RepoExists return whether or not the repo at repoPath exists
Types ¶
type Callback ¶ added in v0.1.10
type Callback interface {
Call(err error)
}
Callback is used for asyc methods
type DataCallback ¶ added in v0.5.0
DataCallback is used for asyc methods that deliver raw data
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
type InitConfig struct { Seed string RepoPath string BaseRepoPath string LogToDisk bool Debug bool }
InitConfig is used to setup a textile node
func (InitConfig) Repo ¶ added in v0.7.4
func (conf InitConfig) Repo() (string, error)
Repo returns the actual location of the configured repo
func (InitConfig) RepoExists ¶ added in v0.7.2
func (conf InitConfig) RepoExists() (bool, error)
RepoExists return whether or not the configured repo already exists
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) AddData ¶ added in v0.3.0
func (m *Mobile) AddData(data string, threadId string, caption string, cb ProtoCallback)
AddData adds raw data to a thread
func (*Mobile) AddExternalInvite ¶ added in v0.1.10
AddExternalInvite generates a new external invite link to a thread
func (*Mobile) AddFiles ¶ added in v0.1.10
func (m *Mobile) AddFiles(paths string, threadId string, caption string, cb ProtoCallback)
AddFiles builds a directory from paths (comma separated) and adds it to the thread Note: paths can be file system paths, IPFS hashes, or an existing file hash that may need decryption.
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) CafeRequestNotPending ¶ added in v0.4.2
CafeRequestNotPending marks a request as not pending (new)
func (*Mobile) CafeRequestPending ¶ added in v0.3.0
CafeRequestPending marks a request as pending
func (*Mobile) CafeRequests ¶ added in v0.1.12
CafeRequests paginates new requests
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) CancelIpfsPubsubSub ¶ added in v0.7.6
CancelIpfsPubsubSub is used to cancel the request
func (*Mobile) CheckCafeMessages ¶ added in v0.1.10
CheckCafeMessages is the async flavor of checkCafeMessages
func (*Mobile) CompleteCafeRequest ¶ added in v0.3.0
CompleteCafeRequest marks a request as complete
func (*Mobile) ContactThreads ¶
ContactThreads calls core ContactThreads
func (*Mobile) CountUnreadNotifications ¶
CountUnreadNotifications calls core CountUnreadNotifications
func (*Mobile) DataAtPath ¶ added in v0.1.10
func (m *Mobile) DataAtPath(pth string, cb DataCallback)
DataAtPath is the async version of dataAtPath
func (*Mobile) DeregisterCafe ¶ added in v0.1.10
DeegisterCafe is the async flavor of deregisterCafe
func (*Mobile) FailCafeRequest ¶ added in v0.3.0
FailCafeRequest deletes a request
func (*Mobile) FileContent ¶ added in v0.2.0
func (m *Mobile) FileContent(hash string, cb DataCallback)
FileContent is the async version of fileContent
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) ImageFileContentForMinWidth ¶ added in v0.2.0
func (m *Mobile) ImageFileContentForMinWidth(pth string, minWidth int, cb DataCallback)
ImageFileContentForMinWidth is the async version of imageFileContentForMinWidth
func (*Mobile) IpfsPubsubPub ¶ added in v0.7.6
IpfsPubsubPub publishes a message to a given pubsub topic
func (*Mobile) IpfsPubsubSub ¶ added in v0.7.6
IpfsPubsubSub Subscribes to messages on a given topic
func (*Mobile) Notifications ¶ added in v0.1.10
Notifications call core Notifications
func (*Mobile) ReadAllNotifications ¶
ReadAllNotifications calls core ReadAllNotifications
func (*Mobile) ReadNotification ¶
ReadNotification calls core ReadNotification
func (*Mobile) RefreshCafeSession ¶ added in v0.1.10
func (m *Mobile) RefreshCafeSession(id string, cb ProtoCallback)
RefreshCafeSession is the async flavor of refreshCafeSession
func (*Mobile) RegisterCafe ¶ added in v0.1.10
RegisterCafe is the async flavor of 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) SetAvatar ¶ added in v0.1.10
func (m *Mobile) SetAvatar(pth string, cb ProtoCallback)
SetAvatar adds the image at pth to the account thread and calls core SetAvatar
func (*Mobile) SetLogLevel ¶ added in v0.1.10
SetLogLevel calls core SetLogLevel
func (*Mobile) ShareFiles ¶ added in v0.3.0
func (m *Mobile) ShareFiles(data string, threadId string, caption string, cb ProtoCallback)
ShareFiles adds an existing file DAG to a thread via its top level hash (data)
func (*Mobile) SnapshotThreads ¶ added in v0.1.10
SnapshotThreads calls core SnapshotThreads
func (*Mobile) SwarmConnect ¶ added in v0.7.2
SwarmConnect opens a new direct connection to a peer using an IPFS multiaddr
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
func (*Mobile) UpdateCafeRequestProgress ¶ added in v0.4.2
UpdateCafeRequestProgress updates the request with progress info
func (*Mobile) WriteCafeRequest ¶ added in v0.3.0
func (m *Mobile) WriteCafeRequest(group string, cb ProtoCallback)
WriteCafeRequest is the async version of writeCafeRequest
type ProtoCallback ¶ added in v0.5.0
ProtoCallback is used for asyc methods that deliver a protobuf message
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