Documentation ¶
Index ¶
- Variables
- type API
- func (api *API) AddMembers(ctx context.Context, communityID types.HexBytes, chatID string, ...) (*GroupChatResponseWithInvitations, error)
- func (api *API) CreateGroupChat(ctx context.Context, communityID types.HexBytes, name string, members []string) (*GroupChatResponse, error)
- func (api *API) CreateGroupChatFromInvitation(communityID types.HexBytes, name string, chatID string, adminPK string) (*GroupChatResponse, error)
- func (api *API) CreateOneToOneChat(ctx context.Context, communityID types.HexBytes, ID types.HexBytes, ...) (*CreateOneToOneChatResponse, error)
- func (api *API) EditChat(ctx context.Context, communityID types.HexBytes, chatID string, name string, ...) (*Chat, error)
- func (api *API) GetChannelGroupByID(ctx context.Context, channelGroupID string) (map[string]ChannelGroup, error)
- func (api *API) GetChannelGroups(ctx context.Context) (map[string]ChannelGroup, error)
- func (api *API) GetChat(ctx context.Context, communityID types.HexBytes, chatID string) (*Chat, error)
- func (api *API) GetGroupChatInvitations() ([]*protocol.GroupChatInvitation, error)
- func (api *API) GetMembers(ctx context.Context, communityID types.HexBytes, chatID string) (map[string]Member, error)
- func (api *API) JoinChat(ctx context.Context, communityID types.HexBytes, chatID string) (*Chat, error)
- func (api *API) LeaveChat(ctx context.Context, communityID types.HexBytes, chatID string, remove bool) (*GroupChatResponse, error)
- func (api *API) MakeAdmin(ctx context.Context, communityID types.HexBytes, chatID string, member string) (*GroupChatResponse, error)
- func (api *API) RemoveMember(ctx context.Context, communityID types.HexBytes, chatID string, member string) (*GroupChatResponse, error)
- func (api *API) RenameChat(ctx context.Context, communityID types.HexBytes, chatID string, name string) (*GroupChatResponse, error)
- func (api *API) SendAudio(ctx context.Context, communityID types.HexBytes, chatID string, ...) (*SendMessageResponse, error)
- func (api *API) SendGroupChatInvitationRejection(ctx context.Context, invitationRequestID string) ([]*protocol.GroupChatInvitation, error)
- func (api *API) SendGroupChatInvitationRequest(ctx context.Context, communityID types.HexBytes, chatID string, adminPK string, ...) (*GroupChatResponseWithInvitations, error)
- func (api *API) SendImages(ctx context.Context, communityID types.HexBytes, chatID string, ...) (*SendMessageResponse, error)
- func (api *API) SendMessage(ctx context.Context, communityID types.HexBytes, chatID string, text string, ...) (*SendMessageResponse, error)
- func (api *API) SendSticker(ctx context.Context, communityID types.HexBytes, chatID string, packID int32, ...) (*SendMessageResponse, error)
- func (api *API) StartGroupChat(ctx context.Context, communityID types.HexBytes, name string, members []string) (*StartGroupChatResponse, error)
- type ChannelGroup
- type ChannelGroupType
- type Chat
- type CreateOneToOneChatResponse
- type GroupChatResponse
- type GroupChatResponseWithInvitations
- type Member
- type PinnedMessages
- type SendMessageResponse
- type Service
- type StartGroupChatResponse
Constants ¶
This section is empty.
Variables ¶
Functions ¶
This section is empty.
Types ¶
type API ¶
type API struct {
// contains filtered or unexported fields
}
func (*API) AddMembers ¶
func (*API) CreateGroupChat ¶
func (*API) CreateGroupChatFromInvitation ¶
func (*API) CreateOneToOneChat ¶
func (*API) GetChannelGroupByID ¶ added in v0.148.4
func (*API) GetChannelGroups ¶ added in v0.140.2
func (*API) GetGroupChatInvitations ¶
func (api *API) GetGroupChatInvitations() ([]*protocol.GroupChatInvitation, error)
func (*API) GetMembers ¶
func (*API) RemoveMember ¶
func (*API) RenameChat ¶
func (*API) SendGroupChatInvitationRejection ¶
func (*API) SendGroupChatInvitationRequest ¶
func (*API) SendImages ¶
func (*API) SendMessage ¶
func (*API) SendSticker ¶
type ChannelGroup ¶
type ChannelGroup struct { Type ChannelGroupType `json:"channelGroupType"` Name string `json:"name"` Images map[string]images.IdentityImage `json:"images"` Color string `json:"color"` Chats map[string]*Chat `json:"chats"` Categories map[string]communities.CommunityCategory `json:"categories"` EnsName string `json:"ensName"` MemberRole protobuf.CommunityMember_Roles `json:"memberRole"` Verified bool `json:"verified"` Description string `json:"description"` IntroMessage string `json:"introMessage"` OutroMessage string `json:"outroMessage"` Tags []communities.CommunityTag `json:"tags"` Permissions *protobuf.CommunityPermissions `json:"permissions"` Members map[string]*protobuf.CommunityMember `json:"members"` CanManageUsers bool `json:"canManageUsers"` Muted bool `json:"muted"` BanList []string `json:"banList"` Encrypted bool `json:"encrypted"` CommunityTokensMetadata []*protobuf.CommunityTokenMetadata `json:"communityTokensMetadata"` UnviewedMessagesCount int `json:"unviewedMessagesCount"` UnviewedMentionsCount int `json:"unviewedMentionsCount"` CheckChannelPermissionResponses map[string]*communities.CheckChannelPermissionsResponse `json:"checkChannelPermissionResponses"` PubsubTopic string `json:"pubsubTopic"` PubsubTopicKey string `json:"pubsubTopicKey"` Shard *shard.Shard `json:"shard"` }
type ChannelGroupType ¶
type ChannelGroupType string
const Community ChannelGroupType = "community"
const Personal ChannelGroupType = "personal"
type Chat ¶
type Chat struct { ID string `json:"id"` Name string `json:"name"` Description string `json:"description"` Color string `json:"color"` Emoji string `json:"emoji"` Active bool `json:"active"` ChatType protocol.ChatType `json:"chatType"` Timestamp int64 `json:"timestamp"` LastClockValue uint64 `json:"lastClockValue"` DeletedAtClockValue uint64 `json:"deletedAtClockValue"` ReadMessagesAtClockValue uint64 `json:"readMessagesAtClockValue"` UnviewedMessagesCount uint `json:"unviewedMessagesCount"` UnviewedMentionsCount uint `json:"unviewedMentionsCount"` LastMessage *common.Message `json:"lastMessage"` Members map[string]Member `json:"members,omitempty"` MembershipUpdates []v1protocol.MembershipUpdateEvent `json:"membershipUpdateEvents"` Alias string `json:"alias,omitempty"` Identicon string `json:"identicon"` Muted bool `json:"muted"` InvitationAdmin string `json:"invitationAdmin,omitempty"` ReceivedInvitationAdmin string `json:"receivedInvitationAdmin,omitempty"` Profile string `json:"profile,omitempty"` CommunityID string `json:"communityId"` CategoryID string `json:"categoryId"` Position int32 `json:"position,omitempty"` Permissions *protobuf.CommunityPermissions `json:"permissions,omitempty"` Joined int64 `json:"joined,omitempty"` SyncedTo uint32 `json:"syncedTo,omitempty"` SyncedFrom uint32 `json:"syncedFrom,omitempty"` FirstMessageTimestamp uint32 `json:"firstMessageTimestamp,omitempty"` Highlight bool `json:"highlight,omitempty"` PinnedMessages *PinnedMessages `json:"pinnedMessages,omitempty"` CanPost bool `json:"canPost"` Base64Image string `json:"image,omitempty"` }
type GroupChatResponse ¶
type GroupChatResponseWithInvitations ¶
type GroupChatResponseWithInvitations struct { Chat *Chat `json:"chat"` Messages []*common.Message `json:"messages"` Invitations []*protocol.GroupChatInvitation `json:"invitations"` }
type Member ¶
type Member struct { // Community Role Role protobuf.CommunityMember_Roles `json:"role,omitempty"` // Joined indicates if the member has joined the group chat Joined bool `json:"joined"` }
type PinnedMessages ¶
type PinnedMessages struct { Cursor string PinnedMessages []*common.PinnedMessage }
type SendMessageResponse ¶
Click to show internal directories.
Click to hide internal directories.