group

package
v0.0.0-...-5349944 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 28, 2023 License: MIT Imports: 12 Imported by: 1

Documentation

Index

Constants

View Source
const (
	// 获取群信息
	// get_group_info
	API_GET_GROUP_INFO = "get_group_info"
	// 获取群列表
	// get_group_list
	API_GET_GROUP_LIST = "get_group_list"
	// 获取群成员信息
	// get_group_member_info
	API_GET_GROUP_MEMBER_INFO = "get_group_member_info"
	// 获取群成员列表
	// get_group_member_list
	API_GET_GROUP_MEMBER_LIST = "get_group_member_list"
	// 获取群荣誉信息
	// get_group_honor_info
	API_GET_GROUP_HONOR_INFO = "get_group_honor_info"
	// 获取群系统消息
	// get_group_system_msg
	API_GET_GROUP_SYSTEM_MSG = "get_group_system_msg"
	// 获取精华消息列表
	// get_essence_msg_list
	API_GET_ESSENCE_MSG_LIST = "get_essence_msg_list"
	// 获取群 @全体成员 剩余次数
	// get_group_at_all_remain
	API_GET_GROUP_AT_ALL_REMAIN = "get_group_at_all_remain"
)

Variables

View Source
var File_api_group_proto protoreflect.FileDescriptor

Functions

func RegisterOnebotApiGroupGRPCServiceServer

func RegisterOnebotApiGroupGRPCServiceServer(s *grpc.Server, srv OnebotApiGroupGRPCServiceServer)

Types

type ChannelApiGroupClient

type ChannelApiGroupClient struct {
	channel.ApiChannel
}

func (*ChannelApiGroupClient) GetEssenceMsgList

func (cli *ChannelApiGroupClient) GetEssenceMsgList(groupId int64) (*model.EssenceMsgListResult, error)

获取精华消息列表 get_essence_msg_list group_id: 群号

func (*ChannelApiGroupClient) GetGroupAtAllRemain

func (cli *ChannelApiGroupClient) GetGroupAtAllRemain(groupId int64) (*model.GroupAtAllRemainResult, error)

获取群 @全体成员 剩余次数 get_group_at_all_remain group_id: 群号

func (*ChannelApiGroupClient) GetGroupHonorInfo

func (cli *ChannelApiGroupClient) GetGroupHonorInfo(groupId int64, honorType string) (*model.GroupHonorInfoResult, error)

获取群荣誉信息 get_group_honor_info group_id: 群号 type: 群荣誉类型,目前支持 talkative(群聊之火)、performer(群聊炽焰)、legend(群聊传说)、strong_newbie(群聊新星)、emotion(群表情之火)

func (*ChannelApiGroupClient) GetGroupInfo

func (cli *ChannelApiGroupClient) GetGroupInfo(groupId int64, noCache bool) (*model.GroupInfoResult, error)

获取群信息 get_group_info group_id: 群号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)

func (*ChannelApiGroupClient) GetGroupList

func (cli *ChannelApiGroupClient) GetGroupList(noCache bool) (*model.GroupListResult, error)

获取群列表 get_group_list no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)

func (*ChannelApiGroupClient) GetGroupMemberInfo

func (cli *ChannelApiGroupClient) GetGroupMemberInfo(groupId int64, userId int64, noCache bool) (*model.GroupMemberInfoResult, error)

获取群成员信息 get_group_member_info group_id: 群号 user_id: QQ 号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)

func (*ChannelApiGroupClient) GetGroupMemberList

func (cli *ChannelApiGroupClient) GetGroupMemberList(groupId int64, noCache bool) (*model.GroupMemberListResult, error)

获取群成员列表 get_group_member_list group_id: 群号 no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)

func (*ChannelApiGroupClient) GetGroupSystemMsg

func (cli *ChannelApiGroupClient) GetGroupSystemMsg() (*model.GroupSystemMsgResult, error)

获取群系统消息 get_group_system_msg

type GetGroupHonorInfoRequest

type GetGroupHonorInfoRequest struct {
	GroupId int64  `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	Type    string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"`
	// contains filtered or unexported fields
}

func (*GetGroupHonorInfoRequest) Descriptor deprecated

func (*GetGroupHonorInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetGroupHonorInfoRequest.ProtoReflect.Descriptor instead.

func (*GetGroupHonorInfoRequest) GetGroupId

func (x *GetGroupHonorInfoRequest) GetGroupId() int64

func (*GetGroupHonorInfoRequest) GetType

func (x *GetGroupHonorInfoRequest) GetType() string

func (*GetGroupHonorInfoRequest) ProtoMessage

func (*GetGroupHonorInfoRequest) ProtoMessage()

func (*GetGroupHonorInfoRequest) ProtoReflect

func (x *GetGroupHonorInfoRequest) ProtoReflect() protoreflect.Message

func (*GetGroupHonorInfoRequest) Reset

func (x *GetGroupHonorInfoRequest) Reset()

func (*GetGroupHonorInfoRequest) String

func (x *GetGroupHonorInfoRequest) String() string

type GetGroupInfoRequest

type GetGroupInfoRequest struct {
	GroupId int64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	NoCache bool  `protobuf:"varint,2,opt,name=no_cache,json=noCache,proto3" json:"no_cache,omitempty"`
	// contains filtered or unexported fields
}

func (*GetGroupInfoRequest) Descriptor deprecated

func (*GetGroupInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetGroupInfoRequest.ProtoReflect.Descriptor instead.

func (*GetGroupInfoRequest) GetGroupId

func (x *GetGroupInfoRequest) GetGroupId() int64

func (*GetGroupInfoRequest) GetNoCache

func (x *GetGroupInfoRequest) GetNoCache() bool

func (*GetGroupInfoRequest) ProtoMessage

func (*GetGroupInfoRequest) ProtoMessage()

func (*GetGroupInfoRequest) ProtoReflect

func (x *GetGroupInfoRequest) ProtoReflect() protoreflect.Message

func (*GetGroupInfoRequest) Reset

func (x *GetGroupInfoRequest) Reset()

func (*GetGroupInfoRequest) String

func (x *GetGroupInfoRequest) String() string

type GetGroupMemberInfoRequest

type GetGroupMemberInfoRequest struct {
	GroupId int64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	UserId  int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"`
	NoCache bool  `protobuf:"varint,3,opt,name=no_cache,json=noCache,proto3" json:"no_cache,omitempty"`
	// contains filtered or unexported fields
}

func (*GetGroupMemberInfoRequest) Descriptor deprecated

func (*GetGroupMemberInfoRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetGroupMemberInfoRequest.ProtoReflect.Descriptor instead.

func (*GetGroupMemberInfoRequest) GetGroupId

func (x *GetGroupMemberInfoRequest) GetGroupId() int64

func (*GetGroupMemberInfoRequest) GetNoCache

func (x *GetGroupMemberInfoRequest) GetNoCache() bool

func (*GetGroupMemberInfoRequest) GetUserId

func (x *GetGroupMemberInfoRequest) GetUserId() int64

func (*GetGroupMemberInfoRequest) ProtoMessage

func (*GetGroupMemberInfoRequest) ProtoMessage()

func (*GetGroupMemberInfoRequest) ProtoReflect

func (*GetGroupMemberInfoRequest) Reset

func (x *GetGroupMemberInfoRequest) Reset()

func (*GetGroupMemberInfoRequest) String

func (x *GetGroupMemberInfoRequest) String() string

type GetGroupMemberListRequest

type GetGroupMemberListRequest struct {
	GroupId int64 `protobuf:"varint,1,opt,name=group_id,json=groupId,proto3" json:"group_id,omitempty"`
	NoCache bool  `protobuf:"varint,2,opt,name=no_cache,json=noCache,proto3" json:"no_cache,omitempty"`
	// contains filtered or unexported fields
}

func (*GetGroupMemberListRequest) Descriptor deprecated

func (*GetGroupMemberListRequest) Descriptor() ([]byte, []int)

Deprecated: Use GetGroupMemberListRequest.ProtoReflect.Descriptor instead.

func (*GetGroupMemberListRequest) GetGroupId

func (x *GetGroupMemberListRequest) GetGroupId() int64

func (*GetGroupMemberListRequest) GetNoCache

func (x *GetGroupMemberListRequest) GetNoCache() bool

func (*GetGroupMemberListRequest) ProtoMessage

func (*GetGroupMemberListRequest) ProtoMessage()

func (*GetGroupMemberListRequest) ProtoReflect

func (*GetGroupMemberListRequest) Reset

func (x *GetGroupMemberListRequest) Reset()

func (*GetGroupMemberListRequest) String

func (x *GetGroupMemberListRequest) String() string

type OnebotApiGroupClient

type OnebotApiGroupClient interface {
	// 获取群信息
	// get_group_info
	// group_id: 群号
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupInfo(groupId int64, noCache bool) (*model.GroupInfoResult, error)
	// 获取群列表
	// get_group_list
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupList(noCache bool) (*model.GroupListResult, error)
	// 获取群成员信息
	// get_group_member_info
	// group_id: 群号
	// user_id: QQ 号
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupMemberInfo(groupId int64, userId int64, noCache bool) (*model.GroupMemberInfoResult, error)
	// 获取群成员列表
	// get_group_member_list
	// group_id: 群号
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupMemberList(groupId int64, noCache bool) (*model.GroupMemberListResult, error)
	// 获取群荣誉信息
	// get_group_honor_info
	// group_id: 群号
	// type: 群荣誉类型,目前支持 talkative(群聊之火)、performer(群聊炽焰)、legend(群聊传说)、strong_newbie(群聊新星)、emotion(群表情之火)
	GetGroupHonorInfo(groupId int64, honorType string) (*model.GroupHonorInfoResult, error)
	// 获取群系统消息
	// get_group_system_msg
	GetGroupSystemMsg() (*model.GroupSystemMsgResult, error)
	// 获取精华消息列表
	// get_essence_msg_list
	// group_id: 群号
	GetEssenceMsgList(groupId int64) (*model.EssenceMsgListResult, error)
	// 获取群 @全体成员 剩余次数
	// get_group_at_all_remain
	// group_id: 群号
	GetGroupAtAllRemain(groupId int64) (*model.GroupAtAllRemainResult, error)
}

func NewChannelApiGroupClient

func NewChannelApiGroupClient(channel channel.ApiChannel) (OnebotApiGroupClient, error)

type OnebotApiGroupGRPCServiceClient

type OnebotApiGroupGRPCServiceClient interface {
	// 获取群信息
	// get_group_info
	// group_id: 群号
	// no_cache: 是否使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupInfo(ctx context.Context, in *GetGroupInfoRequest, opts ...grpc.CallOption) (*model.GroupInfoResultGRPC, error)
	// 获取群列表
	// get_group_list
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupList(ctx context.Context, in *wrapperspb.BoolValue, opts ...grpc.CallOption) (*model.GroupListResultGRPC, error)
	// 获取群成员信息
	// get_group_member_info
	// group_id: 群号
	// user_id: QQ 号
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupMemberInfo(ctx context.Context, in *GetGroupMemberInfoRequest, opts ...grpc.CallOption) (*model.GroupMemberInfoResultGRPC, error)
	// 获取群成员列表
	// get_group_member_list
	// group_id: 群号
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupMemberList(ctx context.Context, in *GetGroupMemberListRequest, opts ...grpc.CallOption) (*model.GroupMemberListResultGRPC, error)
	// 获取群荣誉信息
	// get_group_honor_info
	// group_id: 群号
	// type: 群荣誉类型,目前支持 talkative(群聊之火)、performer(群聊炽焰)、legend(群聊传说)、strong_newbie(群聊新星)、emotion(群表情之火)
	GetGroupHonorInfo(ctx context.Context, in *GetGroupHonorInfoRequest, opts ...grpc.CallOption) (*model.GroupHonorInfoResultGRPC, error)
	// 获取群系统消息
	// get_group_system_msg
	GetGroupSystemMsg(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*model.GroupSystemMsgResultGRPC, error)
	// 获取精华消息列表
	// get_essence_msg_list
	// group_id: 群号
	GetEssenceMsgList(ctx context.Context, in *wrapperspb.Int64Value, opts ...grpc.CallOption) (*model.EssenceMsgListResultGRPC, error)
	// 获取群 @全体成员 剩余次数
	// get_group_at_all_remain
	// group_id: 群号
	GetGroupAtAllRemain(ctx context.Context, in *wrapperspb.Int64Value, opts ...grpc.CallOption) (*model.GroupAtAllRemainResultGRPC, error)
}

OnebotApiGroupGRPCServiceClient is the client API for OnebotApiGroupGRPCService service.

For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

type OnebotApiGroupGRPCServiceServer

type OnebotApiGroupGRPCServiceServer interface {
	// 获取群信息
	// get_group_info
	// group_id: 群号
	// no_cache: 是否使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupInfo(context.Context, *GetGroupInfoRequest) (*model.GroupInfoResultGRPC, error)
	// 获取群列表
	// get_group_list
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupList(context.Context, *wrapperspb.BoolValue) (*model.GroupListResultGRPC, error)
	// 获取群成员信息
	// get_group_member_info
	// group_id: 群号
	// user_id: QQ 号
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupMemberInfo(context.Context, *GetGroupMemberInfoRequest) (*model.GroupMemberInfoResultGRPC, error)
	// 获取群成员列表
	// get_group_member_list
	// group_id: 群号
	// no_cache: 是否不使用缓存(使用缓存可能更新不及时,但响应更快)
	GetGroupMemberList(context.Context, *GetGroupMemberListRequest) (*model.GroupMemberListResultGRPC, error)
	// 获取群荣誉信息
	// get_group_honor_info
	// group_id: 群号
	// type: 群荣誉类型,目前支持 talkative(群聊之火)、performer(群聊炽焰)、legend(群聊传说)、strong_newbie(群聊新星)、emotion(群表情之火)
	GetGroupHonorInfo(context.Context, *GetGroupHonorInfoRequest) (*model.GroupHonorInfoResultGRPC, error)
	// 获取群系统消息
	// get_group_system_msg
	GetGroupSystemMsg(context.Context, *emptypb.Empty) (*model.GroupSystemMsgResultGRPC, error)
	// 获取精华消息列表
	// get_essence_msg_list
	// group_id: 群号
	GetEssenceMsgList(context.Context, *wrapperspb.Int64Value) (*model.EssenceMsgListResultGRPC, error)
	// 获取群 @全体成员 剩余次数
	// get_group_at_all_remain
	// group_id: 群号
	GetGroupAtAllRemain(context.Context, *wrapperspb.Int64Value) (*model.GroupAtAllRemainResultGRPC, error)
}

OnebotApiGroupGRPCServiceServer is the server API for OnebotApiGroupGRPCService service.

type UnimplementedOnebotApiGroupGRPCServiceServer

type UnimplementedOnebotApiGroupGRPCServiceServer struct {
}

UnimplementedOnebotApiGroupGRPCServiceServer can be embedded to have forward compatible implementations.

func (*UnimplementedOnebotApiGroupGRPCServiceServer) GetEssenceMsgList

func (*UnimplementedOnebotApiGroupGRPCServiceServer) GetGroupAtAllRemain

func (*UnimplementedOnebotApiGroupGRPCServiceServer) GetGroupHonorInfo

func (*UnimplementedOnebotApiGroupGRPCServiceServer) GetGroupInfo

func (*UnimplementedOnebotApiGroupGRPCServiceServer) GetGroupList

func (*UnimplementedOnebotApiGroupGRPCServiceServer) GetGroupMemberInfo

func (*UnimplementedOnebotApiGroupGRPCServiceServer) GetGroupMemberList

func (*UnimplementedOnebotApiGroupGRPCServiceServer) GetGroupSystemMsg

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL