Documentation
¶
Index ¶
- type AssetService
- type BadgeService
- type BaseService
- type BlacklistService
- type ChannelService
- func (c *ChannelService) Create(ctx context.Context, req model.CreateChannelReq) (*model.Channel, error)
- func (c *ChannelService) Delete(ctx context.Context, channelId string) error
- func (c *ChannelService) GetJoinedChannel(ctx context.Context, guildId, userId string, page, pageSize int) (*model.ChannelListResp, error)
- func (c *ChannelService) Kickout(ctx context.Context, channelId string, userIds ...string) error
- func (c *ChannelService) List(ctx context.Context, guildId string, page, pageSize int, channelType int) (*model.ChannelListResp, error)
- func (c *ChannelService) MoveUser(ctx context.Context, channelId string, userIds ...string) error
- func (c *ChannelService) Update(ctx context.Context, req model.UpdateChannelReq) (*model.Channel, error)
- func (c *ChannelService) UserList(ctx context.Context, channelId string) (*model.ChannelUserListResp, error)
- func (c *ChannelService) View(ctx context.Context, targetId string, needChildren bool) (*model.ViewChannelResp, error)
- type CreateThreadReq
- type CreateThreadResp
- type DirectMessageService
- func (s *DirectMessageService) AddReaction(ctx context.Context, msgId, emoji string) error
- func (s *DirectMessageService) Create(ctx context.Context, req model.CreateDirectMessageReq) (*model.CreateDirectMessageResp, error)
- func (s *DirectMessageService) Delete(ctx context.Context, msgId string) error
- func (s *DirectMessageService) DeleteReaction(ctx context.Context, msgId, emoji string) error
- func (s *DirectMessageService) List(ctx context.Context, chatCode, targetId string) (*model.DirectMessageListResp, error)
- func (s *DirectMessageService) Update(ctx context.Context, req model.UpdateDirectMessageReq) error
- func (s *DirectMessageService) View(ctx context.Context, msgId, chatCode string) (*model.DirectMessage, error)
- type EmojiService
- type GameService
- type GuildService
- func (s *GuildService) Kickout(ctx context.Context, guildId, targetId string) error
- func (s *GuildService) Leave(ctx context.Context, guildId string) error
- func (s *GuildService) List(ctx context.Context, page, pageSize int, sort string) (*model.GuildListResp, error)
- func (s *GuildService) UserList(ctx context.Context, guildId string, page, pageSize int) (*model.GuildUserListResp, error)
- func (s *GuildService) View(ctx context.Context, guildId string) (*model.Guild, error)
- type IntimacyService
- type InviteService
- type MessageService
- func (s *MessageService) AddReaction(ctx context.Context, msgId, emoji string) error
- func (s *MessageService) Create(ctx context.Context, req model.CreateMessageRequest) (*model.CreateMessageResp, error)
- func (s *MessageService) Delete(ctx context.Context, msgId string) error
- func (s *MessageService) DeleteReaction(ctx context.Context, msgId, emoji, userId string) error
- func (s *MessageService) List(ctx context.Context, targetId string) (*model.MessageListResp, error)
- func (s *MessageService) Update(ctx context.Context, req model.MessageUpdateReq) error
- func (s *MessageService) View(ctx context.Context, msgId string) (*model.Message, error)
- type RoleService
- func (s *RoleService) Create(ctx context.Context, req model.CreateGuildRoleReq) (*model.GuildRole, error)
- func (s *RoleService) Delete(ctx context.Context, guildId string, roleId int) error
- func (s *RoleService) Grant(ctx context.Context, guildId, userId string, roleId int) error
- func (s *RoleService) List(ctx context.Context, guildId string) (*model.GuildRoleListResp, error)
- func (s *RoleService) Revoke(ctx context.Context, guildId, userId string, roleId int) error
- func (s *RoleService) Update(ctx context.Context, req model.UpdateGuildRoleReq) (*model.GuildRole, error)
- type ThreadService
- type UserService
- type VoiceService
- func (s *VoiceService) Join(ctx context.Context, channelId, password string) (*model.JoinVoiceResp, error)
- func (s *VoiceService) KeepAlive(ctx context.Context, channelId string) error
- func (s *VoiceService) Leave(ctx context.Context, channelId string) error
- func (s *VoiceService) List(ctx context.Context) (*model.VoiceListResp, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type AssetService ¶ added in v0.0.14
type AssetService struct {
*BaseService
}
func (*AssetService) Create ¶ added in v0.0.14
func (s *AssetService) Create(ctx context.Context, file []byte) (*model.AssetCreateResp, error)
type BadgeService ¶ added in v0.0.14
type BadgeService struct {
*BaseService
}
BadgeService
func (*BadgeService) List ¶ added in v0.0.14
func (s *BadgeService) List(ctx context.Context, guildId string) (*model.BadgeListResp, error)
type BaseService ¶
type BaseService struct {
// contains filtered or unexported fields
}
BaseService 基础服务结构
type BlacklistService ¶ added in v0.0.14
type BlacklistService struct {
*BaseService
}
BlacklistService
func (*BlacklistService) List ¶ added in v0.0.14
func (s *BlacklistService) List(ctx context.Context, guildId string) (*model.BlacklistListResp, error)
type ChannelService ¶
type ChannelService struct {
*BaseService
}
func (*ChannelService) Create ¶ added in v0.0.14
func (c *ChannelService) Create(ctx context.Context, req model.CreateChannelReq) (*model.Channel, error)
func (*ChannelService) Delete ¶ added in v0.0.14
func (c *ChannelService) Delete(ctx context.Context, channelId string) error
func (*ChannelService) GetJoinedChannel ¶ added in v0.0.14
func (c *ChannelService) GetJoinedChannel(ctx context.Context, guildId, userId string, page, pageSize int) (*model.ChannelListResp, error)
func (*ChannelService) List ¶ added in v0.0.14
func (c *ChannelService) List(ctx context.Context, guildId string, page, pageSize int, channelType int) (*model.ChannelListResp, error)
func (*ChannelService) Update ¶ added in v0.0.14
func (c *ChannelService) Update(ctx context.Context, req model.UpdateChannelReq) (*model.Channel, error)
func (*ChannelService) UserList ¶ added in v0.0.14
func (c *ChannelService) UserList(ctx context.Context, channelId string) (*model.ChannelUserListResp, error)
func (*ChannelService) View ¶
func (c *ChannelService) View(ctx context.Context, targetId string, needChildren bool) (*model.ViewChannelResp, error)
type CreateThreadReq ¶ added in v0.0.14
type CreateThreadResp ¶ added in v0.0.14
type DirectMessageService ¶ added in v0.0.14
type DirectMessageService struct {
*BaseService
}
func (*DirectMessageService) AddReaction ¶ added in v0.0.14
func (s *DirectMessageService) AddReaction(ctx context.Context, msgId, emoji string) error
func (*DirectMessageService) Create ¶ added in v0.0.14
func (s *DirectMessageService) Create(ctx context.Context, req model.CreateDirectMessageReq) (*model.CreateDirectMessageResp, error)
func (*DirectMessageService) Delete ¶ added in v0.0.14
func (s *DirectMessageService) Delete(ctx context.Context, msgId string) error
func (*DirectMessageService) DeleteReaction ¶ added in v0.0.14
func (s *DirectMessageService) DeleteReaction(ctx context.Context, msgId, emoji string) error
func (*DirectMessageService) List ¶ added in v0.0.14
func (s *DirectMessageService) List(ctx context.Context, chatCode, targetId string) (*model.DirectMessageListResp, error)
func (*DirectMessageService) Update ¶ added in v0.0.14
func (s *DirectMessageService) Update(ctx context.Context, req model.UpdateDirectMessageReq) error
func (*DirectMessageService) View ¶ added in v0.0.14
func (s *DirectMessageService) View(ctx context.Context, msgId, chatCode string) (*model.DirectMessage, error)
type EmojiService ¶ added in v0.0.14
type EmojiService struct {
*BaseService
}
EmojiService
func (*EmojiService) List ¶ added in v0.0.14
func (s *EmojiService) List(ctx context.Context, guildId string) (*model.GuildEmojiListResp, error)
type GameService ¶ added in v0.0.14
type GameService struct {
*BaseService
}
GameService
func (*GameService) UpdateActivity ¶ added in v0.0.14
func (s *GameService) UpdateActivity(ctx context.Context, req model.GameActivityReq) error
type GuildService ¶ added in v0.0.14
type GuildService struct {
*BaseService
}
func (*GuildService) Kickout ¶ added in v0.0.14
func (s *GuildService) Kickout(ctx context.Context, guildId, targetId string) error
func (*GuildService) Leave ¶ added in v0.0.14
func (s *GuildService) Leave(ctx context.Context, guildId string) error
func (*GuildService) List ¶ added in v0.0.14
func (s *GuildService) List(ctx context.Context, page, pageSize int, sort string) (*model.GuildListResp, error)
func (*GuildService) UserList ¶ added in v0.0.14
func (s *GuildService) UserList(ctx context.Context, guildId string, page, pageSize int) (*model.GuildUserListResp, error)
type IntimacyService ¶ added in v0.0.14
type IntimacyService struct {
*BaseService
}
IntimacyService
func (*IntimacyService) Update ¶ added in v0.0.14
func (s *IntimacyService) Update(ctx context.Context, req model.IntimacyUpdateReq) error
type InviteService ¶ added in v0.0.14
type InviteService struct {
*BaseService
}
InviteService
func (*InviteService) List ¶ added in v0.0.14
func (s *InviteService) List(ctx context.Context, guildId, channelId string) (*model.InviteListResp, error)
type MessageService ¶ added in v0.0.13
type MessageService struct {
*BaseService
}
func (*MessageService) AddReaction ¶ added in v0.0.14
func (s *MessageService) AddReaction(ctx context.Context, msgId, emoji string) error
func (*MessageService) Create ¶ added in v0.0.13
func (s *MessageService) Create(ctx context.Context, req model.CreateMessageRequest) (*model.CreateMessageResp, error)
func (*MessageService) Delete ¶ added in v0.0.14
func (s *MessageService) Delete(ctx context.Context, msgId string) error
func (*MessageService) DeleteReaction ¶ added in v0.0.14
func (s *MessageService) DeleteReaction(ctx context.Context, msgId, emoji, userId string) error
func (*MessageService) List ¶ added in v0.0.14
func (s *MessageService) List(ctx context.Context, targetId string) (*model.MessageListResp, error)
func (*MessageService) Update ¶ added in v0.0.14
func (s *MessageService) Update(ctx context.Context, req model.MessageUpdateReq) error
type RoleService ¶ added in v0.0.14
type RoleService struct {
*BaseService
}
func (*RoleService) Create ¶ added in v0.0.14
func (s *RoleService) Create(ctx context.Context, req model.CreateGuildRoleReq) (*model.GuildRole, error)
func (*RoleService) List ¶ added in v0.0.14
func (s *RoleService) List(ctx context.Context, guildId string) (*model.GuildRoleListResp, error)
func (*RoleService) Update ¶ added in v0.0.14
func (s *RoleService) Update(ctx context.Context, req model.UpdateGuildRoleReq) (*model.GuildRole, error)
type ThreadService ¶ added in v0.0.14
type ThreadService struct {
*BaseService
}
func (*ThreadService) Create ¶ added in v0.0.14
func (s *ThreadService) Create(ctx context.Context, req CreateThreadReq) (*CreateThreadResp, error)
type UserService ¶ added in v0.0.14
type UserService struct {
*BaseService
}
func (*UserService) Me ¶ added in v0.0.14
func (s *UserService) Me(ctx context.Context) (*model.UserMeResp, error)
func (*UserService) Offline ¶ added in v0.0.14
func (s *UserService) Offline(ctx context.Context) error
func (*UserService) View ¶ added in v0.0.14
func (s *UserService) View(ctx context.Context, userId string, guildId string) (*model.UserViewResp, error)
type VoiceService ¶ added in v0.0.14
type VoiceService struct {
*BaseService
}
func (*VoiceService) Join ¶ added in v0.0.14
func (s *VoiceService) Join(ctx context.Context, channelId, password string) (*model.JoinVoiceResp, error)
func (*VoiceService) KeepAlive ¶ added in v0.0.14
func (s *VoiceService) KeepAlive(ctx context.Context, channelId string) error
func (*VoiceService) Leave ¶ added in v0.0.14
func (s *VoiceService) Leave(ctx context.Context, channelId string) error
func (*VoiceService) List ¶ added in v0.0.14
func (s *VoiceService) List(ctx context.Context) (*model.VoiceListResp, error)
Click to show internal directories.
Click to hide internal directories.