Versions in this module Expand all Collapse all v0 v0.0.3 Mar 11, 2021 Changes in this version type Client + func (c *Client) GetUserInfo(user *models.User) (*models.User, error) + type UserResponse struct + User models.User v0.0.2 Mar 10, 2021 Changes in this version + var ErrResponse = fmt.Errorf("got false response") + type ChannelMembersResponse struct + Members []models.User + type ChannelMessagesResponse struct + Messages []models.Message + type ChannelResponse struct + Channel models.Channel + type ChannelsResponse struct + Channels []models.Channel + type Client struct + Debug bool + Host string + Path string + Port string + Protocol string + Version string + func NewClient(serverURL *url.URL, debug bool) *Client + func (c *Client) AddOwnerGroup(group *models.InviteGroupRequest) (*models.Group, error) + func (c *Client) CreateGroup(group *models.CreateGroupRequest) (*models.Group, error) + func (c *Client) CreateToken(userID, username string) (*models.UserCredentials, error) + func (c *Client) CreateUser(req *models.CreateUserRequest) (*CreateUserResponse, error) + func (c *Client) DeleteGroup(group *models.Group) error + func (c *Client) Get(api string, params url.Values, response Response) error + func (c *Client) GetChannelInfo(channel *models.Channel) (*models.Channel, error) + func (c *Client) GetDirectory(params url.Values) (*models.Directory, error) + func (c *Client) GetGroupInfo(group *models.Group) (*models.Group, error) + func (c *Client) GetJoinedChannels(params url.Values) (*ChannelsResponse, error) + func (c *Client) GetMessages(channel *models.Channel, page *models.Pagination) ([]models.Message, error) + func (c *Client) GetPrivateGroups() (*GroupsResponse, error) + func (c *Client) GetPublicChannels() (*ChannelsResponse, error) + func (c *Client) GetServerInfo() (*models.Info, error) + func (c *Client) GetSpotlight(params url.Values) (*models.Spotlight, error) + func (c *Client) GetStatistics() (*models.StatisticsInfo, error) + func (c *Client) GetStatisticsList(params url.Values) (*models.StatisticsList, error) + func (c *Client) HistoryGroup(group *models.Group) ([]models.Message, error) + func (c *Client) InviteGroup(group *models.InviteGroupRequest) (*models.Group, error) + func (c *Client) KickGroup(group *models.InviteGroupRequest) (*models.Group, error) + func (c *Client) LeaveChannel(channel *models.Channel) error + func (c *Client) LeaveGroup(group *models.Group) error + func (c *Client) ListGroup() ([]models.Group, error) + func (c *Client) Login(credentials *models.UserCredentials) error + func (c *Client) Logout() (string, error) + func (c *Client) MembersGroup(group *models.Group) ([]models.User, error) + func (c *Client) MessagesGroup(group *models.Group) ([]models.Message, error) + func (c *Client) Post(api string, body io.Reader, response Response) error + func (c *Client) PostForm(api string, params url.Values, response Response) error + func (c *Client) PostMessage(msg *models.PostMessage) (*MessageResponse, error) + func (c *Client) RemoveOwnerGroup(group *models.InviteGroupRequest) (*models.Group, error) + func (c *Client) Send(channel *models.Channel, msg string) error + func (c *Client) SetAnnouncementGroup(groupID, announcement string) error + func (c *Client) SetUserAvatar(userID, username, avatarURL string) (*Status, error) + func (c *Client) UpdatePermissions(req *UpdatePermissionsRequest) (*UpdatePermissionsResponse, error) + func (c *Client) UpdateUser(req *models.UpdateUserRequest) (*CreateUserResponse, error) + type CreateUserResponse struct + User struct{ ... } + type DirectoryResponse struct + type GroupMembersResponse = ChannelMembersResponse + type GroupMessagesResponse = ChannelMessagesResponse + type GroupResponse struct + Group models.Group + type GroupsResponse struct + Groups []models.Group + type InfoResponse struct + Info models.Info + type MessageResponse struct + Message models.Message + type MessagesResponse struct + Messages []models.Message + type Response interface + OK func() error + type SpotlightResponse struct + type StatisticsListResponse struct + type StatisticsResponse struct + type Status struct + Error string + Message string + Status string + Success bool + func (s Status) OK() error + type StatusResponse struct + Channel string + type UpdatePermissionsRequest struct + Permissions []models.Permission + type UpdatePermissionsResponse struct + Permissions []models.Permission