Versions in this module Expand all Collapse all v0 v0.0.4 Mar 19, 2021 Changes in this version + const IDField + const NameField + const RoomIDField + const UserNameField + var ErrResponse = fmt.Errorf("got false response") + func ChatErrorNotFound(err error) bool + func IsCharError(err error) bool + func StringsToAny(s []string) []interface + 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 ChatError struct + Status Status + func AsCharError(err error) (ChatError, bool) + func NewChatError(status Status, err error) ChatError + type Client struct + Client HTTPClient + Debug bool + Host string + Path string + Port string + Protocol string + Version string + func NewClient(server *url.URL, opts ...ClientOption) *Client + func (c *Client) AddGroupOwner(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 Parameters, response Response) error + func (c *Client) GetChannelInfo(channel *models.Channel) (*models.Channel, error) + func (c *Client) GetDirectory(params Parameters) (*models.Directory, error) + func (c *Client) GetGroupInfo(group *models.Group) (*models.Group, error) + func (c *Client) GetJoinedChannels(params Parameters) (*ChannelsResponse, error) + func (c *Client) GetMessages(channel *models.Channel, page *models.Pagination) ([]models.Message, error) + func (c *Client) GetPublicChannels() (*ChannelsResponse, error) + func (c *Client) GetServerInfo() (*models.Info, error) + func (c *Client) GetSpotlight(params Parameters) (*models.Spotlight, error) + func (c *Client) GetStatistics() (*models.StatisticsInfo, error) + func (c *Client) GetStatisticsList(params Parameters) (*models.StatisticsList, error) + func (c *Client) GetUserInfo(user *models.User) (*models.User, error) + func (c *Client) GroupHistory(group *models.Group) ([]models.Message, error) + func (c *Client) GroupInviteUser(group *models.InviteGroupRequest) (*models.Group, error) + func (c *Client) GroupKickUser(group *models.InviteGroupRequest) (*models.Group, error) + func (c *Client) GroupList(params Parameters) ([]models.Group, error) + func (c *Client) GroupMembers(group *models.Group) ([]models.User, error) + func (c *Client) GroupMessages(group *models.Group) ([]models.Message, error) + func (c *Client) LeaveChannel(channel *models.Channel) error + func (c *Client) LeaveGroup(group *models.Group) error + func (c *Client) ListAllGroups(params Parameters) ([]models.Group, error) + func (c *Client) ListAllUsers(params Parameters) ([]models.User, 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 Parameters, response Response) error + func (c *Client) PostMessage(msg *models.PostMessage) (*MessageResponse, error) + func (c *Client) RemoveGroupOwner(group *models.InviteGroupRequest) (*models.Group, error) + func (c *Client) Send(channel *models.Channel, msg string) error + func (c *Client) SetGroupAnnouncement(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 ClientOption func(*Client) + func WithDebug(b bool) ClientOption + func WithHTTPClient(client HTTPClient) ClientOption + type CreateUserResponse struct + User struct{ ... } + type DirectoryResponse struct + type Fields map[string]interface + func (f Fields) Add(name string, value interface{}) Fields + func (f Fields) Encode() string + func (f Fields) ID(id string) Fields + func (f Fields) String() string + func NewFields() Fields + type GroupMembersResponse = ChannelMembersResponse + type GroupMessagesResponse = ChannelMessagesResponse + type GroupResponse struct + Group models.Group + type GroupsResponse struct + Groups []models.Group + type HTTPClient interface + Do func(req *http.Request) (*http.Response, error) + type InfoResponse struct + Info models.Info + type MessageResponse struct + Message models.Message + type MessagesResponse struct + Messages []models.Message + type Parameters interface + Encode func() string + type Query map[string]interface + func (q Query) Add(name string, value interface{}) Query + func (q Query) And(value ...Query) Query + func (q Query) Encode() string + func (q Query) Equal(value interface{}) Query + func (q Query) Greater(value interface{}) Query + func (q Query) GreaterOrEqual(value interface{}) Query + func (q Query) ID(id string) Query + func (q Query) In(values ...interface{}) Query + func (q Query) Less(value interface{}) Query + func (q Query) LessOrEqual(value interface{}) Query + func (q Query) Not(value Query) Query + func (q Query) NotEqual(value interface{}) Query + func (q Query) NotIn(value ...interface{}) Query + func (q Query) NotOr(value ...Query) Query + func (q Query) Or(value ...Query) Query + func (q Query) Regex(pattern string) Query + func (q Query) String() string + func NewQuery() Query + 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 + type UserResponse struct + User models.User + type UsersResponse struct + Users []models.User