oidb

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2024 License: AGPL-3.0 Imports: 15 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckError

func CheckError(data []byte) error

func CheckTypedError

func CheckTypedError[T any](data []byte) error

func ParseDeleteFriendResp added in v0.1.2

func ParseDeleteFriendResp(data []byte) error

func ParseFetchClientKeyResp

func ParseFetchClientKeyResp(data []byte) (string, error)

func ParseFetchCookieResp

func ParseFetchCookieResp(data []byte) ([]string, error)

func ParseFetchFriendsResp

func ParseFetchFriendsResp(data []byte) ([]*entity.User, uint32, error)

func ParseFetchGroupResp added in v0.1.1

func ParseFetchGroupResp(data []byte) (*oidb.D88DGroupInfoResp, error)

func ParseFetchGroupSystemMessagesReq

func ParseFetchGroupSystemMessagesReq(isFiltered bool, data []byte, groupUin ...uint32) (*entity.GroupSystemMessages, error)

func ParseFetchGroupsResp

func ParseFetchGroupsResp(data []byte) ([]*entity.Group, error)

func ParseFetchMemberResp

func ParseFetchMemberResp(data []byte) (*entity.GroupMember, error)

func ParseFetchMembersResp

func ParseFetchMembersResp(data []byte) ([]*entity.GroupMember, string, error)

func ParseFetchRKeyResp

func ParseFetchRKeyResp(data []byte) (entity.RKeyMap, error)

func ParseFetchUserInfoResp

func ParseFetchUserInfoResp(data []byte) (*entity.User, error)

func ParseFriendLikeResp

func ParseFriendLikeResp(data []byte) error

func ParseGroupFSDownloadResp

func ParseGroupFSDownloadResp(data []byte) (string, error)

func ParseGroupFileCountResp

func ParseGroupFileCountResp(data []byte) (uint32, uint32, error)

func ParseGroupFileDeleteResp

func ParseGroupFileDeleteResp(data []byte) error

func ParseGroupFileListResp

func ParseGroupFileListResp(data []byte) (*oidb.OidbSvcTrpcTcp0X6D8_1Response, error)

func ParseGroupFileMoveResp

func ParseGroupFileMoveResp(data []byte) error

func ParseGroupFileRenameResp

func ParseGroupFileRenameResp(data []byte) error

func ParseGroupFileSpaceResp

func ParseGroupFileSpaceResp(data []byte) (uint64, uint64, error)

func ParseGroupFileUploadResp

func ParseGroupFileUploadResp(data []byte) (*oidb.OidbSvcTrpcTcp0X6D6Response, error)

func ParseGroupFolderCreateResp

func ParseGroupFolderCreateResp(data []byte) error

func ParseGroupFolderDeleteResp

func ParseGroupFolderDeleteResp(data []byte) error

func ParseGroupFolderRenameResp

func ParseGroupFolderRenameResp(data []byte) error

func ParseGroupImageDownloadResp

func ParseGroupImageDownloadResp(data []byte) (string, error)

func ParseGroupImageUploadResp

func ParseGroupImageUploadResp(data []byte) (*oidb.NTV2RichMediaResp, error)

func ParseGroupRecordDownloadResp

func ParseGroupRecordDownloadResp(data []byte) (string, error)

func ParseGroupRecordUploadResp

func ParseGroupRecordUploadResp(data []byte) (*oidb.NTV2RichMediaResp, error)

func ParseGroupSendFileResp

func ParseGroupSendFileResp(data []byte) (*oidb.OidbSvcTrpcTcpBase, error)

func ParseGroupVideoUploadResp

func ParseGroupVideoUploadResp(data []byte) (*oidb.NTV2RichMediaResp, error)

func ParseKickGroupMemberResp added in v0.1.2

func ParseKickGroupMemberResp(data []byte) error

func ParseOidbPacket

func ParseOidbPacket(b []byte, pkt any) (oidbBaseResp oidb.OidbSvcTrpcTcpBase, err error)

func ParsePokeResp

func ParsePokeResp(data []byte) error

func ParsePrivateFileDownloadResp

func ParsePrivateFileDownloadResp(data []byte) (string, error)

func ParsePrivateFileUploadResp

func ParsePrivateFileUploadResp(data []byte) (*oidb.OidbSvcTrpcTcp0XE37Response, error)

func ParsePrivateImageDownloadResp

func ParsePrivateImageDownloadResp(data []byte) (string, error)

func ParsePrivateImageUploadResp

func ParsePrivateImageUploadResp(data []byte) (*oidb.NTV2RichMediaResp, error)

func ParsePrivateRecordDownloadResp

func ParsePrivateRecordDownloadResp(data []byte) (string, error)

func ParsePrivateRecordUploadResp

func ParsePrivateRecordUploadResp(data []byte) (*oidb.NTV2RichMediaResp, error)

func ParsePrivateVideoUploadResp

func ParsePrivateVideoUploadResp(data []byte) (*oidb.NTV2RichMediaResp, error)

func ParseSetEssenceMessageResp

func ParseSetEssenceMessageResp(data []byte) error

func ParseSetFriendRequestResp

func ParseSetFriendRequestResp(data []byte) error

func ParseSetGroupAdminResp added in v0.1.2

func ParseSetGroupAdminResp(data []byte) error

func ParseSetGroupGlobalMuteResp added in v0.1.2

func ParseSetGroupGlobalMuteResp(data []byte) error

func ParseSetGroupLeaveResp added in v0.1.2

func ParseSetGroupLeaveResp(data []byte) error

func ParseSetGroupMemberMuteResp added in v0.1.2

func ParseSetGroupMemberMuteResp(data []byte) error

ParseSetGroupMemberMuteResp 失败了会返回错误原因

func ParseSetGroupMemberNameResp added in v0.1.2

func ParseSetGroupMemberNameResp(data []byte) error

func ParseSetGroupMemberSpecialTitleResp added in v0.1.2

func ParseSetGroupMemberSpecialTitleResp(data []byte) error

func ParseSetGroupNameResp added in v0.1.2

func ParseSetGroupNameResp(data []byte) error

func ParseSetGroupReactionResp added in v0.1.2

func ParseSetGroupReactionResp(data []byte) error

func ParseSetGroupRemarkResp added in v0.1.2

func ParseSetGroupRemarkResp(data []byte) error

func ParseSetGroupRequestResp

func ParseSetGroupRequestResp(data []byte) error

func ParseTypedError

func ParseTypedError[T any](data []byte) (*T, error)

func ParseVideoDownloadResp

func ParseVideoDownloadResp(data []byte) (string, error)

Types

type AtAllRemainInfo added in v0.1.2

type AtAllRemainInfo struct {
	CanAtAll      bool
	CountForGroup uint32 // 当前群默认可用次数
	CountForUin   uint32 // 当前QQ剩余次数
}

func ParseGetAtAllRemainResponse added in v0.1.2

func ParseGetAtAllRemainResponse(data []byte) (*AtAllRemainInfo, error)

type BotGroupClockInResult added in v0.1.2

type BotGroupClockInResult struct {
	Title          string // 今日已成功打卡
	KeepDayText    string // 已打卡N天
	GroupRankText  string // 群内排名第N位
	ClockInUtcTime int64  // 打卡时间
	DetailURL      string // Detail info url https://qun.qq.com/v2/signin/detail?...
}

func ParseGroupSignResp added in v0.1.2

func ParseGroupSignResp(data []byte) (*BotGroupClockInResult, error)

type Coordinate added in v0.1.2

type Coordinate struct {
	X int32 `json:"x"`
	Y int32 `json:"y"`
}

type OcrResponse added in v0.1.2

type OcrResponse struct {
	Texts    []*TextDetection `json:"texts"`
	Language string           `json:"language"`
}

func ParseImageOcrResp added in v0.1.2

func ParseImageOcrResp(data []byte) (*OcrResponse, error)

type Packet added in v0.1.1

type Packet struct {
	Cmd       string
	Data      []byte
	ExtraData []byte
}

func BuildDeleteFriendReq added in v0.1.2

func BuildDeleteFriendReq(uid string, block bool) (*Packet, error)

func BuildFetchClientKeyReq

func BuildFetchClientKeyReq() (*Packet, error)

func BuildFetchCookieReq

func BuildFetchCookieReq(domains []string) (*Packet, error)

func BuildFetchFriendsReq

func BuildFetchFriendsReq(token uint32) (*Packet, error)

BuildFetchFriendsReq OidbSvcTrpcTcp.0xfd4_1

func BuildFetchGroupReq added in v0.1.1

func BuildFetchGroupReq(groupUin uint32, isStrange bool) (*Packet, error)

func BuildFetchGroupSystemMessagesReq

func BuildFetchGroupSystemMessagesReq(isFiltered bool, count uint32) (*Packet, error)

func BuildFetchGroupsReq

func BuildFetchGroupsReq() (*Packet, error)

func BuildFetchMemberReq

func BuildFetchMemberReq(groupUin uint32, memberUID string) (*Packet, error)

func BuildFetchMembersReq

func BuildFetchMembersReq(groupUin uint32, token string) (*Packet, error)

func BuildFetchRKeyReq

func BuildFetchRKeyReq() (*Packet, error)

func BuildFetchUserInfoReq

func BuildFetchUserInfoReq[T ~string | ~uint32](value T) (*Packet, error)

func BuildFriendLikeReq

func BuildFriendLikeReq(uid string, count uint32) (*Packet, error)

func BuildFriendPokeReq

func BuildFriendPokeReq(uin uint32) (*Packet, error)

func BuildGetAtAllRemainRequest added in v0.1.2

func BuildGetAtAllRemainRequest(uin, gin uint32) (*Packet, error)

func BuildGroupFSDownloadReq

func BuildGroupFSDownloadReq(groupUin uint32, fileID string) (*Packet, error)

func BuildGroupFileCountReq

func BuildGroupFileCountReq(groupUin uint32) (*Packet, error)

func BuildGroupFileDeleteReq

func BuildGroupFileDeleteReq(groupUin uint32, fileID string) (*Packet, error)

func BuildGroupFileListReq

func BuildGroupFileListReq(groupUin uint32, targetDirectory string, startIndex uint32, fileCount uint32) (*Packet, error)

func BuildGroupFileMoveReq

func BuildGroupFileMoveReq(groupUin uint32, fileID string, parentFolder string, targetFolderID string) (*Packet, error)

func BuildGroupFileRenameReq

func BuildGroupFileRenameReq(groupUin uint32, fileID string, parentFolder string, newFileName string) (*Packet, error)

func BuildGroupFileSpaceReq

func BuildGroupFileSpaceReq(groupUin uint32) (*Packet, error)

func BuildGroupFileUploadReq

func BuildGroupFileUploadReq(groupUin uint32, file *message.FileElement, targetDirectory string) (*Packet, error)

func BuildGroupFolderCreateReq

func BuildGroupFolderCreateReq(groupUin uint32, targetDirectory string, folderName string) (*Packet, error)

func BuildGroupFolderDeleteReq

func BuildGroupFolderDeleteReq(groupUin uint32, folderID string) (*Packet, error)

func BuildGroupFolderRenameReq

func BuildGroupFolderRenameReq(groupUin uint32, folderID string, newFolderName string) (*Packet, error)

func BuildGroupImageDownloadReq

func BuildGroupImageDownloadReq(groupUin uint32, node *oidb.IndexNode) (*Packet, error)

func BuildGroupImageUploadReq

func BuildGroupImageUploadReq(groupUin uint32, image *message.ImageElement) (*Packet, error)

func BuildGroupPokeReq

func BuildGroupPokeReq(groupUin, uin uint32) (*Packet, error)

func BuildGroupRecordDownloadReq

func BuildGroupRecordDownloadReq(grpUin uint32, node *oidb.IndexNode) (*Packet, error)

func BuildGroupRecordUploadReq

func BuildGroupRecordUploadReq(groupUin uint32, record *message.VoiceElement) (*Packet, error)

func BuildGroupSendFileReq

func BuildGroupSendFileReq(groupUin uint32, fileKey string) (*Packet, error)

func BuildGroupSignPacket added in v0.1.2

func BuildGroupSignPacket(botUin, groupUin uint32, appVersion string) (*Packet, error)

func BuildGroupVideoUploadReq

func BuildGroupVideoUploadReq(groupUin uint32, video *message.ShortVideoElement) (*Packet, error)

func BuildImageOcrRequestPacket added in v0.1.2

func BuildImageOcrRequestPacket(url string) (*Packet, error)

func BuildKickGroupMemberReq added in v0.1.2

func BuildKickGroupMemberReq(groupUin uint32, uid string, rejectAddRequest bool) (*Packet, error)

func BuildOidbPacket

func BuildOidbPacket(cmd, subCmd uint32, body any, isLafter, isUID bool) (*Packet, error)

func BuildPrivateFileDownloadReq

func BuildPrivateFileDownloadReq(selfUID string, fileUUID string, fileHash string) (*Packet, error)

func BuildPrivateFileUploadReq

func BuildPrivateFileUploadReq(selfUID string, targetUID string, file *message.FileElement) (*Packet, error)

func BuildPrivateImageDownloadReq

func BuildPrivateImageDownloadReq(selfUID string, node *oidb.IndexNode) (*Packet, error)

func BuildPrivateImageUploadReq

func BuildPrivateImageUploadReq(targetUID string, image *message.ImageElement) (*Packet, error)

func BuildPrivateRecordDownloadReq

func BuildPrivateRecordDownloadReq(selfUID string, node *oidb.IndexNode) (*Packet, error)

BuildPrivateRecordDownloadReq 私聊语音

func BuildPrivateRecordUploadReq

func BuildPrivateRecordUploadReq(targetUID string, record *message.VoiceElement) (*Packet, error)

func BuildPrivateVideoUploadReq

func BuildPrivateVideoUploadReq(targetUID string, video *message.ShortVideoElement) (*Packet, error)

func BuildSetEssenceMessageReq

func BuildSetEssenceMessageReq(groupUin, seq, random uint32, isSet bool) (*Packet, error)

func BuildSetFriendRequest

func BuildSetFriendRequest(accept bool, targetUID string) (*Packet, error)

func BuildSetGroupAdminReq added in v0.1.2

func BuildSetGroupAdminReq(groupUin uint32, uid string, isAdmin bool) (*Packet, error)

func BuildSetGroupGlobalMuteReq added in v0.1.2

func BuildSetGroupGlobalMuteReq(groupUin uint32, isMute bool) (*Packet, error)

func BuildSetGroupLeaveReq added in v0.1.2

func BuildSetGroupLeaveReq(groupUin uint32) (*Packet, error)

func BuildSetGroupMemberMuteReq added in v0.1.2

func BuildSetGroupMemberMuteReq(groupUin, duration uint32, uid string) (*Packet, error)

func BuildSetGroupMemberNameReq added in v0.1.2

func BuildSetGroupMemberNameReq(groupUin uint32, uid, name string) (*Packet, error)

func BuildSetGroupMemberSpecialTitleReq added in v0.1.2

func BuildSetGroupMemberSpecialTitleReq(groupUin uint32, uid, title string) (*Packet, error)

func BuildSetGroupNameReq added in v0.1.2

func BuildSetGroupNameReq(groupUin uint32, name string) (*Packet, error)

func BuildSetGroupReactionReq added in v0.1.2

func BuildSetGroupReactionReq(groupUin, sequence uint32, code string, isAdd bool) (*Packet, error)

func BuildSetGroupRemarkReq added in v0.1.2

func BuildSetGroupRemarkReq(groupUin uint32, mark string) (*Packet, error)

func BuildSetGroupRequestReq

func BuildSetGroupRequestReq(isFiltered bool, accept bool, sequence uint64, typ uint32, groupUin uint32, message string) (*Packet, error)

func BuildURLCheckRequest added in v0.1.2

func BuildURLCheckRequest(botuin uint32, url string) (*Packet, error)

func BuildVideoDownloadReq

func BuildVideoDownloadReq(selfUID, videoUUID string, isGroup bool) (*Packet, error)

type TextDetection added in v0.1.2

type TextDetection struct {
	Text        string        `json:"text"`
	Confidence  int32         `json:"confidence"`
	Coordinates []*Coordinate `json:"coordinates"`
}

type URLSecurityLevel added in v0.1.2

type URLSecurityLevel int
const (
	URLSecurityLevelSafe URLSecurityLevel = iota + 1
	URLSecurityLevelUnknown
	URLSecurityLevelDanger
)

func ParseURLCheckResponse added in v0.1.2

func ParseURLCheckResponse(data []byte) (URLSecurityLevel, error)

func (URLSecurityLevel) String added in v0.1.2

func (m URLSecurityLevel) String() string

Jump to

Keyboard shortcuts

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