Documentation ¶
Index ¶
- func GetPicHW(pic []byte) (height, width int)
- type Builder
- func (b *Builder) At(uin ...int64) IMsg
- func (b *Builder) BuildStringBody() (string, error)
- func (b *Builder) Buttons(keys ...*Button) IMsg
- func (b *Builder) Do(ctx context.Context) error
- func (b *Builder) DoAndResponse(ctx context.Context) (*Response, error)
- func (b *Builder) DoUpload(ctx context.Context) (*File, error)
- func (b *Builder) DoWithCallBack(ctx context.Context, callBack func(response *Response, err error)) error
- func (b *Builder) FriendManager() IFriendManager
- func (b *Builder) FriendMsg() IMsg
- func (b *Builder) FriendPic() IUpload
- func (b *Builder) FriendVoice() IUpload
- func (b *Builder) GetClusterInfo() DoApi
- func (b *Builder) GetFriendLists(LastUin int64) IFriendManager
- func (b *Builder) GetGroupLists() IGroupManager
- func (b *Builder) GetGroupMemberLists(uin int64, lastBuffer string) IGroupManager
- func (b *Builder) GroupManager() IGroupManager
- func (b *Builder) GroupMsg() IMsg
- func (b *Builder) GroupPic() IUpload
- func (b *Builder) GroupSystemMsgAction(MsgType int, MsgSeq, GroupCode int64) IGroupSystemMsgAction
- func (b *Builder) GroupVoice() IUpload
- func (b *Builder) JsonMsg(json string) IMsg
- func (b *Builder) MarkDownMsg(md string) IMsg
- func (b *Builder) MsgRandom(MsgRandom int64) IGroupManager
- func (b *Builder) MsgSeq(MsgSeq int64) IGroupManager
- func (b *Builder) MultiMsg(msgBodys ...*MsgBody) IMsg
- func (b *Builder) OpAccept() IGroupSystemMsgAction
- func (b *Builder) OpIgnore() IGroupSystemMsgAction
- func (b *Builder) OpReject() IGroupSystemMsgAction
- func (b *Builder) Pat(Uin int64) IGroupManager
- func (b *Builder) PicMsg(pics ...*File) IMsg
- func (b *Builder) ProhibitedUser() IGroupManager
- func (b *Builder) Qrcode() IQrcode
- func (b *Builder) QueryUin() IQueryUin
- func (b *Builder) RemoveUser() IGroupManager
- func (b *Builder) RenameUserNickName(NickName string) IGroupManager
- func (b *Builder) ReplyMsg(MsgSeq, MsgUid int64) IMsg
- func (b *Builder) RevokeMsg() IGroupManager
- func (b *Builder) SendMsg() ISendMsg
- func (b *Builder) SetBase64Buf(base64Buf string) IUpload
- func (b *Builder) SetFilePath(path string) IUpload
- func (b *Builder) SetFileUrlPath(url string) IUpload
- func (b *Builder) SetUin(uid string)
- func (b *Builder) ShutTime(ShutTime int) IGroupManager
- func (b *Builder) TextMsg(text string) IMsg
- func (b *Builder) ToGUin(Uin int64) IGroupManager
- func (b *Builder) ToGroupCode(GroupCode int64) IGroupManager
- func (b *Builder) ToUid(Uid string) IGroupManager
- func (b *Builder) ToUin(uin int64) IMsg
- func (b *Builder) Upload() IUpload
- func (b *Builder) VoiceMsg(voice *File) IMsg
- func (b *Builder) XmlMsg(xml string) IMsg
- type Button
- type CgiRequest
- type ClusterInfo
- type DoApi
- type File
- type FriendLists
- type GroupLists
- type GroupMemberLists
- type GroupMessageResponse
- type IFriendManager
- type IGroupManager
- type IGroupSystemMsgAction
- type IMainFunc
- type IMsg
- type IQrcode
- type IQueryUin
- type ISendMsg
- type IUpload
- type MsgBody
- type QrcodeStruct
- type QueryUinStruct
- type Response
- type ResponseStruct
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Builder ¶
type Builder struct { CgiCmd *string `json:"CgiCmd,omitempty"` CgiRequest *CgiRequest `json:"CgiRequest,omitempty"` // contains filtered or unexported fields }
func (*Builder) BuildStringBody ¶
func (*Builder) DoAndResponse ¶
func (*Builder) DoWithCallBack ¶
func (*Builder) FriendManager ¶
func (b *Builder) FriendManager() IFriendManager
func (*Builder) FriendVoice ¶
func (*Builder) GetClusterInfo ¶
func (*Builder) GetFriendLists ¶
func (b *Builder) GetFriendLists(LastUin int64) IFriendManager
func (*Builder) GetGroupLists ¶
func (b *Builder) GetGroupLists() IGroupManager
func (*Builder) GetGroupMemberLists ¶
func (b *Builder) GetGroupMemberLists(uin int64, lastBuffer string) IGroupManager
func (*Builder) GroupManager ¶
func (b *Builder) GroupManager() IGroupManager
func (*Builder) GroupSystemMsgAction ¶
func (b *Builder) GroupSystemMsgAction(MsgType int, MsgSeq, GroupCode int64) IGroupSystemMsgAction
func (*Builder) GroupVoice ¶
func (*Builder) MarkDownMsg ¶
func (*Builder) MsgRandom ¶
func (b *Builder) MsgRandom(MsgRandom int64) IGroupManager
func (*Builder) MsgSeq ¶
func (b *Builder) MsgSeq(MsgSeq int64) IGroupManager
func (*Builder) OpAccept ¶
func (b *Builder) OpAccept() IGroupSystemMsgAction
func (*Builder) OpIgnore ¶
func (b *Builder) OpIgnore() IGroupSystemMsgAction
func (*Builder) OpReject ¶
func (b *Builder) OpReject() IGroupSystemMsgAction
func (*Builder) Pat ¶
func (b *Builder) Pat(Uin int64) IGroupManager
func (*Builder) ProhibitedUser ¶
func (b *Builder) ProhibitedUser() IGroupManager
func (*Builder) RemoveUser ¶
func (b *Builder) RemoveUser() IGroupManager
func (*Builder) RenameUserNickName ¶
func (b *Builder) RenameUserNickName(NickName string) IGroupManager
func (*Builder) RevokeMsg ¶
func (b *Builder) RevokeMsg() IGroupManager
func (*Builder) SetBase64Buf ¶
func (*Builder) SetFilePath ¶
func (*Builder) SetFileUrlPath ¶
func (*Builder) ShutTime ¶
func (b *Builder) ShutTime(ShutTime int) IGroupManager
func (*Builder) ToGUin ¶
func (b *Builder) ToGUin(Uin int64) IGroupManager
func (*Builder) ToGroupCode ¶
func (b *Builder) ToGroupCode(GroupCode int64) IGroupManager
func (*Builder) ToUid ¶
func (b *Builder) ToUid(Uid string) IGroupManager
type Button ¶
type Button struct { ID string `json:"Id"` RenderDataLabel string `json:"RenderDataLabel"` RenderDataVisitedLabel string `json:"RenderDataVisitedLabel"` RenderDataStyle int `json:"RenderDataStyle"` ActionType int `json:"ActionType"` ActionPermissonType int `json:"ActionPermissonType"` ActionData string `json:"ActionData"` ActionUnsupportTips string `json:"ActionUnsupportTips"` }
type CgiRequest ¶
type CgiRequest struct { LastUin *int64 `json:"LastUin,omitempty"` OpCode *int `json:"OpCode,omitempty"` MsgSeq *int64 `json:"MsgSeq,omitempty"` MsgType *int `json:"MsgType,omitempty"` GroupCode *int64 `json:"GroupCode,omitempty"` Uin *int64 `json:"Uin,omitempty"` LastBuffer *string `json:"LastBuffer,omitempty"` CommandId *int `json:"CommandId,omitempty"` FilePath *string `json:"FilePath,omitempty"` Base64Buf *string `json:"Base64Buf,omitempty"` FileUrl *string `json:"FileUrl,omitempty"` ToUin *int64 `json:"ToUin,omitempty"` ToType *int `json:"ToType,omitempty"` Content *string `json:"Content,omitempty"` SubMsgType *int `json:"SubMsgType,omitempty"` MsgBodys []*MsgBody `json:"MsgBodys,omitempty"` Images []*File `json:"Images,omitempty"` Voice *File `json:"Voice,omitempty"` Markdown *string `json:"Markdown,omitempty"` Keyboard []*map[string][]*Button `json:"Keyboard,omitempty"` Uid *string `json:"Uid,omitempty"` MsgRandom *int64 `json:"MsgRandom,omitempty"` BanTime *int `json:"BanTime,omitempty"` Nick *string `json:"Nick,omitempty"` AtUinLists []struct { Uin *int64 `json:"Uin,omitempty"` } `json:"AtUinLists,omitempty"` ReplyTo *struct { MsgSeq *int64 `json:"MsgSeq,omitempty"` MsgUid *int64 `json:"MsgUid,omitempty"` } `json:"ReplyTo,omitempty"` }
type ClusterInfo ¶
type ClusterInfo struct { Alloc string `json:"Alloc"` ClientId string `json:"ClientId"` ClusterIP string `json:"ClusterIP"` CpuNum int `json:"CpuNum"` FreesTimes int `json:"FreesTimes"` GCTime string `json:"GCTime"` GoArch string `json:"GoArch"` GoVersion string `json:"GoVersion"` GoroutineNum int `json:"GoroutineNum"` LastGCTime string `json:"LastGCTime"` MacInfo string `json:"MacInfo"` MallocsTimes int `json:"MallocsTimes"` NextGC string `json:"NextGC"` Platform string `json:"Platform"` QQUsers []struct { MoneyCount string `json:"MoneyCount"` OnlieTime string `json:"OnlieTime"` QQ string `json:"QQ"` ReceiveCount int `json:"ReceiveCount"` SendCount int `json:"SendCount"` TotalMoney string `json:"TotalMoney"` TotalRecv string `json:"TotalRecv"` TotalSend string `json:"TotalSend"` UserLevelInfo string `json:"UserLevelInfo"` } `json:"QQUsers"` QQUsersCounts int `json:"QQUsersCounts"` ServerRuntime string `json:"ServerRuntime"` Sys string `json:"Sys"` TotalAlloc string `json:"TotalAlloc"` Version string `json:"Version"` }
type FriendLists ¶
type FriendLists struct { FriendLists []struct { Head string `json:"Head"` Signature string `json:"Signature"` TagId int `json:"TagId"` Uid string `json:"Uid"` Uin int `json:"Uin"` Nick string `json:"Nick"` Sex int `json:"Sex"` } `json:"FriendLists"` LastBuffer string `json:"LastBuffer"` TagLists []struct { TagId int `json:"TagId"` TagName string `json:"TagName"` } `json:"TagLists"` }
type GroupLists ¶
type GroupMemberLists ¶
type GroupMemberLists struct { LastBuffer string `json:"LastBuffer"` MemberLists []struct { CreditLevel int `json:"CreditLevel"` JoinTime int `json:"JoinTime"` LastSpeakTime int `json:"LastSpeakTime"` Level int `json:"Level"` MemberFlag int `json:"MemberFlag"` Nick string `json:"Nick"` Uid string `json:"Uid"` Uin int `json:"Uin"` } `json:"MemberLists"` }
type GroupMessageResponse ¶
type IFriendManager ¶
type IFriendManager interface { DoApi GetFriendLists(LastUin int64) IFriendManager }
type IGroupManager ¶
type IGroupManager interface { DoApi GetGroupLists() IGroupManager GetGroupMemberLists(uin int64, lastBuffer string) IGroupManager GroupSystemMsgAction(MsgType int, MsgSeq, GroupCode int64) IGroupSystemMsgAction RevokeMsg() IGroupManager ToGUin(Uin int64) IGroupManager ToGroupCode(Uin int64) IGroupManager MsgSeq(MsgSeq int64) IGroupManager MsgRandom(MsgRandom int64) IGroupManager ProhibitedUser() IGroupManager ToUid(Uid string) IGroupManager ShutTime(ShutTime int) IGroupManager RemoveUser() IGroupManager RenameUserNickName(NickName string) IGroupManager Pat(Uin int64) IGroupManager }
type IGroupSystemMsgAction ¶
type IGroupSystemMsgAction interface { DoApi OpAccept() IGroupSystemMsgAction OpReject() IGroupSystemMsgAction OpIgnore() IGroupSystemMsgAction }
type IMainFunc ¶
type IMainFunc interface { SendMsg() ISendMsg QueryUin() IQueryUin Qrcode() IQrcode Upload() IUpload GetClusterInfo() DoApi GroupManager() IGroupManager FriendManager() IFriendManager }
type IMsg ¶
type IMsg interface { ToUin(uin int64) IMsg TextMsg(text string) IMsg ReplyMsg(MsgSeq, MsgUid int64) IMsg PicMsg(...*File) IMsg VoiceMsg(voice *File) IMsg XmlMsg(xml string) IMsg JsonMsg(json string) IMsg MultiMsg(msgBody ...*MsgBody) IMsg MarkDownMsg(text string) IMsg At(uint ...int64) IMsg Buttons(keys ...*Button) IMsg DoApi }
type QrcodeStruct ¶
type QrcodeStruct struct {
// contains filtered or unexported fields
}
func (*QrcodeStruct) Get ¶
func (q *QrcodeStruct) Get() error
func (*QrcodeStruct) GetImageBytes ¶
func (q *QrcodeStruct) GetImageBytes() []byte
func (*QrcodeStruct) GetUrl ¶
func (q *QrcodeStruct) GetUrl() *string
func (*QrcodeStruct) PrintTerminal ¶
func (q *QrcodeStruct) PrintTerminal(writer io.Writer) error
type QueryUinStruct ¶
type Response ¶
type Response struct {
// contains filtered or unexported fields
}
func NewResponse ¶
func (*Response) GetGroupMessageResponse ¶
func (r *Response) GetGroupMessageResponse() (*GroupMessageResponse, error)
type ResponseStruct ¶
type ResponseStruct struct { CgiBaseResponse struct { Ret int `json:"Ret"` ErrMsg string `json:"ErrMsg"` } `json:"CgiBaseResponse"` ResponseData json.RawMessage `json:"ResponseData,omitempty"` Data interface{} `json:"Data"` }
Click to show internal directories.
Click to hide internal directories.