Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrUserIsNil is returned when a function is called with an nil user. ErrUserIsNil = errors.New("user is nil") // ErrCannotDownloadFile is returned when a function cannot download the requested file ErrCannotDownloadFile = errors.New("cannot download file") )
Functions ¶
This section is empty.
Types ¶
type Capabilities ¶
type Capabilities struct { AttachmentsFolder string `ocscapability:"config => attachments => folder"` Audio bool `ocscapability:"audio"` Video bool `ocscapability:"video"` Chat bool `ocscapability:"chat"` GuestSignaling bool `ocscapability:"guest-signaling"` EmptyGroupRoom bool `ocscapability:"empty-group-room"` GuestDisplayNames bool `ocscapability:"guest-display-names"` MultiRoomUsers bool `ocscapability:"multi-room-users"` ChatV2 bool `ocscapability:"chat-v2"` Favorites bool `ocscapability:"favorites"` LastRoomActivity bool `ocscapability:"last-room-activity"` NoPing bool `ocscapability:"no-ping"` SystemMessages bool `ocscapability:"system-messages"` MentionFlag bool `ocscapability:"mention-flag"` InCallFlags bool `ocscapability:"in-call-flags"` InviteByMail bool `ocscapability:"invite-by-mail"` NotificationLevels bool `ocscapability:"notification-levels"` InviteGroupsAndMails bool `ocscapability:"invite-groups-and-mails"` LockedOneToOneRooms bool `ocscapability:"locked-one-to-one-rooms"` ReadOnlyRooms bool `ocscapability:"read-only-rooms"` ChatReadMarker bool `ocscapability:"chat-read-marker"` WebinaryLobby bool `ocscapability:"webinary-lobby"` StartCallFlag bool `ocscapability:"start-call-flag"` ChatReplies bool `ocscapability:"chat-replies"` CirclesSupport bool `ocscapability:"circles-support"` AttachmentsAllowed bool `ocscapability:"config => attachments => allowed"` ConversationsCanCreate bool `ocscapability:"config => conversations => can-create"` ForceMute bool `ocscapability:"force-mute"` ConversationV2 bool `ocscapability:"conversation-v2"` ChatReferenceID bool `ocscapability:"chat-reference-id"` ConversationV3 bool `ocscapability:"conversation-v3"` ConversationV4 bool `ocscapability:"conversation-v4"` SIPSupport bool `ocscapability:"sip-support"` ChatReadStatus bool `ocscapability:"chat-read-status"` ListableRooms bool `ocscapability:"listable-rooms"` PhonebookSearch bool `ocscapability:"phonebook-search"` RaiseHand bool `ocscapability:"raise-hand"` RoomDescription bool `ocscapability:"room-description"` DeleteMessages bool `ocscapability:"delete-messages"` RichObjectSharing bool `ocscapability:"rich-object-sharing"` ConversationCallFlags bool `ocscapability:"conversation-call-flags"` GeoLocationSharing bool `ocscapability:"geo-location-sharing"` ReadPrivacyConfig bool `ocscapability:"config => chat => read-privacy"` SignalingV3 bool `ocscapability:"signaling-v3"` TempUserAvatarAPI bool `ocscapability:"temp-user-avatar-api"` MaxGifSizeConfig int `ocscapability:"config => previews => max-gif-size"` ChatMaxLength int `ocscapability:"config => chat => max-length"` }
Capabilities describes the capabilities that the Nextcloud Talk instance is capable of. Visit https://nextcloud-talk.readthedocs.io/en/latest/capabilities/ for more info.
type RoomInfo ¶ added in v0.1.2
type RoomInfo struct { Token string `json:"token"` Name string `json:"name"` DisplayName string `json:"displayName"` SessionID string `json:"sessionId"` ObjectType string `json:"objectType"` ObjectID string `json:"objectId"` Type int `json:"type"` ParticipantType int `json:"participantType"` ParticipantFlags int `json:"participantFlags"` ReadOnly int `json:"readOnly"` LastPing int `json:"lastPing"` LastActivity int `json:"lastActivity"` NotificationLevel int `json:"notificationLevel"` LobbyState int `json:"lobbyState"` LobbyTimer int `json:"lobbyTimer"` UnreadMessages int `json:"unreadMessages"` LastReadMessage int `json:"lastReadMessage"` HasPassword bool `json:"hasPassword"` HasCall bool `json:"hasCall"` CanStartCall bool `json:"canStartCall"` CanDeleteConversation bool `json:"canDeleteConversation"` CanLeaveConversation bool `json:"canLeaveConversation"` IsFavorite bool `json:"isFavorite"` UnreadMention bool `json:"unreadMention"` LastMessage *ocs.TalkRoomMessageData `json:"lastMessage"` }
RoomInfo contains information about a room
type TalkUser ¶
type TalkUser struct { User string Pass string NextcloudURL string Config *TalkUserConfig // contains filtered or unexported fields }
TalkUser represents a user of Nextcloud Talk
func NewUser ¶ added in v0.1.0
func NewUser(url string, username string, password string, config *TalkUserConfig) (*TalkUser, error)
NewUser returns a TalkUser instance The url should be the full URL of the Nextcloud instance (e.g. https://cloud.mydomain.me)
func (*TalkUser) Capabilities ¶
func (t *TalkUser) Capabilities() (*Capabilities, error)
Capabilities returns an instance of Capabilities that describes what the Nextcloud Talk instance supports
func (*TalkUser) DownloadFile ¶ added in v0.1.0
DownloadFile downloads the file at the given path
Meant to be used with rich object string's path.
type TalkUserConfig ¶ added in v0.1.0
TalkUserConfig is configuration options for TalkUsers
Click to show internal directories.
Click to hide internal directories.