Versions in this module Expand all Collapse all v0 v0.1.3 Oct 25, 2022 Changes in this version + type AddAllRequest struct + ActiveUsersOnly bool + RoomId string + type AddAllResponse struct + Channel Channel + Success bool + type AddGroupPermissionRequest struct + RoomId string + UserId string + type Apps struct + Enabled bool + EngineVersion string + TotalActive int + TotalInstalled int + type AttachField struct + Short bool + Title string + Value string + type Attachment struct + AudioURL string + AuthorIcon string + AuthorLink string + AuthorName string + Collapsed bool + Color string + Fields []AttachField + ImageURL string + MessageLink string + Text string + ThumbURL string + Title string + TitleLink string + TitleLinkDownload bool + Ts time.Time + VideoURL string + type Build struct + Arch string + Cpus int + Date time.Time + FreeMemory int + NodeVersion string + OsRelease string + Platform string + TotalMemory int64 + type Channel struct + ID string + Msgs int + Name string + T string + Ts time.Time + U U + Usernames []string + type ChannelCountersRequest struct + RoomId string + RoomName string + UserId string + type ChannelCountersResponse struct + Joined bool + Latest time.Time + Members int + Msgs int + Success bool + Unreads int + UnreadsFrom time.Time + UserMentions int + type ChannelHistoryRequest struct + Count int + Inclusive bool + Latest time.Time + Offset int + Oldest time.Time + RoomId string + Unreads bool + type ChannelInfo struct + Broadcast bool + CustomFields struct{} + Default bool + Encrypted bool + Fname string + ID string + Msgs int + Name string + Ro bool + SysMes bool + T string + Ts time.Time + U UChat + UpdatedAt time.Time + UsersCount int + type ChannelInfoResponse struct + Channel ChannelInfo + Success bool + type ChannelList struct + ID string + Msgs int + Name string + Ro bool + SysMes bool + T string + Ts time.Time + U UChat + UpdatedAt time.Time + Usernames []string + type ChannelListResponse struct + Channels []ChannelList + Count int + Offset int + Success bool + Total int + type ChannelMembersResponse struct + Count int + Members []Member + Offset int + Success bool + Total int + type Client struct + HTTPClient *http.Client + func NewClient(url string) *Client + func NewWithOptions(url string, opts ...Option) *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) 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 struct + Author string + Branch string + Date string + Hash string + Subject string + Tag string + type Cpus struct + Model string + Speed int + Times Times + type CreateChannelRequest struct + Members []string + Name string + ReadOnly bool + type CreateChannelResponse struct + Channel Channel + Success bool + type CreateGroupRequest struct + Members []string + Name string + ReadOnly bool + type CreateGroupResponse struct + Group Channel + Success bool + type CreateTokenResponse struct + Data struct{ ... } + Success bool + type DataLogin struct + AuthToken string + Me Me + UserID string + type DeactivateRequest struct + DaysIdle string + Role string + type DeactivateResponse struct + Count int + Success bool + type DeleteMessageRequest struct + AsUser bool + MsgID string + RoomID string + type DeleteMessageResponse struct + ID string + Success bool + Ts int64 + type Deploy struct + Method string + Platform string + type DontAskAgainList struct + Action string + Label string + type Email struct + Address string + Verified bool + type GetMessageResponse struct + Message MessageResp + Success bool + type GetNewToken struct + Token string + TwoFactor bool + type GetPinnedMsgRequest struct + Count int + Offset int + RoomId string + type GetPinnedMsgResponse struct + Count int + Messages []PinnedMessage + Offset int + Success bool + Total int + type GetStatusResponse struct + ConnectionStatus string + Message string + Status string + Success bool + type GroupCountersRequest struct + RoomId string + RoomName string + UserId string + type GroupCountersResponse struct + Joined bool + Latest time.Time + Members int + Msgs int + Success bool + Unreads int + UnreadsFrom time.Time + UserMentions int + type GroupInfoResponse struct + Group groupInfo + Success bool + type GroupListResponse struct + Count int + Groups []groupList + Offset int + Success bool + Total int + type GroupMembersResponse struct + Count int + Members []Member + Offset int + Success bool + Total int + type GroupMessage struct + Channels []interface{} + ID string + Mentions []U + Msg string + Reactions []interface{} + Rid string + Starred []interface{} + Ts time.Time + U U + UpdatedAt time.Time + type GroupMessagesResponse struct + Count int + Messages []GroupMessage + Offset int + Success bool + Total int + type HookAttachment struct + Color string + ImageURL string + Text string + Title string + TitleLink string + type HookMessage struct + Attachments []HookAttachment + Text string + type HookResponse struct + Success bool + type Integrations struct + TotalIncoming int + TotalIncomingActive int + TotalIntegrations int + TotalOutgoing int + TotalOutgoingActive int + TotalWithScriptEnabled int + type InviteChannelRequest struct + RoomId string + UserId string + type InviteChannelResponse struct + Channel struct{ ... } + Success bool + type InviteGroupRequest struct + RoomId string + UserId string + type InviteGroupResponse struct + Group struct{ ... } + Success bool + type LastMessage struct + Alias string + Attachments []interface{} + Channels []interface{} + Groupable bool + ID string + Mentions []interface{} + Msg string + ParseUrls bool + Rid string + Ts time.Time + U U + UpdatedAt time.Time + type LoginPayload struct + Password string + Resume string + User string + type LoginResponse struct + Data DataLogin + Message string + Status string + type LogoutResponse struct + Data struct{ ... } + Status string + type Me struct + Active bool + AvatarOrigin string + AvatarURL string + Email string + Emails []Email + ID string + Language string + Name string + RequirePasswordChange bool + Roles []string + Services Services + Settings Settings + Status string + StatusConnection string + StatusText string + UpdatedAt time.Time + Username string + UtcOffset int + type MeResponse struct + Active bool + AvatarOrigin string + AvatarURL string + Email string + Emails []Email + ID string + Language string + Name string + RequirePasswordChange bool + Roles []string + Services Services + Settings Settings + Status string + StatusConnection string + StatusText string + Success bool + UpdatedAt time.Time + Username string + UtcOffset int + type Member struct + ID string + Name string + Status string + Username string + type Message struct + Alias string + Attachments []Attachment + Avatar string + Channel string + Emoji string + RoomID string + Text string + type MessageResp struct + ID string + Msg string + Rid string + Ts time.Time + U struct{ ... } + type Migration struct + ID string + Locked bool + Version int + type NewTokenResponse struct + Success bool + Token string + type NewUser struct + Active bool + CustomFields string + Email string + JoinDefaultChannels bool + Name string + Password string + RequirePasswordChange bool + Roles []string + SendWelcomeEmail bool + Username string + Verified bool + type Option func(*Client) + func WithTimeout(d time.Duration) Option + func WithUserID(userID string) Option + func WithXToken(xtoken string) Option + type Os struct + Arch string + Cpus []Cpus + Freemem int + Loadavg []float64 + Platform string + Release string + Totalmem int64 + Type string + Uptime int + type PaginationStruct struct + Count int + Offset int + Sort string + type Password struct + Bcrypt string + type PinMessageResponse struct + Message struct{ ... } + Success bool + type PinnedMessage struct + Channels []interface{} + ID string + Mentions []interface{} + Msg string + Pinned bool + PinnedAt time.Time + PinnedBy struct{ ... } + Rid string + Ts time.Time + U struct{ ... } + UpdatedAt time.Time + type Preferences struct + AudioNotifications string + AutoImageLoad bool + CollapseMediaByDefault bool + ConvertASCIIEmoji bool + DesktopNotificationDuration int + DesktopNotificationRequireInteraction bool + DesktopNotifications string + DontAskAgainList []DontAskAgainList + EmailNotificationMode string + EnableAutoAway bool + HideAvatars bool + HideFlexTab bool + HideRoles bool + HideUsernames bool + Highlights []interface{} + IdleTimeLimit int + Language string + MessageViewMode int + MobileNotifications string + MuteFocusedConversations bool + NewMessageNotification string + NewRoomNotification string + NotificationsSoundVolume int + SaveMobileBandwidth bool + SendOnEnter string + SidebarGroupByType bool + SidebarHideAvatar bool + SidebarShowDiscussion bool + SidebarShowFavorites bool + SidebarShowUnread bool + SidebarSortby string + SidebarViewMode string + UnreadAlert bool + UseEmojis bool + type Process struct + NodeVersion string + Pid int + Uptime float64 + type RenameChannelRequest struct + NewName string + RoomId string + type RenameChannelResponse struct + Channel ChannelList + Success bool + type RenameGroupRequest struct + NewName string + RoomId string + type RenameGroupResponse struct + Group groupList + Success bool + type RespDirectory struct + Count int + Offset int + Result []Result + Success bool + Total int + type RespInfo struct + Info struct{ ... } + Success bool + type RespMessageData struct + Alias string + Groupable bool + ID string + Msg string + ParseUrls bool + Rid string + Ts time.Time + U UChat + UpdatedAt time.Time + type RespPostMessage struct + Channel string + Error string + ErrorType string + Message RespMessageData + Success bool + Ts int64 + type RespSpotlight struct + Error string + Rooms []RoomsInfo + Success bool + Users []UsersInfo + type RespStatistics struct + ActiveGuests int + ActiveUsers int + AppUsers int + Apps Apps + AwayUsers int + CreatedAt time.Time + Deploy Deploy + EnterpriseReady bool + FederatedServers int + FederatedUsers int + ID string + InstalledAt time.Time + InstanceCount int + Integrations Integrations + LastLogin time.Time + LastMessageSentAt time.Time + LastSeenSubscription time.Time + LivechatEnabled bool + Migration Migration + MongoStorageEngine string + MongoVersion string + NonActiveUsers int + OfflineUsers int + OnlineUsers int + OplogEnabled bool + Os Os + Process Process + PushQueue int + Success bool + TotalChannelMessages int + TotalChannels int + TotalConnectedUsers int + TotalDirect int + TotalDirectMessages int + TotalDiscussions int + TotalLivechat int + TotalLivechatAgents int + TotalLivechatMessages int + TotalLivechatVisitors int + TotalMessages int + TotalPrivateGroupMessages int + TotalPrivateGroups int + TotalRooms int + TotalThreads int + TotalUsers int + UniqueDevicesOfLastMonth Stats + UniqueDevicesOfYesterday Stats + UniqueID string + UniqueOSOfLastMonth Stats + UniqueOSOfYesterday Stats + UniqueUsersOfLastMonth Stats + UniqueUsersOfYesterday Stats + UpdatedAt time.Time + UploadsTotal int + UploadsTotalSize int + Version string + Wizard Wizard + type RespStatisticsList struct + Count int + Offset int + Statistics []struct{ ... } + Success bool + Total int + type Result struct + Default bool + ID string + LastMessage LastMessage + Name string + T string + Ts time.Time + UsersCount int + type RoomsInfo struct + ID string + LastMessage LastMessage + Name string + T string + type Services struct + Password Password + type SetAnnouncementRequest struct + Announcement string + RoomId string + type SetAnnouncementResponse struct + Announcement string + Success bool + type SetDescriptionRequest struct + Description string + RoomId string + type SetDescriptionResponse struct + Description string + Success bool + type SetStatus struct + Message string + Status string + type SetTopicRequest struct + RoomId string + Topic string + type SetTopicResponse struct + Success bool + Topic string + type Settings struct + Preferences Preferences + type SimpleChannelId struct + RoomId string + type SimpleChannelRequest struct + RoomId string + RoomName string + type SimpleGroupId struct + RoomId string + type SimpleGroupRequest struct + RoomId string + RoomName string + type SimpleSuccessResponse struct + Success bool + type SimpleUserRequest struct + UserId string + Username string + type SingleMessageId struct + MessageId string + type Stats struct + Data []interface{} + Day int + Month int + Year int + type SupportedLanguageResp struct + Languages []language + Success bool + type Times struct + Idle int + Irq int + Nice int + Sys int + User int + type U struct + ID string + Name string + Username string + type UChat struct + ID string + Username string + type UserCreateResponse struct + Success bool + User userCreateInfo + type UserRegisterRequest struct + Email string + Name string + Pass string + SecretURL string + Username string + type UserUpdateData struct + Active bool + Email string + Name string + Password string + RequirePasswordChange bool + Roles []string + SendWelcomeEmail bool + Username string + Verified bool + type UserUpdateRequest struct + Data UserUpdateData + UserId string + type UserUpdateResponse struct + Success bool + User userUpdateInfo + type UsersDelete struct + Username string + type UsersInfo struct + ID string + Name string + Status string + StatusText string + Username string + type UsersInfoResponse struct + Success bool + User singleUserInfo + type UsersPresenceResponse struct + Full bool + Success bool + Users []user + type Wizard struct + Country string + Industry string + Language string + OrganizationType string + RegisterServer bool + ServerType string + Size string