Documentation
¶
Index ¶
- type Annotation
- type Comment
- type Contacts
- type Device
- type Devices
- type Event
- type ExternalInvite
- type ImageData
- type Like
- type Messenger
- type Mobile
- func (m *Mobile) AcceptExternalThreadInvite(id string, key string) (string, error)
- func (m *Mobile) AcceptThreadInviteViaNotification(id string) (string, error)
- func (m *Mobile) AddDevice(name string, pubKey string) error
- func (m *Mobile) AddExternalThreadInvite(threadId string) (string, error)
- func (m *Mobile) AddPhoto(path string) (string, error)
- func (m *Mobile) AddPhotoComment(blockId string, body string) (string, error)
- func (m *Mobile) AddPhotoLike(blockId string) (string, error)
- func (m *Mobile) AddPhotoToThread(dataId string, key string, threadId string, caption string) (string, error)
- func (m *Mobile) AddThread(name string) (string, error)
- func (m *Mobile) AddThreadInvite(threadId string, inviteePk string) (string, error)
- func (m *Mobile) ContactThreads(id string) (string, error)
- func (m *Mobile) Contacts() (string, error)
- func (m *Mobile) CountUnreadNotifications() int
- func (m *Mobile) Devices() (string, error)
- func (m *Mobile) GetId() (string, error)
- func (m *Mobile) GetNotifications(offset string, limit int) (string, error)
- func (m *Mobile) GetPeerProfile(peerId string) (string, error)
- func (m *Mobile) GetPhotoData(id string, path string) (string, error)
- func (m *Mobile) GetPhotoDataForMinWidth(id string, minWidth int) (string, error)
- func (m *Mobile) GetPhotoKey(id string) (string, error)
- func (m *Mobile) GetPhotoMetadata(id string) (string, error)
- func (m *Mobile) GetPhotos(offsetId string, limit int, threadId string) (string, error)
- func (m *Mobile) GetProfile() (string, error)
- func (m *Mobile) GetPubKey() (string, error)
- func (m *Mobile) GetTokens(forceRefresh bool) (string, error)
- func (m *Mobile) GetUsername() (string, error)
- func (m *Mobile) IgnorePhoto(blockId string) (string, error)
- func (m *Mobile) IgnorePhotoComment(blockId string) (string, error)
- func (m *Mobile) IgnorePhotoLike(blockId string) (string, error)
- func (m *Mobile) IsSignedIn() bool
- func (m *Mobile) Overview() (string, error)
- func (m *Mobile) PhotoThreads(id string) (string, error)
- func (m *Mobile) ReadAllNotifications() error
- func (m *Mobile) ReadNotification(id string) error
- func (m *Mobile) RefreshMessages() error
- func (m *Mobile) RemoveDevice(id string) error
- func (m *Mobile) RemoveThread(id string) (string, error)
- func (m *Mobile) SetAvatarId(id string) error
- func (m *Mobile) SharePhotoToThread(dataId string, threadId string, caption string) (string, error)
- func (m *Mobile) SignIn(username string, password string) error
- func (m *Mobile) SignOut() error
- func (m *Mobile) SignUpWithEmail(email string, username string, password string, referral string) error
- func (m *Mobile) Start() error
- func (m *Mobile) Stop() error
- func (m *Mobile) ThreadInfo(threadId string) (string, error)
- func (m *Mobile) Threads() (string, error)
- type NodeConfig
- type Notifications
- type Photo
- type Photos
- type Thread
- type Threads
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct {
Id string `json:"id"`
Date time.Time `json:"date"`
AuthorId string `json:"author_id"`
Username string `json:"username,omitempty"`
}
Annotation represents common annotation fields
type Comment ¶
type Comment struct {
Annotation
Body string `json:"body"`
}
Comment is a simple wrapper around a comment block
type Devices ¶
type Devices struct {
Items []Device `json:"items"`
}
Devices is a wrapper around a list of Devices
type ExternalInvite ¶
type ExternalInvite struct {
Id string `json:"id"`
Key string `json:"key"`
Inviter string `json:"inviter"`
}
ExternalInvite is a wrapper around an invite id and key
type ImageData ¶
type ImageData struct {
Url string `json:"url"`
}
ImageData is a wrapper around an image data url
type Messenger ¶
type Messenger interface {
Notify(event *Event)
}
Messenger is used to inform the bridge layer of new data waiting to be queried
type Mobile ¶
Mobile is the name of the framework (must match package name)
func NewNode ¶
func NewNode(config *NodeConfig, messenger Messenger) (*Mobile, error)
Create a gomobile compatible wrapper around TextileNode
func (*Mobile) AcceptExternalThreadInvite ¶
AcceptExternalThreadInvite notifies the thread of a join
func (*Mobile) AcceptThreadInviteViaNotification ¶
AcceptThreadInviteViaNotification call core AcceptThreadInviteViaNotification
func (*Mobile) AddExternalThreadInvite ¶
AddExternalThreadInvite generates a new external invite link to a thread
func (*Mobile) AddPhotoComment ¶
AddPhotoComment adds an comment block targeted at the given block
func (*Mobile) AddPhotoLike ¶
AddPhotoLike adds a like block targeted at the given block
func (*Mobile) AddPhotoToThread ¶
func (m *Mobile) AddPhotoToThread(dataId string, key string, threadId string, caption string) (string, error)
SharePhoto adds an existing photo to a new thread
func (*Mobile) AddThreadInvite ¶
AddThreadInvite adds a new invite to a thread
func (*Mobile) ContactThreads ¶
ContactThreads calls core ContactThreads - id is a contact's peer id
func (*Mobile) CountUnreadNotifications ¶
CountUnreadNotifications calls core CountUnreadNotifications
func (*Mobile) GetNotifications ¶
GetNotifications call core GetNotifications
func (*Mobile) GetPeerProfile ¶
GetPeerProfile uses a peer id to look up a profile
func (*Mobile) GetPhotoData ¶
GetPhotoData returns a data url of an image under a path
func (*Mobile) GetPhotoDataForMinWidth ¶
GetPhotoDataForSize returns a data url of an image at or above requested size, or the next best option
func (*Mobile) GetPhotoKey ¶
GetPhotoKey calls core GetPhotoKey
func (*Mobile) GetPhotoMetadata ¶
GetPhotoMetadata returns a meta data object for a photo
func (*Mobile) GetProfile ¶
GetProfile returns this peer's profile
func (*Mobile) GetUsername ¶
GetUsername calls core GetUsername
func (*Mobile) IgnorePhoto ¶
IgnorePhoto is a semantic helper for mobile, just call IgnoreBlock
func (*Mobile) IgnorePhotoComment ¶
IgnorePhotoComment is a semantic helper for mobile, just call IgnoreBlock
func (*Mobile) IgnorePhotoLike ¶
IgnorePhotoLike is a semantic helper for mobile, just call IgnoreBlock
func (*Mobile) PhotoThreads ¶
PhotoThreads call core PhotoThreads
func (*Mobile) ReadAllNotifications ¶
ReadAllNotifications calls core ReadAllNotifications
func (*Mobile) ReadNotification ¶
ReadNotification calls core ReadNotification
func (*Mobile) RefreshMessages ¶
RefreshMessages run the message retriever
func (*Mobile) RemoveDevice ¶
RemoveDevice call core RemoveDevice
func (*Mobile) RemoveThread ¶
RemoveThread call core RemoveDevice
func (*Mobile) SetAvatarId ¶
SetAvatarId calls core SetAvatarId
func (*Mobile) SharePhotoToThread ¶
SharePhoto adds an existing photo to a new thread
func (*Mobile) SignUpWithEmail ¶
func (m *Mobile) SignUpWithEmail(email string, username string, password string, referral string) error
SignUpWithEmail creates an email based registration and calls core signup
func (*Mobile) ThreadInfo ¶
ThreadInfo calls core ThreadInfo
type NodeConfig ¶
NodeConfig is used to configure the mobile node NOTE: logLevel is one of: CRITICAL ERROR WARNING NOTICE INFO DEBUG
type Notifications ¶
type Notifications struct {
Items []repo.Notification `json:"items"`
}
Notifications is a wrapper around a list of Notifications
type Photo ¶
type Photo struct {
Id string `json:"id"`
BlockId string `json:"block_id"`
Date time.Time `json:"date"`
AuthorId string `json:"author_id"`
Caption string `json:"caption,omitempty"`
Username string `json:"username,omitempty"`
Metadata *util.PhotoMetadata `json:"metadata,omitempty"`
Comments []Comment `json:"comments"`
Likes []Like `json:"likes"`
}
Photo is a simple meta data wrapper around a photo block
type Photos ¶
type Photos struct {
Items []Photo `json:"items"`
}
Photos is a wrapper around a list of photos
