Documentation ¶
Index ¶
- Constants
- Variables
- func FeedItemType(item *pb.FeedItem) (pb.Block_BlockType, error)
- func GetRandomPort() string
- func InitRepo(conf InitConfig) error
- func MigrateRepo(conf MigrateConfig) error
- type AddFileConfig
- type BlockOutbox
- type CafeInbox
- type CafeOutbox
- type CafeService
- func (h *CafeService) CheckMessages(cafe peer.ID) error
- func (h *CafeService) DeleteMessages(cafe peer.ID) error
- func (h *CafeService) DeliverMessage(mid string, pid peer.ID, cafe *pb.Cafe) error
- func (h *CafeService) Deregister(cafe peer.ID) error
- func (h *CafeService) Handle(pid peer.ID, env *pb.Envelope) (*pb.Envelope, error)
- func (h *CafeService) HandleStream(pid peer.ID, env *pb.Envelope) (chan *pb.Envelope, chan error, chan interface{})
- func (h *CafeService) Ping(pid peer.ID) (service.PeerStatus, error)
- func (h *CafeService) Protocol() protocol.ID
- func (h *CafeService) PublishPeer(peer *pb.Peer, cafe peer.ID) error
- func (h *CafeService) Register(host string, token string) (*pb.CafeSession, error)
- func (h *CafeService) Search(query *pb.Query, cafe peer.ID, reply func(*pb.QueryResult), ...) error
- func (h *CafeService) Start()
- func (h *CafeService) Store(cids []string, cafe peer.ID) ([]string, error)
- func (h *CafeService) StoreThread(thrd *pb.Thread, cafe peer.ID) error
- func (h *CafeService) Unstore(cids []string, cafe peer.ID) ([]string, error)
- func (h *CafeService) UnstoreThread(id string, cafe peer.ID) error
- type FeedItemPayload
- type InitConfig
- type MigrateConfig
- type PinResponse
- type RunConfig
- type SubsystemInfo
- type Textile
- func (t *Textile) AcceptExternalInvite(inviteId string, key []byte) (mh.Multihash, error)
- func (t *Textile) AcceptInvite(inviteId string) (mh.Multihash, error)
- func (t *Textile) AcceptInviteViaNotification(id string) (mh.Multihash, error)
- func (t *Textile) Account() *keypair.Full
- func (t *Textile) AccountContact() *pb.Contact
- func (t *Textile) AccountThread() *Thread
- func (t *Textile) AddContact(card *pb.Contact) error
- func (t *Textile) AddExternalInvite(threadId string) (*pb.ExternalInvite, error)
- func (t *Textile) AddFileIndex(mill m.Mill, conf AddFileConfig) (*pb.FileIndex, error)
- func (t *Textile) AddInvite(threadId string, address string) error
- func (t *Textile) AddNodeFromDirs(dirs *pb.DirectoryList) (ipld.Node, *pb.Keys, error)
- func (t *Textile) AddNodeFromFiles(files []*pb.FileIndex) (ipld.Node, *pb.Keys, error)
- func (t *Textile) AddOrUpdateThread(thrd *pb.Thread) error
- func (t *Textile) AddSchema(jsonstr string, name string) (*pb.FileIndex, error)
- func (t *Textile) AddThread(conf pb.AddThreadConfig, sk libp2pc.PrivKey, initiator string, join bool, ...) (*Thread, error)
- func (t *Textile) ApiAddr() string
- func (t *Textile) Avatar() string
- func (t *Textile) Block(id string) (*pb.Block, error)
- func (t *Textile) BlockView(id string) (*pb.Block, error)
- func (t *Textile) Blocks(offset string, limit int, query string) *pb.BlockList
- func (t *Textile) BlocksByTarget(target string) *pb.BlockList
- func (t *Textile) CafeApiAddr() string
- func (t *Textile) CafeInfo() *pb.Cafe
- func (t *Textile) CafeSession(peerId string) (*pb.CafeSession, error)
- func (t *Textile) CafeSessions() *pb.CafeSessionList
- func (t *Textile) CafeTokens() ([]string, error)
- func (t *Textile) CheckCafeMessages() error
- func (t *Textile) CloseChns()
- func (t *Textile) Comment(blockId string) (*pb.Comment, error)
- func (t *Textile) Comments(target string) (*pb.CommentList, error)
- func (t *Textile) Config() *config.Config
- func (t *Textile) Contact(address string) *pb.Contact
- func (t *Textile) ContactThreads(address string) (*pb.ThreadList, error)
- func (t *Textile) Contacts() *pb.ContactList
- func (t *Textile) CountUnreadNotifications() int
- func (t *Textile) CreateCafeToken(token string, store bool) (string, error)
- func (t *Textile) DataAtPath(path string) ([]byte, error)
- func (t *Textile) Decrypt(input []byte) ([]byte, error)
- func (t *Textile) DeregisterCafe(peerId string) error
- func (t *Textile) DoneCh() <-chan struct{}
- func (t *Textile) Encrypt(input []byte) ([]byte, error)
- func (t *Textile) Feed(req *pb.FeedRequest) (*pb.FeedItemList, error)
- func (t *Textile) File(blockId string) (*pb.Files, error)
- func (t *Textile) FileData(hash string) (io.ReadSeeker, *pb.FileIndex, error)
- func (t *Textile) FileIndex(hash string) (*pb.FileIndex, error)
- func (t *Textile) Files(offset string, limit int, threadId string) (*pb.FilesList, error)
- func (t *Textile) GetMedia(reader io.Reader, mill m.Mill) (string, error)
- func (t *Textile) IgnoreInvite(inviteId string) error
- func (t *Textile) IgnoreInviteViaNotification(id string) error
- func (t *Textile) InviteView(invite *pb.Invite) *pb.InviteView
- func (t *Textile) Invites() *pb.InviteViewList
- func (t *Textile) Ipfs() *core.IpfsNode
- func (t *Textile) Like(blockId string) (*pb.Like, error)
- func (t *Textile) Likes(target string) (*pb.LikeList, error)
- func (t *Textile) LinksAtPath(path string) ([]*ipld.Link, error)
- func (t *Textile) Message(blockId string) (*pb.Text, error)
- func (t *Textile) Messages(offset string, limit int, threadId string) (*pb.TextList, error)
- func (t *Textile) Mobile() bool
- func (t *Textile) Name() string
- func (t *Textile) NotificationCh() <-chan *pb.Notification
- func (t *Textile) NotificationView(note *pb.Notification) *pb.Notification
- func (t *Textile) Notifications(offset string, limit int) *pb.NotificationList
- func (t *Textile) Online() bool
- func (t *Textile) OnlineCh() <-chan struct{}
- func (t *Textile) PeerId() (peer.ID, error)
- func (t *Textile) PeerUser(id string) *pb.User
- func (t *Textile) Ping(pid peer.ID) (service.PeerStatus, error)
- func (t *Textile) Profile() *pb.Peer
- func (t *Textile) ReadAllNotifications() error
- func (t *Textile) ReadNotification(id string) error
- func (t *Textile) RefreshCafeSession(peerId string) (*pb.CafeSession, error)
- func (t *Textile) RegisterCafe(host string, token string) (*pb.CafeSession, error)
- func (t *Textile) RemoveCafeToken(token string) error
- func (t *Textile) RemoveContact(address string) error
- func (t *Textile) RemoveThread(id string) (mh.Multihash, error)
- func (t *Textile) RenameThread(id string, name string) error
- func (t *Textile) RepoPath() string
- func (t *Textile) SearchContacts(query *pb.ContactQuery, options *pb.QueryOptions) (<-chan *pb.QueryResult, <-chan error, *broadcast.Broadcaster, error)
- func (t *Textile) SearchThreadSnapshots(query *pb.ThreadSnapshotQuery, options *pb.QueryOptions) (<-chan *pb.QueryResult, <-chan error, *broadcast.Broadcaster, error)
- func (t *Textile) SetAvatar(hash string) error
- func (t *Textile) SetLogLevel(level *pb.LogLevel) error
- func (t *Textile) SetName(name string) error
- func (t *Textile) Sign(input []byte) ([]byte, error)
- func (t *Textile) SnapshotThreads() error
- func (t *Textile) Start() error
- func (t *Textile) StartApi(addr string, serveDocs bool)
- func (t *Textile) Started() bool
- func (t *Textile) Stop() error
- func (t *Textile) StopApi() error
- func (t *Textile) Summary() *pb.Summary
- func (t *Textile) SyncAccount(options *pb.QueryOptions) (*broadcast.Broadcaster, error)
- func (t *Textile) TargetNodeKeys(node ipld.Node) (*pb.Keys, error)
- func (t *Textile) Thread(id string) *Thread
- func (t *Textile) ThreadByKey(key string) *Thread
- func (t *Textile) ThreadPeers(id string) (*pb.PeerList, error)
- func (t *Textile) ThreadUpdateListener() *broadcast.Listener
- func (t *Textile) ThreadView(id string) (*pb.Thread, error)
- func (t *Textile) Threads() []*Thread
- func (t *Textile) UpdateCh() <-chan *pb.WalletUpdate
- func (t *Textile) ValidateCafeToken(token string) (bool, error)
- func (t *Textile) Verify(input []byte, sig []byte) error
- func (t *Textile) Writer() io.Writer
- type Thread
- func (t *Thread) AddComment(target string, body string) (mh.Multihash, error)
- func (t *Thread) AddExternalInvite() (mh.Multihash, []byte, error)
- func (t *Thread) AddFiles(node ipld.Node, caption string, keys map[string]string) (mh.Multihash, error)
- func (t *Thread) AddFlag(block string) (mh.Multihash, error)
- func (t *Thread) AddIgnore(block string) (mh.Multihash, error)
- func (t *Thread) AddInvite(p *pb.Peer) (mh.Multihash, error)
- func (t *Thread) AddLike(target string) (mh.Multihash, error)
- func (t *Thread) AddMessage(body string) (mh.Multihash, error)
- func (t *Thread) Decrypt(data []byte) ([]byte, error)
- func (t *Thread) Encrypt(data []byte) ([]byte, error)
- func (t *Thread) Head() (string, error)
- func (t *Thread) Peers() []pb.ThreadPeer
- type ThreadConfig
- type ThreadsService
- func (h *ThreadsService) Handle(pid peer.ID, env *pb.Envelope) (*pb.Envelope, error)
- func (h *ThreadsService) HandleStream(pid peer.ID, env *pb.Envelope) (chan *pb.Envelope, chan error, chan interface{})
- func (h *ThreadsService) NewEnvelope(threadId string, hash mh.Multihash, ciphertext []byte, sig []byte) (*pb.Envelope, error)
- func (h *ThreadsService) Ping(pid peer.ID) (service.PeerStatus, error)
- func (h *ThreadsService) Protocol() protocol.ID
- func (h *ThreadsService) SendMessage(ctx context.Context, pid peer.ID, env *pb.Envelope) error
- func (h *ThreadsService) Start()
Constants ¶
const DataLinkName = "d"
const FileLinkName = "f"
Variables ¶
var ErrAccountRequired = errors.New("account required")
common errors
var ErrBlockExists = errors.New("block exists")
ErrBlockExists indicates a block has already been indexed
var ErrBlockNotFound = errors.New("block not found")
ErrBlockNotFound indicates a block was not found in the index
var ErrBlockWrongType = errors.New("block type is not the type requested")
ErrBlockWrongType indicates a block was requested as a type other than its own
var ErrContactNotFound = errors.New("contact not found")
ErrContactNotFound indicates a local contact was not found
var ErrFileNotFound = errors.New("file not found")
var ErrInvalidFileNode = errors.New("invalid files node")
ErrInvalidFileNode indicates files where added via a nil ipld node
var ErrInvalidThreadBlock = errors.New("invalid thread block")
ErrInvalidThreadBlock is a catch all error for malformed / invalid blocks
var ErrJsonSchemaRequired = errors.New("thread schema does not allow json files")
ErrJsonSchemaRequired indicates json files where added without a json schema
var ErrMissingDataLink = errors.New("data link not in node")
var ErrMissingFileLink = errors.New("file link not in node")
var ErrNotAnnotatable = errors.New("thread is not annotatable")
ErrNotAnnotatable indicates the thread is not annotatable (comments/likes)
var ErrNotReadable = errors.New("thread is not readable")
ErrNotReadable indicates the thread is not readable
ErrNotShareable indicates the thread does not allow invites, at least for _you_
var ErrNotWritable = errors.New("thread is not writable")
ErrNotWritable indicates the thread is not writable (files/messages)
var ErrOffline = errors.New("node is offline")
var ErrStarted = errors.New("node is started")
var ErrStopped = errors.New("node is stopped")
var ErrThreadInviteNotFound = errors.New("thread invite not found")
ErrThreadInviteNotFound indicates thread invite is not found
var ErrThreadLoaded = errors.New("thread is loaded")
ErrThreadLoaded indicates the thread is already loaded from the datastore
var ErrThreadNotFound = errors.New("thread not found")
ErrThreadNotFound indicates thread is not found in the loaded list
var ErrThreadSchemaRequired = errors.New("thread schema required to add files")
ErrThreadSchemaRequired indicates files where added without a thread schema
Functions ¶
func FeedItemType ¶ added in v0.1.10
func FeedItemType(item *pb.FeedItem) (pb.Block_BlockType, error)
func GetRandomPort ¶ added in v0.1.10
func GetRandomPort() string
GetRandomPort returns a port within the acceptable range
func InitRepo ¶ added in v0.1.10
func InitRepo(conf InitConfig) error
InitRepo initializes a new node repo
func MigrateRepo ¶ added in v0.1.10
func MigrateRepo(conf MigrateConfig) error
MigrateRepo runs _all_ repo migrations, including major
Types ¶
type AddFileConfig ¶ added in v0.1.10
type BlockOutbox ¶ added in v0.1.10
type BlockOutbox struct {
// contains filtered or unexported fields
}
BlockOutbox queues and processes outbound thread messages
func NewBlockOutbox ¶ added in v0.1.10
func NewBlockOutbox( service func() *ThreadsService, node func() *core.IpfsNode, datastore repo.Datastore, cafeOutbox *CafeOutbox, ) *BlockOutbox
NewBlockOutbox creates a new outbox queue
func (*BlockOutbox) Flush ¶ added in v0.1.10
func (q *BlockOutbox) Flush()
Flush processes pending messages
type CafeInbox ¶ added in v0.1.10
type CafeInbox struct {
// contains filtered or unexported fields
}
CafeInbox queues and processes outbound thread messages
func NewCafeInbox ¶ added in v0.1.10
func NewCafeInbox( service func() *CafeService, threadsService func() *ThreadsService, node func() *core.IpfsNode, datastore repo.Datastore, ) *CafeInbox
NewCafeInbox creates a new inbox queue
func (*CafeInbox) Add ¶ added in v0.1.10
func (q *CafeInbox) Add(msg *pb.CafeMessage) error
Add adds an inbound message
func (*CafeInbox) CheckMessages ¶ added in v0.1.10
CheckMessages asks each active cafe session for new messages
type CafeOutbox ¶ added in v0.1.10
type CafeOutbox struct {
// contains filtered or unexported fields
}
CafeOutbox queues and processes outbound cafe requests
func NewCafeOutbox ¶ added in v0.1.10
func NewCafeOutbox( service func() *CafeService, node func() *core.IpfsNode, datastore repo.Datastore, ) *CafeOutbox
NewCafeOutbox creates a new outbox queue
func (*CafeOutbox) Add ¶ added in v0.1.10
func (q *CafeOutbox) Add(target string, rtype pb.CafeRequest_Type) error
Add adds a request for each active cafe session
func (*CafeOutbox) Flush ¶ added in v0.1.10
func (q *CafeOutbox) Flush()
Flush processes pending requests
func (*CafeOutbox) InboxRequest ¶ added in v0.1.10
InboxRequest adds a request for a peer's inbox(es)
type CafeService ¶ added in v0.1.10
type CafeService struct {
// contains filtered or unexported fields
}
CafeService is a libp2p pinning and offline message service
func NewCafeService ¶ added in v0.1.10
func NewCafeService( account *keypair.Full, node func() *core.IpfsNode, datastore repo.Datastore, inbox *CafeInbox, ) *CafeService
NewCafeService returns a new threads service
func (*CafeService) CheckMessages ¶ added in v0.1.10
func (h *CafeService) CheckMessages(cafe peer.ID) error
CheckMessages asks each session's inbox for new messages
func (*CafeService) DeleteMessages ¶ added in v0.1.10
func (h *CafeService) DeleteMessages(cafe peer.ID) error
DeleteMessages deletes a page of messages from a cafe
func (*CafeService) DeliverMessage ¶ added in v0.1.10
func (h *CafeService) DeliverMessage(mid string, pid peer.ID, cafe *pb.Cafe) error
DeliverMessage delivers a message content id to a peer's cafe inbox TODO: unpin message locally after it's delivered
func (*CafeService) Deregister ¶ added in v0.1.10
func (h *CafeService) Deregister(cafe peer.ID) error
Deregister removes this peer from a cafe
func (*CafeService) Handle ¶ added in v0.1.10
Handle is called by the underlying service handler method
func (*CafeService) HandleStream ¶ added in v0.1.10
func (h *CafeService) HandleStream(pid peer.ID, env *pb.Envelope) (chan *pb.Envelope, chan error, chan interface{})
HandleStream is called by the underlying service handler method
func (*CafeService) Ping ¶ added in v0.1.10
func (h *CafeService) Ping(pid peer.ID) (service.PeerStatus, error)
Ping pings another peer
func (*CafeService) Protocol ¶ added in v0.1.10
func (h *CafeService) Protocol() protocol.ID
Protocol returns the handler protocol
func (*CafeService) PublishPeer ¶ added in v0.1.10
func (h *CafeService) PublishPeer(peer *pb.Peer, cafe peer.ID) error
PublishPeer publishes the local peer's info
func (*CafeService) Register ¶ added in v0.1.10
func (h *CafeService) Register(host string, token string) (*pb.CafeSession, error)
Register creates a session with a cafe
func (*CafeService) Search ¶ added in v0.1.10
func (h *CafeService) Search(query *pb.Query, cafe peer.ID, reply func(*pb.QueryResult), cancelCh <-chan interface{}) error
Search performs a query via a cafe
func (*CafeService) Start ¶ added in v0.1.10
func (h *CafeService) Start()
Start begins online services
func (*CafeService) Store ¶ added in v0.1.10
func (h *CafeService) Store(cids []string, cafe peer.ID) ([]string, error)
Store stores (pins) content on a cafe and returns a list of successful cids
func (*CafeService) StoreThread ¶ added in v0.1.10
func (h *CafeService) StoreThread(thrd *pb.Thread, cafe peer.ID) error
StoreThread pushes a thread to a cafe backup
func (*CafeService) Unstore ¶ added in v0.1.10
func (h *CafeService) Unstore(cids []string, cafe peer.ID) ([]string, error)
Unstore unstores (unpins) content on a cafe and returns a list of successful cids
func (*CafeService) UnstoreThread ¶ added in v0.1.10
func (h *CafeService) UnstoreThread(id string, cafe peer.ID) error
UnstoreThread removes a cafe's thread backup
type FeedItemPayload ¶ added in v0.1.10
type FeedItemPayload interface { GetUser() *pb.User GetDate() *timestamp.Timestamp Reset() String() string ProtoMessage() }
func GetFeedItemPayload ¶ added in v0.1.10
func GetFeedItemPayload(item *pb.FeedItem) (FeedItemPayload, error)
type InitConfig ¶ added in v0.1.10
type InitConfig struct { Account *keypair.Full PinCode string RepoPath string SwarmPorts string ApiAddr string CafeApiAddr string GatewayAddr string IsMobile bool IsServer bool LogToDisk bool Debug bool CafeOpen bool CafePublicIP string CafeURL string CafeNeighborURL string }
InitConfig is used to setup a textile node
type MigrateConfig ¶ added in v0.1.10
MigrateConfig is used to define options during a major migration
type PinResponse ¶ added in v0.1.10
PinResponse is the json response from a pin request
type SubsystemInfo ¶ added in v0.1.10
type Textile ¶ added in v0.1.10
type Textile struct {
// contains filtered or unexported fields
}
Textile is the main Textile node structure
func NewTextile ¶ added in v0.1.10
NewTextile runs a node out of an initialized repo
func (*Textile) AcceptExternalInvite ¶ added in v0.1.10
AcceptExternalInvite attemps to download an encrypted thread key from an external invite, adds a new thread, and notifies the inviter of the join
func (*Textile) AcceptInvite ¶ added in v0.1.10
AcceptInvite adds a new thread, and notifies the inviter of the join
func (*Textile) AcceptInviteViaNotification ¶ added in v0.1.10
AcceptInviteViaNotification uses an invite notification to accept an invite to a thread
func (*Textile) AccountContact ¶ added in v0.1.10
AccountContact returns a contact for this account
func (*Textile) AccountThread ¶ added in v0.1.10
AccountThread returns the account private thread
func (*Textile) AddContact ¶ added in v0.1.10
AddContact adds or updates a card
func (*Textile) AddExternalInvite ¶ added in v0.1.10
func (t *Textile) AddExternalInvite(threadId string) (*pb.ExternalInvite, error)
AddExternalInvite generates a new external invite link to a thread
func (*Textile) AddFileIndex ¶ added in v0.1.10
func (*Textile) AddInvite ¶ added in v0.1.10
AddInvite creates an invite for each of the target address's peers
func (*Textile) AddNodeFromDirs ¶ added in v0.1.10
func (*Textile) AddNodeFromFiles ¶ added in v0.1.10
func (*Textile) AddOrUpdateThread ¶ added in v0.1.10
AddOrUpdateThread add or updates a thread directly, usually from a backup
func (*Textile) AddThread ¶ added in v0.1.10
func (t *Textile) AddThread(conf pb.AddThreadConfig, sk libp2pc.PrivKey, initiator string, join bool, inviteAccount bool) (*Thread, error)
AddThread adds a thread with a given name and secret key
func (*Textile) BlocksByTarget ¶ added in v0.1.10
BlocksByTarget returns block with parent
func (*Textile) CafeApiAddr ¶ added in v0.1.10
CafeApiAddr returns the cafe api address
func (*Textile) CafeSession ¶ added in v0.1.10
func (t *Textile) CafeSession(peerId string) (*pb.CafeSession, error)
CafeSession returns an active session by id
func (*Textile) CafeSessions ¶ added in v0.1.10
func (t *Textile) CafeSessions() *pb.CafeSessionList
CafeSessions lists active cafe sessions
func (*Textile) CafeTokens ¶ added in v0.1.10
CafeTokens lists all locally-stored (bcrypt hashed) tokens
func (*Textile) CheckCafeMessages ¶ added in v0.1.10
CheckCafeMessages fetches new messages from registered cafes
func (*Textile) CloseChns ¶ added in v0.1.10
func (t *Textile) CloseChns()
CloseChns closes update channels
func (*Textile) Comments ¶ added in v0.1.10
func (t *Textile) Comments(target string) (*pb.CommentList, error)
func (*Textile) ContactThreads ¶ added in v0.1.10
func (t *Textile) ContactThreads(address string) (*pb.ThreadList, error)
ContactThreads returns all threads with the given address
func (*Textile) Contacts ¶ added in v0.1.10
func (t *Textile) Contacts() *pb.ContactList
Contacts returns all known contacts, excluding self
func (*Textile) CountUnreadNotifications ¶ added in v0.1.10
CountUnreadNotifications counts unread notifications
func (*Textile) CreateCafeToken ¶ added in v0.1.10
CreateCafeToken creates (or uses `token`) random access token, returns base58 encoded version, and stores (unless `store` is false) a bcrypt hashed version for later comparison
func (*Textile) DataAtPath ¶ added in v0.1.10
DataAtPath returns raw data behind an ipfs path
func (*Textile) DeregisterCafe ¶ added in v0.1.10
DeregisterCafe removes the session associated with the given cafe
func (*Textile) DoneCh ¶ added in v0.1.10
func (t *Textile) DoneCh() <-chan struct{}
DoneCh returns the core node done channel
func (*Textile) Feed ¶ added in v0.1.10
func (t *Textile) Feed(req *pb.FeedRequest) (*pb.FeedItemList, error)
func (*Textile) IgnoreInvite ¶ added in v0.1.10
IgnoreInvite deletes the invite and removes the associated notification.
func (*Textile) IgnoreInviteViaNotification ¶ added in v0.1.10
IgnoreInviteViaNotification uses an invite notification to ignore an invite to a thread
func (*Textile) InviteView ¶ added in v0.1.10
func (t *Textile) InviteView(invite *pb.Invite) *pb.InviteView
InviteView gets a pending invite as a view object, which does not include the block payload
func (*Textile) Invites ¶ added in v0.1.10
func (t *Textile) Invites() *pb.InviteViewList
Invites lists info on all pending invites
func (*Textile) LinksAtPath ¶ added in v0.1.10
LinksAtPath returns ipld links behind an ipfs path
func (*Textile) Mobile ¶ added in v0.1.10
Mobile returns whether or not node is configured for a mobile device
func (*Textile) NotificationCh ¶ added in v0.1.10
func (t *Textile) NotificationCh() <-chan *pb.Notification
NotificationsCh returns the notifications channel
func (*Textile) NotificationView ¶ added in v0.1.10
func (t *Textile) NotificationView(note *pb.Notification) *pb.Notification
NotificationView returns a notification with expanded view info
func (*Textile) Notifications ¶ added in v0.1.10
func (t *Textile) Notifications(offset string, limit int) *pb.NotificationList
Notifications lists notifications
func (*Textile) OnlineCh ¶ added in v0.1.10
func (t *Textile) OnlineCh() <-chan struct{}
OnlineCh returns the online channel
func (*Textile) PeerUser ¶ added in v0.1.10
PeerUser returns a user object with the most recently updated contact for the given id Note: If no underlying contact is found, this will return an blank object w/ a generic user name for display-only purposes.
func (*Textile) Ping ¶ added in v0.1.10
func (t *Textile) Ping(pid peer.ID) (service.PeerStatus, error)
Ping pings another peer
func (*Textile) ReadAllNotifications ¶ added in v0.1.10
ReadAllNotifications marks all notification as read
func (*Textile) ReadNotification ¶ added in v0.1.10
ReadNotification marks a notification as read
func (*Textile) RefreshCafeSession ¶ added in v0.1.10
func (t *Textile) RefreshCafeSession(peerId string) (*pb.CafeSession, error)
RefreshCafeSession attempts to refresh a token with a cafe
func (*Textile) RegisterCafe ¶ added in v0.1.10
RegisterCafe registers this account with another peer (the "cafe"), which provides a session token for the service
func (*Textile) RemoveCafeToken ¶ added in v0.1.10
RemoveCafeToken removes a given cafe token from the local store
func (*Textile) RemoveContact ¶ added in v0.1.10
RemoveContact removes all contacts that share the given address
func (*Textile) RemoveThread ¶ added in v0.1.10
RemoveThread removes a thread
func (*Textile) RenameThread ¶ added in v0.1.10
RenameThread adds an announce block to the thread w/ a new name Note: Only thread initiators can update the thread's name
func (*Textile) SearchContacts ¶ added in v0.1.10
func (t *Textile) SearchContacts(query *pb.ContactQuery, options *pb.QueryOptions) (<-chan *pb.QueryResult, <-chan error, *broadcast.Broadcaster, error)
SearchContacts searches the network for peers and returns contacts
func (*Textile) SearchThreadSnapshots ¶ added in v0.1.10
func (t *Textile) SearchThreadSnapshots(query *pb.ThreadSnapshotQuery, options *pb.QueryOptions) (<-chan *pb.QueryResult, <-chan error, *broadcast.Broadcaster, error)
SearchThreadSnapshots searches the network for snapshots
func (*Textile) SetAvatar ¶ added in v0.1.10
SetAvatar updates profile with a new avatar at the given file hash.
func (*Textile) SetLogLevel ¶ added in v0.1.10
SetLogLevel provides node scoped access to the logging system
func (*Textile) SnapshotThreads ¶ added in v0.1.10
SnapshotThreads creates a store thread request for all threads
func (*Textile) SyncAccount ¶ added in v0.1.10
func (t *Textile) SyncAccount(options *pb.QueryOptions) (*broadcast.Broadcaster, error)
SyncAccount performs a thread backup search and applies the result
func (*Textile) TargetNodeKeys ¶ added in v0.1.10
func (*Textile) ThreadByKey ¶ added in v0.1.10
ThreadByKey get a thread by key from loaded threads
func (*Textile) ThreadPeers ¶ added in v0.1.10
ThreadPeers returns a list of thread peers
func (*Textile) ThreadUpdateListener ¶ added in v0.1.10
ThreadUpdateListener returns the thread update channel
func (*Textile) ThreadView ¶ added in v0.1.10
ThreadView returns a thread with expanded view properties
func (*Textile) UpdateCh ¶ added in v0.1.10
func (t *Textile) UpdateCh() <-chan *pb.WalletUpdate
UpdateCh returns the node update channel
func (*Textile) ValidateCafeToken ¶ added in v0.1.10
ValidateCafeToken checks whether a supplied base58 encoded token matches the locally-stored bcrypt hashed equivalent
type Thread ¶ added in v0.1.10
type Thread struct { Id string Key string // app key, usually UUID Name string Schema *pb.Node // contains filtered or unexported fields }
Thread is the primary mechanism representing a collecion of data / files / photos
func NewThread ¶ added in v0.1.10
func NewThread(model *pb.Thread, conf *ThreadConfig) (*Thread, error)
NewThread create a new Thread from a repo model and config
func (*Thread) AddComment ¶ added in v0.1.10
AddComment adds an outgoing comment block
func (*Thread) AddExternalInvite ¶ added in v0.1.10
AddExternalInvite creates an add block, which can be retrieved by any peer and does not become part of the hash chain
func (*Thread) AddFiles ¶ added in v0.1.10
func (t *Thread) AddFiles(node ipld.Node, caption string, keys map[string]string) (mh.Multihash, error)
AddFile adds an outgoing files block
func (*Thread) AddFlag ¶ added in v0.1.10
AddFlag adds an outgoing flag block targeted at another block to flag
func (*Thread) AddIgnore ¶ added in v0.1.10
AddIgnore adds an outgoing ignore block targeted at another block to ignore
func (*Thread) AddInvite ¶ added in v0.1.10
AddInvite creates an outgoing add block, which is sent directly to the recipient and does not become part of the hash chain
func (*Thread) AddMessage ¶ added in v0.1.10
AddMessage adds an outgoing message block
func (*Thread) Peers ¶ added in v0.1.10
func (t *Thread) Peers() []pb.ThreadPeer
Peers returns locally known peers in this thread
type ThreadConfig ¶ added in v0.1.10
type ThreadConfig struct { RepoPath string Config *config.Config Account *keypair.Full Node func() *core.IpfsNode Datastore repo.Datastore Service func() *ThreadsService BlockOutbox *BlockOutbox CafeOutbox *CafeOutbox AddPeer func(*pb.Peer) error PushUpdate func(*pb.Block, string) }
ThreadConfig is used to construct a Thread
type ThreadsService ¶ added in v0.1.10
type ThreadsService struct {
// contains filtered or unexported fields
}
ThreadService is a libp2p service for orchestrating a collection of files with annotations amongst a group of peers
func NewThreadsService ¶ added in v0.1.10
func NewThreadsService( account *keypair.Full, node func() *core.IpfsNode, datastore repo.Datastore, getThread func(string) *Thread, addThread func([]byte) (mh.Multihash, error), removeThread func(string) (mh.Multihash, error), sendNotification func(*pb.Notification) error, ) *ThreadsService
NewThreadsService returns a new threads service
func (*ThreadsService) Handle ¶ added in v0.1.10
Handle is called by the underlying service handler method
func (*ThreadsService) HandleStream ¶ added in v0.1.10
func (h *ThreadsService) HandleStream(pid peer.ID, env *pb.Envelope) (chan *pb.Envelope, chan error, chan interface{})
HandleStream is called by the underlying service handler method
func (*ThreadsService) NewEnvelope ¶ added in v0.1.10
func (h *ThreadsService) NewEnvelope(threadId string, hash mh.Multihash, ciphertext []byte, sig []byte) (*pb.Envelope, error)
NewEnvelope signs and wraps an encypted block for transport
func (*ThreadsService) Ping ¶ added in v0.1.10
func (h *ThreadsService) Ping(pid peer.ID) (service.PeerStatus, error)
Ping pings another peer
func (*ThreadsService) Protocol ¶ added in v0.1.10
func (h *ThreadsService) Protocol() protocol.ID
Protocol returns the handler protocol
func (*ThreadsService) SendMessage ¶ added in v0.1.10
SendMessage sends a message to a peer
func (*ThreadsService) Start ¶ added in v0.1.10
func (h *ThreadsService) Start()
Start begins online services
Source Files ¶
- account.go
- api.go
- api_account.go
- api_blocks.go
- api_cafes.go
- api_comments.go
- api_config.go
- api_contacts.go
- api_feed.go
- api_files.go
- api_invites.go
- api_ipfs.go
- api_likes.go
- api_logs.go
- api_messages.go
- api_mill.go
- api_notifications.go
- api_ping.go
- api_profile.go
- api_search.go
- api_snapshots.go
- api_sub.go
- api_threads.go
- api_tokens.go
- block_outbox.go
- blocks.go
- cafe_api.go
- cafe_inbox.go
- cafe_outbox.go
- cafe_service.go
- cafes.go
- config.go
- contacts.go
- feed.go
- feed_announces.go
- feed_comments.go
- feed_files.go
- feed_flags.go
- feed_ignore.go
- feed_joins.go
- feed_leaves.go
- feed_likes.go
- feed_merges.go
- feed_messages.go
- files.go
- invites.go
- main.go
- notifications.go
- peers.go
- profile.go
- search.go
- summary.go
- thread.go
- thread_adds.go
- thread_announces.go
- thread_comments.go
- thread_files.go
- thread_flags.go
- thread_ignores.go
- thread_joins.go
- thread_leaves.go
- thread_likes.go
- thread_merges.go
- thread_messages.go
- threads.go
- threads_service.go
- tokens.go