wechaty

package
v0.0.0-...-6b858f3 Latest Latest
Warning

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

Go to latest
Published: Aug 24, 2020 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Package wechaty ...

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Accessory

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

Accessory ...

func (*Accessory) GetPuppet

func (a *Accessory) GetPuppet() wechatypuppet.IPuppetAbstract

GetPuppet ...

func (*Accessory) GetWechaty

func (a *Accessory) GetWechaty() _interface.IWechaty

GetWechaty ...

type EventDong

type EventDong func(data string)

EventDong ...

type EventError

type EventError func(err error)

EventError ...

type EventFriendship

type EventFriendship func(friendship *user.Friendship)

EventFriendship ...

type EventHeartbeat

type EventHeartbeat func(data string)

EventHeartbeat ...

type EventLogin

type EventLogin func(user *user.ContactSelf)

EventLogin ...

type EventLogout

type EventLogout func(user *user.ContactSelf, reason string)

EventLogout ...

type EventMessage

type EventMessage func(message *user.Message)

EventMessage ...

type EventReady

type EventReady func()

EventReady ...

type EventRoomInvite

type EventRoomInvite func(roomInvitation *user.RoomInvitation)

EventRoomInvite ...

type EventRoomJoin

type EventRoomJoin func(room *user.Room, inviteeList []_interface.IContact, inviter _interface.IContact, date time.Time)

EventRoomJoin ...

type EventRoomLeave

type EventRoomLeave func(room *user.Room, leaverList []_interface.IContact, remover _interface.IContact, date time.Time)

EventRoomLeave ...

type EventRoomTopic

type EventRoomTopic func(room *user.Room, newTopic string, oldTopic string, changer _interface.IContact, date time.Time)

EventRoomTopic ...

type EventScan

type EventScan func(qrCode string, status schemas.ScanStatus, data string)

EventScan ...

type EventStart

type EventStart func()

EventStart ...

type EventStop

type EventStop func()

EventStop ...

type Option

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

Option wechaty option

type OptionFn

type OptionFn func(opts *Option)

OptionFn func

func WithIOToken

func WithIOToken(ioToken string) OptionFn

WithIOToken with io token

func WithMemoryCard

func WithMemoryCard(memoryCard mc.IMemoryCard) OptionFn

WithMemoryCard with memory card

func WithName

func WithName(name string) OptionFn

WithName with name

func WithPuppet

func WithPuppet(puppet wp.IPuppetAbstract) OptionFn

WithPuppet with puppet impl

func WithPuppetOption

func WithPuppetOption(puppetOption wp.Option) OptionFn

WithPuppetOption with puppet option

type Wechaty

type Wechaty struct {
	*Option
	// contains filtered or unexported fields
}

Wechaty ...

func NewWechaty

func NewWechaty(optFns ...OptionFn) *Wechaty

NewWechaty ... instance by golang.

func (*Wechaty) Contact

func (w *Wechaty) Contact() _interface.IContactFactory

Contact ...

func (*Wechaty) Friendship

func (w *Wechaty) Friendship() _interface.IFriendshipFactory

Friendship ...

func (*Wechaty) Image

func (w *Wechaty) Image() _interface.IImageFactory

Image ...

func (*Wechaty) Message

func (w *Wechaty) Message() _interface.IMessageFactory

Message ...

func (*Wechaty) Name

func (w *Wechaty) Name() string

Name Wechaty bot name set by `options.name`

func (*Wechaty) OnDong

func (w *Wechaty) OnDong(f EventDong) *Wechaty

OnDong ...

func (*Wechaty) OnError

func (w *Wechaty) OnError(f EventError) *Wechaty

OnError ...

func (*Wechaty) OnFriendship

func (w *Wechaty) OnFriendship(f EventFriendship) *Wechaty

OnFriendship ...

func (*Wechaty) OnHeartbeat

func (w *Wechaty) OnHeartbeat(f EventHeartbeat) *Wechaty

OnHeartbeat ...

func (*Wechaty) OnLogin

func (w *Wechaty) OnLogin(f EventLogin) *Wechaty

OnLogin ...

func (*Wechaty) OnLogout

func (w *Wechaty) OnLogout(f EventLogout) *Wechaty

OnLogout ...

func (*Wechaty) OnMessage

func (w *Wechaty) OnMessage(f EventMessage) *Wechaty

OnMessage ...

func (*Wechaty) OnReady

func (w *Wechaty) OnReady(f EventReady) *Wechaty

OnReady ...

func (*Wechaty) OnRoomInvite

func (w *Wechaty) OnRoomInvite(f EventRoomInvite) *Wechaty

OnRoomInvite ...

func (*Wechaty) OnRoomJoin

func (w *Wechaty) OnRoomJoin(f EventRoomJoin) *Wechaty

OnRoomJoin ...

func (*Wechaty) OnRoomLeave

func (w *Wechaty) OnRoomLeave(f EventRoomLeave) *Wechaty

OnRoomLeave ...

func (*Wechaty) OnRoomTopic

func (w *Wechaty) OnRoomTopic(f EventRoomTopic) *Wechaty

OnRoomTopic ...

func (*Wechaty) OnScan

func (w *Wechaty) OnScan(f EventScan) *Wechaty

OnScan ...

func (*Wechaty) OnStart

func (w *Wechaty) OnStart(f EventStart) *Wechaty

OnStart ...

func (*Wechaty) OnStop

func (w *Wechaty) OnStop(f EventStop) *Wechaty

OnStop ...

func (*Wechaty) Room

func (w *Wechaty) Room() _interface.IRoomFactory

Room ...

func (*Wechaty) RoomInvitation

func (w *Wechaty) RoomInvitation() _interface.IRoomInvitationFactory

RoomInvitation ...

func (*Wechaty) Start

func (w *Wechaty) Start() error

Start ...

func (*Wechaty) String

func (w *Wechaty) String() string

func (*Wechaty) Tag

func (w *Wechaty) Tag() _interface.ITagFactory

Tag ...

func (w *Wechaty) URLLink() _interface.IUrlLinkFactory

URLLink ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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