wechat

package
v0.0.0-...-3a15b5a Latest Latest
Warning

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

Go to latest
Published: Jun 21, 2017 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BaseConf

type BaseConf struct {
	Admin    []string `json:"admin"`
	LogLevel string   `json:"loglevel"`
	ApiAddr  string   `json:"apiaddr"`
	QrCode   string   `json:"qrcode"`
}

type Config

type Config struct {
	Base    BaseConf   `json:"base"`
	User    []UserConf `json:"user"`
	Default string     `json:"default"`
}

type Contact

type Contact struct {
	UserName   string
	NickName   string
	RemarkName string

	Type uint32
}

type InitInfo

type InitInfo struct {
	SyncKey SyncKey
	User    user
}

type Msg

type Msg struct {
	MsgId        string
	FromUserName string
	ToUserName   string
	MsgType      int
	Content      string

	AtMe            bool
	FromGroup       bool
	FromGroupMember Contact
	MsgBodyWitoutAt string
}

type MsgList

type MsgList struct {
	AddMsgList   []Msg
	SyncCheckKey SyncKey
}

type RawBody

type RawBody map[string]interface{}

type Ret

type Ret map[string]interface{}

type SyncInfo

type SyncInfo struct {
	// contains filtered or unexported fields
}

type SyncKey

type SyncKey struct {
	Count int
	List  []key
}

type UserConf

type UserConf struct {
	Username string `json:"username"`
	Action   string `json:"action"`
}

type WeChat

type WeChat struct {
	// contains filtered or unexported fields
}

func New

func New(file string) (wc *WeChat, err error)

func (*WeChat) GenQrCode

func (wc *WeChat) GenQrCode(uuid string) (err error)

func (*WeChat) Get

func (wc *WeChat) Get(url string, param map[string]string) (ret string, err error)

func (*WeChat) GetGroupMemberInfo

func (wc *WeChat) GetGroupMemberInfo(groups []string) (err error)

func (*WeChat) GetUuid

func (wc *WeChat) GetUuid() string

func (*WeChat) Getcontact

func (wc *WeChat) Getcontact() (err error)

func (*WeChat) HttpApiServe

func (wc *WeChat) HttpApiServe() (err error)

func (*WeChat) Init

func (wc *WeChat) Init(redirect string) (err error)

func (*WeChat) LoadConf

func (wc *WeChat) LoadConf(file string) (err error)

func (*WeChat) MakeClient

func (wc *WeChat) MakeClient() (c *http.Client, err error)

func (*WeChat) Post

func (wc *WeChat) Post(url string, param url.Values) (ret string, err error)

func (*WeChat) PostJson

func (wc *WeChat) PostJson(url string, param RawBody) (ret string, err error)

func (*WeChat) Proc

func (wc *WeChat) Proc(msg Msg) (err error)

func (*WeChat) Run

func (wc *WeChat) Run()

func (*WeChat) SaveConf

func (wc *WeChat) SaveConf() (err error)

func (*WeChat) Sync

func (wc *WeChat) Sync(syncInfo chan SyncInfo)

func (*WeChat) WaitForLogin

func (wc *WeChat) WaitForLogin(uuid string) (redirect string, err error)

Jump to

Keyboard shortcuts

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