Versions in this module Expand all Collapse all v1 v1.0.2 Jul 4, 2022 Changes in this version type Client + func (c *Client) GetAuthInfo() (xUserId string, xAuthToken string) v1.0.1 Jul 4, 2022 Changes in this version + var ResponseErr = fmt.Errorf("got false response") + 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) CreateDirectMessage(username string) (*Room, error) + func (c *Client) CreateToken(userID, username string) (*models.UserCredentials, error) + func (c *Client) CreateUser(req *models.CreateUserRequest) (*CreateUserResponse, 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(channel *models.Channel) (*models.Channel, 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) GetUserStatus(username string) (*UserStatusResponse, error) + func (c *Client) LeaveChannel(channel *models.Channel) error + func (c *Client) Login(credentials *models.UserCredentials) error + func (c *Client) Logout() (string, 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) Send(channel *models.Channel, msg 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 DirectMessageResponse struct + Room Room + type DirectoryResponse struct + type GroupResponse struct + Group models.Channel + type GroupsResponse struct + Groups []models.Channel + 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 Room struct + ID string + Rid string + Type string + Usernames []string + 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 + type UserStatusResponse struct + ConnectionStatus string + Error string + ID string + Message string + Status string + Success bool + func (s UserStatusResponse) OK() error