Documentation ¶
Index ¶
- type AddAllRequest
- type AddAllResponse
- type AddGroupPermissionRequest
- type Apps
- type AttachField
- type Attachment
- type Build
- type Channel
- type ChannelCountersRequest
- type ChannelCountersResponse
- type ChannelHistoryRequest
- type ChannelInfo
- type ChannelInfoResponse
- type ChannelList
- type ChannelListResponse
- type ChannelMembersResponse
- type Client
- func (c *Client) AddAllToChannel(params *AddAllRequest) (*AddAllResponse, error)
- func (c *Client) AddLeaderGroup(param *AddGroupPermissionRequest) (*SimpleSuccessResponse, error)
- func (c *Client) AddOwnerGroup(param *AddGroupPermissionRequest) (*SimpleSuccessResponse, error)
- func (c *Client) ArchiveChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
- func (c *Client) ArchiveGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
- func (c *Client) ChannelCounters(param *ChannelCountersRequest) (*ChannelCountersResponse, error)
- func (c *Client) ChannelInfo(param *SimpleChannelRequest) (*ChannelInfoResponse, error)
- func (c *Client) ChannelInvite(param *InviteChannelRequest) (*InviteChannelResponse, error)
- func (c *Client) ChannelKick(param *InviteChannelRequest) (*InviteChannelResponse, error)
- func (c *Client) ChannelList() (*ChannelListResponse, error)
- func (c *Client) ChannelMembers(param *SimpleChannelRequest) (*ChannelMembersResponse, error)
- func (c *Client) CloseChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
- func (c *Client) CloseGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
- func (c *Client) Count(val int) *Client
- func (c *Client) CreateChannel(param *CreateChannelRequest) (*CreateChannelResponse, error)
- func (c *Client) CreateGroup(param *CreateGroupRequest) (*CreateGroupResponse, error)
- func (c *Client) DeleteChannel(param *SimpleChannelRequest) (*SimpleSuccessResponse, error)
- func (c *Client) DeleteGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
- func (c *Client) DeleteMessage(param *DeleteMessageRequest) (*DeleteMessageResponse, error)
- func (c *Client) Directory() (*RespDirectory, error)
- func (c *Client) GetMessage(param *SingleMessageId) (*GetMessageResponse, error)
- func (c *Client) GetMessages(param *GetMessagesRequest) (*GetMessagesResponse, error)
- func (c *Client) GetPinnedMessages(param *GetPinnedMsgRequest) (*GetPinnedMsgResponse, error)
- func (c *Client) GetSupportedLanguage(query string) (*SupportedLanguageResp, error)
- func (c *Client) GroupCounters(param *GroupCountersRequest) (*GroupCountersResponse, error)
- func (c *Client) GroupInfo(param *SimpleGroupRequest) (*GroupInfoResponse, error)
- func (c *Client) GroupInvite(param *InviteGroupRequest) (*InviteGroupResponse, error)
- func (c *Client) GroupKick(param *InviteGroupRequest) (*InviteGroupResponse, error)
- func (c *Client) GroupList() (*GroupListResponse, error)
- func (c *Client) GroupMembers(param *SimpleGroupRequest) (*GroupMembersResponse, error)
- func (c *Client) GroupMessages(param *SimpleGroupRequest) (*GroupMessagesResponse, error)
- func (c *Client) Hooks(msg *HookMessage, token string) (*HookResponse, error)
- func (c *Client) Info() (*RespInfo, error)
- func (c *Client) Login(login *LoginPayload) (*LoginResponse, error)
- func (c *Client) Logout() (*LogoutResponse, error)
- func (c *Client) Me() (*MeResponse, error)
- func (c *Client) Offset(val int) *Client
- func (c *Client) OpenChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
- func (c *Client) OpenGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
- func (c *Client) PinMessage(param *SingleMessageId) (*PinMessageResponse, error)
- func (c *Client) PostMessage(msg *Message) (*RespPostMessage, error)
- func (c *Client) RenameChannel(param *RenameChannelRequest) (*RenameChannelResponse, error)
- func (c *Client) RenameGroup(param *RenameGroupRequest) (*RenameGroupResponse, error)
- func (c *Client) SetAnnouncementChannel(param *SetAnnouncementRequest) (*SetAnnouncementResponse, error)
- func (c *Client) SetAnnouncementGroup(param *SetAnnouncementRequest) (*SetAnnouncementResponse, error)
- func (c *Client) SetDescriptionChannel(param *SetDescriptionRequest) (*SetDescriptionResponse, error)
- func (c *Client) SetDescriptionGroup(param *SetDescriptionRequest) (*SetDescriptionResponse, error)
- func (c *Client) SetTopicChannel(param *SetTopicRequest) (*SetTopicResponse, error)
- func (c *Client) SetTopicGroup(param *SetTopicRequest) (*SetTopicResponse, error)
- func (c *Client) Sort(val map[string]int) *Client
- func (c *Client) Spotlight(query string) (*RespSpotlight, error)
- func (c *Client) Statistics() (*RespStatistics, error)
- func (c *Client) StatisticsList() (*RespStatisticsList, error)
- func (c *Client) UnarchiveChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
- func (c *Client) UnarchiveGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
- func (c *Client) UnpinMessage(param *SingleMessageId) (*SimpleSuccessResponse, error)
- func (c *Client) UsersCreate(user *NewUser) (*UserCreateResponse, error)
- func (c *Client) UsersCreateToken(user *SimpleUserRequest) (*CreateTokenResponse, error)
- func (c *Client) UsersDeactivateIdle(params *DeactivateRequest) (*DeactivateResponse, error)
- func (c *Client) UsersDelete(user *UsersDelete) (*SimpleSuccessResponse, error)
- func (c *Client) UsersDeleteOwnAccount(pass string) (*SimpleSuccessResponse, error)
- func (c *Client) UsersForgotPassword(email string) (*SimpleSuccessResponse, error)
- func (c *Client) UsersGeneratePersonalAccessToken(params *GetNewToken) (*NewTokenResponse, error)
- func (c *Client) UsersGetStatus(user *SimpleUserRequest) (*GetStatusResponse, error)
- func (c *Client) UsersInfo(user *SimpleUserRequest) (*UsersInfoResponse, error)
- func (c *Client) UsersPresence(query string) (*UsersPresenceResponse, error)
- func (c *Client) UsersRegister(user *UserRegisterRequest) (*UsersInfoResponse, error)
- func (c *Client) UsersSetStatus(status *SetStatus) (*SimpleSuccessResponse, error)
- func (c *Client) UsersUpdate(user *UserUpdateRequest) (*UserUpdateResponse, error)
- type Commit
- type Cpus
- type CreateChannelRequest
- type CreateChannelResponse
- type CreateGroupRequest
- type CreateGroupResponse
- type CreateTokenResponse
- type DataLogin
- type DeactivateRequest
- type DeactivateResponse
- type DeleteMessageRequest
- type DeleteMessageResponse
- type Deploy
- type DirectoryResult
- type DontAskAgainList
- type Email
- type GetMessageResponse
- type GetMessagesRequest
- type GetMessagesResponse
- type GetNewToken
- type GetPinnedMsgRequest
- type GetPinnedMsgResponse
- type GetStatusResponse
- type GroupCountersRequest
- type GroupCountersResponse
- type GroupInfoResponse
- type GroupListResponse
- type GroupMembersResponse
- type GroupMessage
- type GroupMessagesResponse
- type HandlerHelper
- type HookAttachment
- type HookMessage
- type HookResponse
- type Integrations
- type InviteChannelRequest
- type InviteChannelResponse
- type InviteGroupRequest
- type InviteGroupResponse
- type LastMessage
- type LoginPayload
- type LoginResponse
- type LogoutResponse
- type Me
- type MeResponse
- type Member
- type Message
- type MessageResp
- type Messages
- type Migration
- type NewTokenResponse
- type NewUser
- type Option
- type Os
- type PaginationStruct
- type Password
- type PinMessageResponse
- type PinnedMessage
- type Preferences
- type Process
- type RenameChannelRequest
- type RenameChannelResponse
- type RenameGroupRequest
- type RenameGroupResponse
- type RespDirectory
- type RespInfo
- type RespMessageData
- type RespPostMessage
- type RespSpotlight
- type RespStatistics
- type RespStatisticsList
- type Result
- type RoomsInfo
- type Services
- type SetAnnouncementRequest
- type SetAnnouncementResponse
- type SetDescriptionRequest
- type SetDescriptionResponse
- type SetStatus
- type SetTopicRequest
- type SetTopicResponse
- type Settings
- type SimpleChannelId
- type SimpleChannelRequest
- type SimpleGroupId
- type SimpleGroupRequest
- type SimpleSuccessResponse
- type SimpleUserRequest
- type SingleMessageId
- type SingleUserInfo
- type Stats
- type SupportedLanguageResp
- type Times
- type U
- type UChat
- type UserCreateResponse
- type UserRegisterRequest
- type UserUpdateData
- type UserUpdateRequest
- type UserUpdateResponse
- type UsersDelete
- type UsersInfo
- type UsersInfoResponse
- type UsersPresenceResponse
- type Wizard
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AddAllRequest ¶
type AddAllResponse ¶
type AttachField ¶
type Attachment ¶
type Attachment struct { AudioURL string `json:"audio_url,omitempty"` AuthorIcon string `json:"author_icon,omitempty"` AuthorLink string `json:"author_link,omitempty"` AuthorName string `json:"author_name,omitempty"` Collapsed bool `json:"collapsed,omitempty"` Color string `json:"color,omitempty"` Fields []AttachField `json:"fields,omitempty"` ImageURL string `json:"image_url,omitempty"` MessageLink string `json:"message_link,omitempty"` Text string `json:"text,omitempty"` ThumbURL string `json:"thumb_url,omitempty"` Title string `json:"title,omitempty"` TitleLink string `json:"title_link,omitempty"` TitleLinkDownload bool `json:"title_link_download,omitempty"` Ts time.Time `json:"ts,omitempty"` VideoURL string `json:"video_url,omitempty"` }
type ChannelCountersRequest ¶
type ChannelCountersResponse ¶
type ChannelHistoryRequest ¶
type ChannelInfo ¶
type ChannelInfo struct { ID string `json:"_id"` Name string `json:"name"` Fname string `json:"fname"` T string `json:"t"` Msgs int `json:"msgs"` UsersCount int `json:"usersCount"` U UChat `json:"u"` CustomFields struct { } `json:"customFields"` Broadcast bool `json:"broadcast"` Encrypted bool `json:"encrypted"` Ts time.Time `json:"ts"` Ro bool `json:"ro"` Default bool `json:"default"` SysMes bool `json:"sysMes"` UpdatedAt time.Time `json:"_updatedAt"` }
type ChannelInfoResponse ¶
type ChannelInfoResponse struct { Channel ChannelInfo `json:"channel"` Success bool `json:"success"` }
type ChannelList ¶
type ChannelListResponse ¶
type ChannelListResponse struct { Channels []ChannelList `json:"channels"` Offset int `json:"offset"` Count int `json:"count"` Total int `json:"total"` Success bool `json:"success"` }
type ChannelMembersResponse ¶
type Client ¶
func NewWithOptions ¶
NewWithOptions creates new rocket.chat client with options
func (*Client) AddAllToChannel ¶
func (c *Client) AddAllToChannel(params *AddAllRequest) (*AddAllResponse, error)
AddAllToChannel adds all of the users on the server to a channel.
func (*Client) AddLeaderGroup ¶
func (c *Client) AddLeaderGroup(param *AddGroupPermissionRequest) (*SimpleSuccessResponse, error)
AddLeaderGroup adds a leader for the group.
func (*Client) AddOwnerGroup ¶
func (c *Client) AddOwnerGroup(param *AddGroupPermissionRequest) (*SimpleSuccessResponse, error)
AddOwnerGroup adds an owner for the group.
func (*Client) ArchiveChannel ¶
func (c *Client) ArchiveChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
ArchiveChannel archives a channel.
func (*Client) ArchiveGroup ¶
func (c *Client) ArchiveGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
ArchiveGroup archives a group.
func (*Client) ChannelCounters ¶
func (c *Client) ChannelCounters(param *ChannelCountersRequest) (*ChannelCountersResponse, error)
ChannelCounters gets channel counters.
func (*Client) ChannelInfo ¶
func (c *Client) ChannelInfo(param *SimpleChannelRequest) (*ChannelInfoResponse, error)
ChannelInfo get channel info.
func (*Client) ChannelInvite ¶
func (c *Client) ChannelInvite(param *InviteChannelRequest) (*InviteChannelResponse, error)
ChannelInvite adds a user to the channel.
func (*Client) ChannelKick ¶
func (c *Client) ChannelKick(param *InviteChannelRequest) (*InviteChannelResponse, error)
ChannelKick kick a user from the channel.
func (*Client) ChannelList ¶
func (c *Client) ChannelList() (*ChannelListResponse, error)
ChannelList get channels list
func (*Client) ChannelMembers ¶
func (c *Client) ChannelMembers(param *SimpleChannelRequest) (*ChannelMembersResponse, error)
ChannelMembers gets channel members
func (*Client) CloseChannel ¶
func (c *Client) CloseChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
CloseChannel removes the channel from the user's list of channels.
func (*Client) CloseGroup ¶
func (c *Client) CloseGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
CloseGroup closes a group.
func (*Client) CreateChannel ¶
func (c *Client) CreateChannel(param *CreateChannelRequest) (*CreateChannelResponse, error)
CreateChannel creates a new channel.
func (*Client) CreateGroup ¶
func (c *Client) CreateGroup(param *CreateGroupRequest) (*CreateGroupResponse, error)
CreateGroup creates a group.
func (*Client) DeleteChannel ¶
func (c *Client) DeleteChannel(param *SimpleChannelRequest) (*SimpleSuccessResponse, error)
DeleteChannel delete channel.
func (*Client) DeleteGroup ¶
func (c *Client) DeleteGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
DeleteGroup deletes a group.
func (*Client) DeleteMessage ¶
func (c *Client) DeleteMessage(param *DeleteMessageRequest) (*DeleteMessageResponse, error)
DeleteMessage deletes an existing chat message.
func (*Client) Directory ¶
func (c *Client) Directory() (*RespDirectory, error)
Directory returns a list of channels
func (*Client) GetMessage ¶
func (c *Client) GetMessage(param *SingleMessageId) (*GetMessageResponse, error)
GetMessage retrieves a single chat message by the provided id. Callee must have permission to access the room where the message resides.
func (*Client) GetMessages ¶
func (c *Client) GetMessages(param *GetMessagesRequest) (*GetMessagesResponse, error)
func (*Client) GetPinnedMessages ¶
func (c *Client) GetPinnedMessages(param *GetPinnedMsgRequest) (*GetPinnedMsgResponse, error)
GetPinnedMessages retrieve pinned messages from a room.
func (*Client) GetSupportedLanguage ¶
func (c *Client) GetSupportedLanguage(query string) (*SupportedLanguageResp, error)
GetSupportedLanguage returns a list of supported languages by the autotranslate
func (*Client) GroupCounters ¶
func (c *Client) GroupCounters(param *GroupCountersRequest) (*GroupCountersResponse, error)
GroupCounters gets counters of the group.
func (*Client) GroupInfo ¶
func (c *Client) GroupInfo(param *SimpleGroupRequest) (*GroupInfoResponse, error)
GroupInfo gets group information.
func (*Client) GroupInvite ¶
func (c *Client) GroupInvite(param *InviteGroupRequest) (*InviteGroupResponse, error)
GroupInvite invites a user to the group.
func (*Client) GroupKick ¶
func (c *Client) GroupKick(param *InviteGroupRequest) (*InviteGroupResponse, error)
GroupKick removes a user from the group.
func (*Client) GroupList ¶
func (c *Client) GroupList() (*GroupListResponse, error)
GroupList gets the list of groups the caller is part of.
func (*Client) GroupMembers ¶
func (c *Client) GroupMembers(param *SimpleGroupRequest) (*GroupMembersResponse, error)
GroupMembers gets the list of members of a group.
func (*Client) GroupMessages ¶
func (c *Client) GroupMessages(param *SimpleGroupRequest) (*GroupMessagesResponse, error)
GroupMessages gets the messages from a group.
func (*Client) Hooks ¶
func (c *Client) Hooks(msg *HookMessage, token string) (*HookResponse, error)
func (*Client) Login ¶
func (c *Client) Login(login *LoginPayload) (*LoginResponse, error)
Login login the user with the given credentials.
func (*Client) OpenChannel ¶
func (c *Client) OpenChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
OpenChannel adds the channel back to the user's list of channels.
func (*Client) OpenGroup ¶
func (c *Client) OpenGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
OpenGroup opens a group.
func (*Client) PinMessage ¶
func (c *Client) PinMessage(param *SingleMessageId) (*PinMessageResponse, error)
PinMessage pins a chat message to the message's channel.
func (*Client) PostMessage ¶
func (c *Client) PostMessage(msg *Message) (*RespPostMessage, error)
PostMessage posts a new chat message.
func (*Client) RenameChannel ¶
func (c *Client) RenameChannel(param *RenameChannelRequest) (*RenameChannelResponse, error)
RenameChannel changes a channel's name.
func (*Client) RenameGroup ¶
func (c *Client) RenameGroup(param *RenameGroupRequest) (*RenameGroupResponse, error)
RenameGroup renames a group.
func (*Client) SetAnnouncementChannel ¶
func (c *Client) SetAnnouncementChannel(param *SetAnnouncementRequest) (*SetAnnouncementResponse, error)
SetAnnouncementChannel sets the announcement for the channel.
func (*Client) SetAnnouncementGroup ¶
func (c *Client) SetAnnouncementGroup(param *SetAnnouncementRequest) (*SetAnnouncementResponse, error)
SetAnnouncementGroup sets the announcement for the group.
func (*Client) SetDescriptionChannel ¶
func (c *Client) SetDescriptionChannel(param *SetDescriptionRequest) (*SetDescriptionResponse, error)
SetDescriptionChannel sets the Description for the channel.
func (*Client) SetDescriptionGroup ¶
func (c *Client) SetDescriptionGroup(param *SetDescriptionRequest) (*SetDescriptionResponse, error)
SetDescriptionGroup sets the description for the group.
func (*Client) SetTopicChannel ¶
func (c *Client) SetTopicChannel(param *SetTopicRequest) (*SetTopicResponse, error)
SetTopicChannel sets the topic for the channel.
func (*Client) SetTopicGroup ¶
func (c *Client) SetTopicGroup(param *SetTopicRequest) (*SetTopicResponse, error)
SetTopicGroup sets the topic for the group.
func (*Client) Spotlight ¶
func (c *Client) Spotlight(query string) (*RespSpotlight, error)
Spotlight returns a list of users and rooms that match the provided query
func (*Client) Statistics ¶
func (c *Client) Statistics() (*RespStatistics, error)
Statistics returns statistics about the server
func (*Client) StatisticsList ¶
func (c *Client) StatisticsList() (*RespStatisticsList, error)
StatisticsList returns a list of statistics
func (*Client) UnarchiveChannel ¶
func (c *Client) UnarchiveChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
UnarchiveChannel unarchive a channel.
func (*Client) UnarchiveGroup ¶
func (c *Client) UnarchiveGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
UnarchiveGroup unarchives a group.
func (*Client) UnpinMessage ¶
func (c *Client) UnpinMessage(param *SingleMessageId) (*SimpleSuccessResponse, error)
UnpinMessage unpins a chat message to the message's channel.
func (*Client) UsersCreate ¶
func (c *Client) UsersCreate(user *NewUser) (*UserCreateResponse, error)
UsersCreate creates a new user.
func (*Client) UsersCreateToken ¶
func (c *Client) UsersCreateToken(user *SimpleUserRequest) (*CreateTokenResponse, error)
UsersCreateToken creates a user token.
func (*Client) UsersDeactivateIdle ¶
func (c *Client) UsersDeactivateIdle(params *DeactivateRequest) (*DeactivateResponse, error)
UsersDeactivateIdle deactivates idle users.
func (*Client) UsersDelete ¶
func (c *Client) UsersDelete(user *UsersDelete) (*SimpleSuccessResponse, error)
UsersDelete deletes a user.
func (*Client) UsersDeleteOwnAccount ¶
func (c *Client) UsersDeleteOwnAccount(pass string) (*SimpleSuccessResponse, error)
UsersDeleteOwnAccount deletes your own account.
func (*Client) UsersForgotPassword ¶
func (c *Client) UsersForgotPassword(email string) (*SimpleSuccessResponse, error)
UsersForgotPassword send an email to reset your password
func (*Client) UsersGeneratePersonalAccessToken ¶
func (c *Client) UsersGeneratePersonalAccessToken(params *GetNewToken) (*NewTokenResponse, error)
UsersGeneratePersonalAccessToken generates a personal access token
func (*Client) UsersGetStatus ¶
func (c *Client) UsersGetStatus(user *SimpleUserRequest) (*GetStatusResponse, error)
UsersGetStatus gets the status of a user
func (*Client) UsersInfo ¶
func (c *Client) UsersInfo(user *SimpleUserRequest) (*UsersInfoResponse, error)
UsersInfo gets the information of a user
func (*Client) UsersPresence ¶
func (c *Client) UsersPresence(query string) (*UsersPresenceResponse, error)
UsersPresence gets all connected users presence
func (*Client) UsersRegister ¶
func (c *Client) UsersRegister(user *UserRegisterRequest) (*UsersInfoResponse, error)
UsersRegister registers a new user
func (*Client) UsersSetStatus ¶
func (c *Client) UsersSetStatus(status *SetStatus) (*SimpleSuccessResponse, error)
UsersSetStatus sets the status of a user
func (*Client) UsersUpdate ¶
func (c *Client) UsersUpdate(user *UserUpdateRequest) (*UserUpdateResponse, error)
UsersUpdate updates a user
type CreateChannelRequest ¶
type CreateChannelResponse ¶
type CreateGroupRequest ¶
type CreateGroupResponse ¶
type CreateTokenResponse ¶
type DeactivateRequest ¶
type DeactivateResponse ¶
type DeleteMessageRequest ¶
type DeleteMessageResponse ¶
type DeleteMessageResponse struct { ID string `json:"_id"` Ts int64 `json:"ts"` Success bool `json:"success"` }
todo add the remaining fields
type DirectoryResult ¶
type DontAskAgainList ¶
type GetMessageResponse ¶
type GetMessageResponse struct { Message MessageResp `json:"message"` Success bool `json:"success"` }
type GetMessagesRequest ¶
type GetMessagesResponse ¶
type GetNewToken ¶
type GetPinnedMsgRequest ¶
type GetPinnedMsgResponse ¶
type GetPinnedMsgResponse struct { Messages []PinnedMessage `json:"messages"` Count int `json:"count"` Offset int `json:"offset"` Total int `json:"total"` Success bool `json:"success"` }
type GetStatusResponse ¶
type GroupCountersRequest ¶
type GroupCountersResponse ¶
type GroupInfoResponse ¶
type GroupInfoResponse struct { Group groupInfo `json:"group"` Success bool `json:"success"` }
type GroupListResponse ¶
type GroupMembersResponse ¶
type GroupMessage ¶
type GroupMessagesResponse ¶
type GroupMessagesResponse struct { Messages []GroupMessage `json:"messages"` Count int `json:"count"` Offset int `json:"offset"` Total int `json:"total"` Success bool `json:"success"` }
type HandlerHelper ¶
type HookAttachment ¶
type HookMessage ¶
type HookMessage struct { Text string `json:"text"` Attachments []HookAttachment `json:"attachments"` }
type HookResponse ¶
type HookResponse struct {
Success bool `json:"success"`
}
type Integrations ¶
type Integrations struct { TotalIntegrations int `json:"totalIntegrations"` TotalIncoming int `json:"totalIncoming"` TotalIncomingActive int `json:"totalIncomingActive"` TotalOutgoing int `json:"totalOutgoing"` TotalOutgoingActive int `json:"totalOutgoingActive"` TotalWithScriptEnabled int `json:"totalWithScriptEnabled"` }
type InviteChannelRequest ¶
type InviteChannelResponse ¶
type InviteChannelResponse struct { Channel struct { ID string `json:"_id"` Ts time.Time `json:"ts"` T string `json:"t"` Name string `json:"name"` Usernames []string `json:"usernames"` Msgs int `json:"msgs"` UpdatedAt time.Time `json:"_updatedAt"` Lm time.Time `json:"lm"` } `json:"channel"` Success bool `json:"success"` }
type InviteGroupRequest ¶
type InviteGroupResponse ¶
type InviteGroupResponse struct { Group struct { ID string `json:"_id"` Ts time.Time `json:"ts"` T string `json:"t"` Name string `json:"name"` Usernames []string `json:"usernames,omitempty"` U UChat `json:"u"` Username string `json:"username,omitempty"` Msgs int `json:"msgs"` UpdatedAt time.Time `json:"_updatedAt"` Lm time.Time `json:"lm"` } `json:"group"` Success bool `json:"success"` }
type LastMessage ¶
type LastMessage struct { ID string `json:"_id"` Alias string `json:"alias"` Msg string `json:"msg"` Attachments []interface{} `json:"attachments"` ParseUrls bool `json:"parseUrls"` Groupable bool `json:"groupable"` Ts time.Time `json:"ts"` U U `json:"u"` Rid string `json:"rid"` UpdatedAt time.Time `json:"_updatedAt"` Mentions []interface{} `json:"mentions"` Channels []interface{} `json:"channels"` }
type LoginPayload ¶
type LoginResponse ¶
type LogoutResponse ¶
type Me ¶
type Me struct { ID string `json:"_id"` Services Services `json:"services"` Emails []Email `json:"emails"` Status string `json:"status"` Active bool `json:"active"` UpdatedAt time.Time `json:"_updatedAt"` Roles []string `json:"roles"` Name string `json:"name"` StatusConnection string `json:"statusConnection"` Username string `json:"username"` UtcOffset float64 `json:"utcOffset"` StatusText string `json:"statusText"` Settings Settings `json:"settings"` AvatarOrigin string `json:"avatarOrigin"` RequirePasswordChange bool `json:"requirePasswordChange"` Language string `json:"language"` Email string `json:"email"` AvatarURL string `json:"avatarUrl"` }
type MeResponse ¶
type MeResponse struct { ID string `json:"_id"` Services Services `json:"services"` Emails []Email `json:"emails"` Status string `json:"status"` Active bool `json:"active"` UpdatedAt time.Time `json:"_updatedAt"` Roles []string `json:"roles"` Name string `json:"name"` StatusConnection string `json:"statusConnection"` Username string `json:"username"` UtcOffset float64 `json:"utcOffset"` StatusText string `json:"statusText"` Settings Settings `json:"settings"` AvatarOrigin string `json:"avatarOrigin"` RequirePasswordChange bool `json:"requirePasswordChange"` Language string `json:"language"` Email string `json:"email"` AvatarURL string `json:"avatarUrl"` Success bool `json:"success"` }
type MessageResp ¶
type NewTokenResponse ¶
type NewUser ¶
type NewUser struct { Email string `json:"email"` Name string `json:"name"` Password string `json:"password"` Username string `json:"username"` Active bool `json:"active,omitempty"` Roles []string `json:"roles,omitempty"` JoinDefaultChannels bool `json:"joinDefaultChannels,omitempty"` RequirePasswordChange bool `json:"requirePasswordChange,omitempty"` SendWelcomeEmail bool `json:"sendWelcomeEmail,omitempty"` Verified bool `json:"verified,omitempty"` CustomFields string `json:"customFields,omitempty"` }
type PaginationStruct ¶
type PinMessageResponse ¶
type PinMessageResponse struct { Message struct { T string `json:"t"` Rid string `json:"rid"` Ts time.Time `json:"ts"` Msg string `json:"msg"` U struct { ID string `json:"_id"` Username string `json:"username"` } `json:"u"` Groupable bool `json:"groupable"` Attachments []struct { Text string `json:"text"` AuthorName string `json:"author_name"` AuthorIcon string `json:"author_icon"` Ts time.Time `json:"ts"` } `json:"attachments"` UpdatedAt time.Time `json:"_updatedAt"` ID string `json:"_id"` } `json:"message"` Success bool `json:"success"` }
type PinnedMessage ¶
type PinnedMessage struct { ID string `json:"_id"` Rid string `json:"rid"` Msg string `json:"msg"` Ts time.Time `json:"ts"` U struct { ID string `json:"_id"` Username string `json:"username"` Name string `json:"name"` } `json:"u"` Mentions []interface{} `json:"mentions"` Channels []interface{} `json:"channels"` UpdatedAt time.Time `json:"_updatedAt"` Pinned bool `json:"pinned"` PinnedAt time.Time `json:"pinnedAt"` PinnedBy struct { ID string `json:"_id"` Username string `json:"username"` } `json:"pinnedBy"` }
type Preferences ¶
type Preferences struct { EnableAutoAway bool `json:"enableAutoAway"` IdleTimeLimit int `json:"idleTimeLimit"` AudioNotifications string `json:"audioNotifications"` DesktopNotifications string `json:"desktopNotifications"` MobileNotifications string `json:"mobileNotifications"` UnreadAlert bool `json:"unreadAlert"` UseEmojis bool `json:"useEmojis"` ConvertASCIIEmoji bool `json:"convertAsciiEmoji"` AutoImageLoad bool `json:"autoImageLoad"` SaveMobileBandwidth bool `json:"saveMobileBandwidth"` CollapseMediaByDefault bool `json:"collapseMediaByDefault"` HideUsernames bool `json:"hideUsernames"` HideRoles bool `json:"hideRoles"` HideFlexTab bool `json:"hideFlexTab"` HideAvatars bool `json:"hideAvatars"` SidebarGroupByType bool `json:"sidebarGroupByType"` SidebarViewMode string `json:"sidebarViewMode"` SidebarHideAvatar bool `json:"sidebarHideAvatar"` SidebarShowUnread bool `json:"sidebarShowUnread"` SidebarShowFavorites bool `json:"sidebarShowFavorites"` SendOnEnter string `json:"sendOnEnter"` MessageViewMode int `json:"messageViewMode"` EmailNotificationMode string `json:"emailNotificationMode"` NewRoomNotification string `json:"newRoomNotification"` NewMessageNotification string `json:"newMessageNotification"` MuteFocusedConversations bool `json:"muteFocusedConversations"` NotificationsSoundVolume int `json:"notificationsSoundVolume"` SidebarShowDiscussion bool `json:"sidebarShowDiscussion"` DesktopNotificationRequireInteraction bool `json:"desktopNotificationRequireInteraction"` SidebarSortby string `json:"sidebarSortby"` DesktopNotificationDuration int `json:"desktopNotificationDuration"` DontAskAgainList []DontAskAgainList `json:"dontAskAgainList"` Highlights []interface{} `json:"highlights"` Language string `json:"language"` }
type RenameChannelRequest ¶
type RenameChannelResponse ¶
type RenameChannelResponse struct { Channel ChannelList `json:"channel"` Success bool `json:"success"` }
type RenameGroupRequest ¶
type RenameGroupResponse ¶
type RenameGroupResponse struct { Group groupList `json:"group"` Success bool `json:"success"` }
type RespDirectory ¶
type RespDirectory struct { Result []DirectoryResult `json:"result"` Count int `json:"count"` Offset int `json:"offset"` Total int `json:"total"` Success bool `json:"success"` }
type RespMessageData ¶
type RespMessageData struct { Alias string `json:"alias,omitempty"` Msg string `json:"msg,omitempty"` ParseUrls bool `json:"parseUrls,omitempty"` Groupable bool `json:"groupable,omitempty"` Ts time.Time `json:"ts,omitempty"` U UChat `json:"u,omitempty"` Rid string `json:"rid,omitempty"` UpdatedAt time.Time `json:"_updatedAt,omitempty"` ID string `json:"_id,omitempty"` }
type RespPostMessage ¶
type RespSpotlight ¶
type RespStatistics ¶
type RespStatistics struct { ID string `json:"_id"` Wizard Wizard `json:"wizard"` UniqueID string `json:"uniqueId"` InstalledAt time.Time `json:"installedAt"` Version string `json:"version"` TotalUsers int `json:"totalUsers"` ActiveUsers int `json:"activeUsers"` ActiveGuests int `json:"activeGuests"` NonActiveUsers int `json:"nonActiveUsers"` AppUsers int `json:"appUsers"` OnlineUsers int `json:"onlineUsers"` AwayUsers int `json:"awayUsers"` TotalConnectedUsers int `json:"totalConnectedUsers"` OfflineUsers int `json:"offlineUsers"` TotalRooms int `json:"totalRooms"` TotalChannels int `json:"totalChannels"` TotalPrivateGroups int `json:"totalPrivateGroups"` TotalDirect int `json:"totalDirect"` TotalLivechat int `json:"totalLivechat"` TotalDiscussions int `json:"totalDiscussions"` TotalThreads int `json:"totalThreads"` TotalLivechatVisitors int `json:"totalLivechatVisitors"` TotalLivechatAgents int `json:"totalLivechatAgents"` LivechatEnabled bool `json:"livechatEnabled"` TotalChannelMessages int `json:"totalChannelMessages"` TotalPrivateGroupMessages int `json:"totalPrivateGroupMessages"` TotalDirectMessages int `json:"totalDirectMessages"` TotalLivechatMessages int `json:"totalLivechatMessages"` TotalMessages int `json:"totalMessages"` FederatedServers int `json:"federatedServers"` FederatedUsers int `json:"federatedUsers"` LastLogin time.Time `json:"lastLogin"` LastMessageSentAt time.Time `json:"lastMessageSentAt"` LastSeenSubscription time.Time `json:"lastSeenSubscription"` Os Os `json:"os"` Process Process `json:"process"` Deploy Deploy `json:"deploy"` EnterpriseReady bool `json:"enterpriseReady"` UploadsTotal int `json:"uploadsTotal"` UploadsTotalSize int `json:"uploadsTotalSize"` Migration Migration `json:"migration"` InstanceCount int `json:"instanceCount"` OplogEnabled bool `json:"oplogEnabled"` MongoVersion string `json:"mongoVersion"` MongoStorageEngine string `json:"mongoStorageEngine"` UniqueUsersOfYesterday Stats `json:"uniqueUsersOfYesterday"` UniqueUsersOfLastMonth Stats `json:"uniqueUsersOfLastMonth"` UniqueDevicesOfYesterday Stats `json:"uniqueDevicesOfYesterday"` UniqueDevicesOfLastMonth Stats `json:"uniqueDevicesOfLastMonth"` UniqueOSOfYesterday Stats `json:"uniqueOSOfYesterday"` UniqueOSOfLastMonth Stats `json:"uniqueOSOfLastMonth"` Apps Apps `json:"apps"` Integrations Integrations `json:"integrations"` PushQueue int `json:"pushQueue"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"_updatedAt"` Success bool `json:"success"` }
type RespStatisticsList ¶
type RespStatisticsList struct { Statistics []struct { ID string `json:"_id"` Wizard Wizard `json:"wizard"` UniqueID string `json:"uniqueId"` InstalledAt time.Time `json:"installedAt"` Version string `json:"version"` TotalUsers int `json:"totalUsers"` ActiveUsers int `json:"activeUsers"` ActiveGuests int `json:"activeGuests"` NonActiveUsers int `json:"nonActiveUsers"` AppUsers int `json:"appUsers"` OnlineUsers int `json:"onlineUsers"` AwayUsers int `json:"awayUsers"` TotalConnectedUsers int `json:"totalConnectedUsers"` OfflineUsers int `json:"offlineUsers"` TotalRooms int `json:"totalRooms"` TotalChannels int `json:"totalChannels"` TotalPrivateGroups int `json:"totalPrivateGroups"` TotalDirect int `json:"totalDirect"` TotalLivechat int `json:"totalLivechat"` TotalDiscussions int `json:"totalDiscussions"` TotalThreads int `json:"totalThreads"` TotalLivechatVisitors int `json:"totalLivechatVisitors"` TotalLivechatAgents int `json:"totalLivechatAgents"` TotalChannelMessages int `json:"totalChannelMessages"` TotalPrivateGroupMessages int `json:"totalPrivateGroupMessages"` TotalDirectMessages int `json:"totalDirectMessages"` TotalLivechatMessages int `json:"totalLivechatMessages"` TotalMessages int `json:"totalMessages"` FederatedServers int `json:"federatedServers"` FederatedUsers int `json:"federatedUsers"` Os Os `json:"os"` Process Process `json:"process"` Deploy Deploy `json:"deploy"` EnterpriseReady bool `json:"enterpriseReady"` UploadsTotal int `json:"uploadsTotal"` UploadsTotalSize int `json:"uploadsTotalSize"` Migration Migration `json:"migration"` InstanceCount int `json:"instanceCount"` OplogEnabled bool `json:"oplogEnabled"` MongoVersion string `json:"mongoVersion"` MongoStorageEngine string `json:"mongoStorageEngine"` UniqueUsersOfYesterday Stats `json:"uniqueUsersOfYesterday"` UniqueUsersOfLastMonth Stats `json:"uniqueUsersOfLastMonth"` UniqueDevicesOfYesterday Stats `json:"uniqueDevicesOfYesterday"` UniqueDevicesOfLastMonth Stats `json:"uniqueDevicesOfLastMonth"` UniqueOSOfYesterday Stats `json:"uniqueOSOfYesterday"` UniqueOSOfLastMonth Stats `json:"uniqueOSOfLastMonth"` Apps Apps `json:"apps"` Integrations Integrations `json:"integrations"` PushQueue int `json:"pushQueue"` CreatedAt time.Time `json:"createdAt"` UpdatedAt time.Time `json:"_updatedAt"` LivechatEnabled bool `json:"livechatEnabled,omitempty"` LastLogin time.Time `json:"lastLogin,omitempty"` LastMessageSentAt time.Time `json:"lastMessageSentAt,omitempty"` LastSeenSubscription time.Time `json:"lastSeenSubscription,omitempty"` } `json:"statistics"` Count int `json:"count"` Offset int `json:"offset"` Total int `json:"total"` Success bool `json:"success"` }
type RoomsInfo ¶
type RoomsInfo struct { ID string `json:"_id"` Name string `json:"name"` T string `json:"t"` LastMessage LastMessage `json:"lastMessage"` }
type SetAnnouncementRequest ¶
type SetAnnouncementResponse ¶
type SetDescriptionRequest ¶
type SetDescriptionResponse ¶
type SetTopicRequest ¶
type SetTopicResponse ¶
type Settings ¶
type Settings struct {
Preferences Preferences `json:"preferences"`
}
type SimpleChannelId ¶
type SimpleChannelId struct {
RoomId string `json:"roomId,omitempty"`
}
type SimpleChannelRequest ¶
type SimpleGroupId ¶
type SimpleGroupId struct {
RoomId string `json:"roomId,omitempty"`
}
type SimpleGroupRequest ¶
type SimpleSuccessResponse ¶
type SimpleSuccessResponse struct {
Success bool `json:"success"`
}
type SimpleUserRequest ¶
type SingleMessageId ¶
type SingleMessageId struct {
MessageId string `json:"messageId"`
}
type SingleUserInfo ¶
type SingleUserInfo struct { ID string `json:"_id"` CreatedAt time.Time `json:"createdAt"` Type string `json:"type"` Status string `json:"status"` Active bool `json:"active"` Name string `json:"name"` UtcOffset float64 `json:"utcOffset"` Username string `json:"username"` AvatarETag string `json:"avatarETag,omitempty"` }
type SupportedLanguageResp ¶
type SupportedLanguageResp struct { Languages []language `json:"languages"` Success bool `json:"success"` }
type UserCreateResponse ¶
type UserCreateResponse struct { User userCreateInfo `json:"user"` Success bool `json:"success"` }
type UserRegisterRequest ¶
type UserUpdateData ¶
type UserUpdateData struct { Email string `json:"email,omitempty"` Name string `json:"name,omitempty"` Password string `json:"password,omitempty"` Username string `json:"username,omitempty"` Active bool `json:"active,omitempty"` Roles []string `json:"roles,omitempty"` RequirePasswordChange bool `json:"requirePasswordChange,omitempty"` SendWelcomeEmail bool `json:"sendWelcomeEmail,omitempty"` Verified bool `json:"verified,omitempty"` }
type UserUpdateRequest ¶
type UserUpdateRequest struct { UserId string `json:"userId"` Data UserUpdateData `json:"data,omitempty"` }
type UserUpdateResponse ¶
type UserUpdateResponse struct { User userUpdateInfo `json:"user"` Success bool `json:"success"` }
type UsersDelete ¶
type UsersDelete struct {
Username string `json:"username"`
}
type UsersInfoResponse ¶
type UsersInfoResponse struct { User SingleUserInfo `json:"user"` Success bool `json:"success"` }