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) 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) SendMessage(msg *FocusedMessage) (*RespPostMessage, 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 DontAskAgainList
- type Email
- type FocusedMessage
- type GetMessageResponse
- type GetNewToken
- type GetPinnedMsgRequest
- type GetPinnedMsgResponse
- type GetStatusResponse
- type GroupCountersRequest
- type GroupCountersResponse
- type GroupInfoResponse
- type GroupListResponse
- type GroupMembersResponse
- type GroupMessage
- type GroupMessagesResponse
- 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 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 SendMessageEnvelope
- 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 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)
Adds all of the users on the server to a channel.
func (*Client) AddLeaderGroup ¶
func (c *Client) AddLeaderGroup(param *AddGroupPermissionRequest) (*SimpleSuccessResponse, error)
Add leader for the group.
func (*Client) AddOwnerGroup ¶
func (c *Client) AddOwnerGroup(param *AddGroupPermissionRequest) (*SimpleSuccessResponse, error)
Add owner for the group.
func (*Client) ArchiveChannel ¶
func (c *Client) ArchiveChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
Archives a channel.
func (*Client) ArchiveGroup ¶
func (c *Client) ArchiveGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
Archives a group.
func (*Client) ChannelCounters ¶
func (c *Client) ChannelCounters(param *ChannelCountersRequest) (*ChannelCountersResponse, error)
Gets channel counters.
func (*Client) ChannelInfo ¶
func (c *Client) ChannelInfo(param *SimpleChannelRequest) (*ChannelInfoResponse, error)
Get channel info.
func (*Client) ChannelInvite ¶
func (c *Client) ChannelInvite(param *InviteChannelRequest) (*InviteChannelResponse, error)
Adds a user to the channel.
func (*Client) ChannelKick ¶
func (c *Client) ChannelKick(param *InviteChannelRequest) (*InviteChannelResponse, error)
Kick a user from the channel.
func (*Client) ChannelList ¶
func (c *Client) ChannelList() (*ChannelListResponse, error)
Get channels list
func (*Client) ChannelMembers ¶
func (c *Client) ChannelMembers(param *SimpleChannelRequest) (*ChannelMembersResponse, error)
Gets channel members
func (*Client) CloseChannel ¶
func (c *Client) CloseChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
Removes the channel from the user's list of channels.
func (*Client) CloseGroup ¶
func (c *Client) CloseGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
Removes the group from the user's list of groups.
func (*Client) CreateChannel ¶
func (c *Client) CreateChannel(param *CreateChannelRequest) (*CreateChannelResponse, error)
Creates a new channel.
func (*Client) CreateGroup ¶
func (c *Client) CreateGroup(param *CreateGroupRequest) (*CreateGroupResponse, error)
Creates a new group.
func (*Client) DeleteChannel ¶
func (c *Client) DeleteChannel(param *SimpleChannelRequest) (*SimpleSuccessResponse, error)
Delete channel.
func (*Client) DeleteGroup ¶
func (c *Client) DeleteGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
Delete group.
func (*Client) DeleteMessage ¶
func (c *Client) DeleteMessage(param *DeleteMessageRequest) (*DeleteMessageResponse, error)
Chat Message Delete
func (*Client) Directory ¶
func (c *Client) Directory() (*RespDirectory, error)
func (*Client) GetMessage ¶
func (c *Client) GetMessage(param *SingleMessageId) (*GetMessageResponse, error)
Retrieves a single chat message by the provided id. Callee must have permission to access the room where the message resides.
func (*Client) GetPinnedMessages ¶
func (c *Client) GetPinnedMessages(param *GetPinnedMsgRequest) (*GetPinnedMsgResponse, error)
Callee must have permission to access the room where the message resides.
func (*Client) GetSupportedLanguage ¶
func (c *Client) GetSupportedLanguage(query string) (*SupportedLanguageResp, error)
func (*Client) GroupCounters ¶
func (c *Client) GroupCounters(param *GroupCountersRequest) (*GroupCountersResponse, error)
Gets group counters.
func (*Client) GroupInfo ¶
func (c *Client) GroupInfo(param *SimpleGroupRequest) (*GroupInfoResponse, error)
Get group info.
func (*Client) GroupInvite ¶
func (c *Client) GroupInvite(param *InviteGroupRequest) (*InviteGroupResponse, error)
Adds a user to the group.
func (*Client) GroupKick ¶
func (c *Client) GroupKick(param *InviteGroupRequest) (*InviteGroupResponse, error)
Kick a user from the group.
func (*Client) GroupMembers ¶
func (c *Client) GroupMembers(param *SimpleGroupRequest) (*GroupMembersResponse, error)
Gets group members
func (*Client) GroupMessages ¶
func (c *Client) GroupMessages(param *SimpleGroupRequest) (*GroupMessagesResponse, error)
Gets group messages
func (*Client) Hooks ¶
func (c *Client) Hooks(msg *HookMessage, token string) (*HookResponse, error)
func (*Client) Login ¶
func (c *Client) Login(login *LoginPayload) (*LoginResponse, error)
func (*Client) Logout ¶
func (c *Client) Logout() (*LogoutResponse, error)
func (*Client) Me ¶
func (c *Client) Me() (*MeResponse, error)
func (*Client) OpenChannel ¶
func (c *Client) OpenChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
Adds the channel back to the user's list of channels.
func (*Client) OpenGroup ¶
func (c *Client) OpenGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
Adds the group back to the user's list of groups.
func (*Client) PinMessage ¶
func (c *Client) PinMessage(param *SingleMessageId) (*PinMessageResponse, error)
Pins a chat message to the message's channel.
func (*Client) PostMessage ¶
func (c *Client) PostMessage(msg *Message) (*RespPostMessage, error)
Posts a new chat message.
func (*Client) RenameChannel ¶
func (c *Client) RenameChannel(param *RenameChannelRequest) (*RenameChannelResponse, error)
Changes a channel's name.
func (*Client) RenameGroup ¶
func (c *Client) RenameGroup(param *RenameGroupRequest) (*RenameGroupResponse, error)
Changes a group's name.
func (*Client) SendMessage ¶
func (c *Client) SendMessage(msg *FocusedMessage) (*RespPostMessage, error)
Sends a new chat message.
func (*Client) SetAnnouncementChannel ¶
func (c *Client) SetAnnouncementChannel(param *SetAnnouncementRequest) (*SetAnnouncementResponse, error)
Sets the announcement for the channel.
func (*Client) SetAnnouncementGroup ¶
func (c *Client) SetAnnouncementGroup(param *SetAnnouncementRequest) (*SetAnnouncementResponse, error)
Sets the announcement for the group.
func (*Client) SetDescriptionChannel ¶
func (c *Client) SetDescriptionChannel(param *SetDescriptionRequest) (*SetDescriptionResponse, error)
Sets the Description for the channel.
func (*Client) SetDescriptionGroup ¶
func (c *Client) SetDescriptionGroup(param *SetDescriptionRequest) (*SetDescriptionResponse, error)
Sets the Description for the group.
func (*Client) SetTopicChannel ¶
func (c *Client) SetTopicChannel(param *SetTopicRequest) (*SetTopicResponse, error)
Sets the topic for the channel.
func (*Client) SetTopicGroup ¶
func (c *Client) SetTopicGroup(param *SetTopicRequest) (*SetTopicResponse, error)
Sets the topic for the group.
func (*Client) Statistics ¶
func (c *Client) Statistics() (*RespStatistics, error)
func (*Client) StatisticsList ¶
func (c *Client) StatisticsList() (*RespStatisticsList, error)
func (*Client) UnarchiveChannel ¶
func (c *Client) UnarchiveChannel(param *SimpleChannelId) (*SimpleSuccessResponse, error)
Unarchive a channel.
func (*Client) UnarchiveGroup ¶
func (c *Client) UnarchiveGroup(param *SimpleGroupId) (*SimpleSuccessResponse, error)
Unarchive a group.
func (*Client) UnpinMessage ¶
func (c *Client) UnpinMessage(param *SingleMessageId) (*SimpleSuccessResponse, error)
Unpins a chat message to the message's channel.
func (*Client) UsersCreate ¶
func (c *Client) UsersCreate(user *NewUser) (*UserCreateResponse, error)
Create a new user. Requires create-user permission.
func (*Client) UsersCreateToken ¶
func (c *Client) UsersCreateToken(user *SimpleUserRequest) (*CreateTokenResponse, error)
Create a user authentication token.
func (*Client) UsersDeactivateIdle ¶
func (c *Client) UsersDeactivateIdle(params *DeactivateRequest) (*DeactivateResponse, error)
Deactivate Idle users. Requires edit-other-user-active-status permission.
func (*Client) UsersDelete ¶
func (c *Client) UsersDelete(user *UsersDelete) (*SimpleSuccessResponse, error)
Deletes an existing user. Requires delete-user permission.
func (*Client) UsersDeleteOwnAccount ¶
func (c *Client) UsersDeleteOwnAccount(pass string) (*SimpleSuccessResponse, error)
Deletes your own user. Requires Allow Users to Delete Own Account enabled. Accessible from Administration -> Accounts.
func (*Client) UsersForgotPassword ¶
func (c *Client) UsersForgotPassword(email string) (*SimpleSuccessResponse, error)
Send email to reset your password.
func (*Client) UsersGeneratePersonalAccessToken ¶
func (c *Client) UsersGeneratePersonalAccessToken(params *GetNewToken) (*NewTokenResponse, error)
Generate Personal Access Token. Requires create-personal-access-tokens permission.
func (*Client) UsersGetStatus ¶
func (c *Client) UsersGetStatus(user *SimpleUserRequest) (*GetStatusResponse, error)
Gets a user's Status if the query string userId or username is provided, otherwise it gets the callee's.
func (*Client) UsersInfo ¶
func (c *Client) UsersInfo(user *SimpleUserRequest) (*UsersInfoResponse, error)
Retrieves information about a user, the result is only limited to what the callee has access to view.
func (*Client) UsersPresence ¶
func (c *Client) UsersPresence(query string) (*UsersPresenceResponse, error)
Gets all connected users presence
func (*Client) UsersRegister ¶
func (c *Client) UsersRegister(user *UserRegisterRequest) (*UsersInfoResponse, error)
Register a new user.
func (*Client) UsersSetStatus ¶
func (c *Client) UsersSetStatus(status *SetStatus) (*SimpleSuccessResponse, error)
Sets a user Status when the status message and state is given.
func (*Client) UsersUpdate ¶
func (c *Client) UsersUpdate(user *UserUpdateRequest) (*UserUpdateResponse, error)
Update an existing user.
type CreateChannelRequest ¶
type CreateChannelResponse ¶
type CreateGroupRequest ¶
type CreateGroupResponse ¶
type CreateTokenResponse ¶
type DeactivateRequest ¶
type DeactivateResponse ¶
type DeleteMessageRequest ¶
type DeleteMessageResponse ¶
type DontAskAgainList ¶
type FocusedMessage ¶
type FocusedMessage struct {
ID string `json:"_id,omitempty"`
Alias string `json:"alias,omitempty"`
Emoji string `json:"emoji,omitempty"`
Avatar string `json:"avatar,omitempty"`
RoomID string `json:"rid"`
TmID string `json:"tmid,omitempty"`
Text string `json:"msg"`
TShow bool `json:"tshow,omitempty"`
Attachments []Attachment `json:"attachments"`
}
type GetMessageResponse ¶
type GetMessageResponse struct {
Message MessageResp `json:"message"`
Success bool `json:"success"`
}
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 GroupMessage struct {
ID string `json:"_id"`
Rid string `json:"rid"`
Msg string `json:"msg"`
Ts time.Time `json:"ts"`
U U `json:"u"`
UpdatedAt time.Time `json:"_updatedAt"`
Reactions []interface{} `json:"reactions"`
Mentions []U `json:"mentions"`
Channels []interface{} `json:"channels"`
Starred []interface{} `json:"starred"`
}
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 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"`
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 int `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 int `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 Message ¶
type Message struct {
Alias string `json:"alias,omitempty"`
Avatar string `json:"avatar,omitempty"`
Channel string `json:"channel,omitempty"`
Emoji string `json:"emoji,omitempty"`
RoomID string `json:"roomId,omitempty"`
TmID string `json:"tmid,omitempty"`
Text string `json:"text"`
Attachments []Attachment `json:"attachments"`
}
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 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 SendMessageEnvelope ¶
type SendMessageEnvelope struct {
Message FocusedMessage `json:"message"`
}
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 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"`
}