service

package
v0.0.0-...-8b17fe9 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2023 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitService

func InitService()

Types

type Appmsg

type Appmsg struct {
	XMLName xml.Name `xml:"appmsg"`
	Title   string   `xml:"title"`
	Desc    string   `xml:"desc"`
	Url     string   `xml:"url"`
}

type CacheService

type CacheService struct {
	Cache *gocache.Cache
}

func NewCacheService

func NewCacheService() *CacheService

func (*CacheService) Get

func (c *CacheService) Get(k string) (interface{}, bool)

func (*CacheService) Set

func (c *CacheService) Set(k string, v interface{}, d time.Duration)

type ContactService

type ContactService struct {
	ContactList map[string]entity.ContactEntity
}

func NewContactService

func NewContactService() *ContactService

func (*ContactService) GetById

func (c *ContactService) GetById(contactId string) entity.ContactEntity

func (*ContactService) SayTextToContact

func (c *ContactService) SayTextToContact(contactId string, msgText string, at string)

func (*ContactService) Upsert

type CpsService

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

func NewCpsService

func NewCpsService() *CpsService

func (*CpsService) DoCps

func (c *CpsService) DoCps(contact entity.ContactEntity, message *wechat.Msg) error

func (*CpsService) GetCpsLinkByUrl

func (c *CpsService) GetCpsLinkByUrl(url string) (string, error)

type GroupService

type GroupService struct {
	GroupRelatinMap map[int32][]entity.GroupRelationEntity
}

func NewGroupService

func NewGroupService() *GroupService

func (*GroupService) GetContactIdListByGroupId

func (g *GroupService) GetContactIdListByGroupId(groupId int32) []string

func (*GroupService) HasContact

func (g *GroupService) HasContact(groupId int32, contactId string) bool

type Msg

type Msg struct {
	XMLName xml.Name `xml:"msg"`
	Appmsg  Appmsg   `xml:"appmsg"`
}

type QaService

type QaService struct {
	QaConf map[string][]entity.SkillQaEntity
}

func NewQaService

func NewQaService() *QaService

func (*QaService) DoQa

func (q *QaService) DoQa(contact entity.ContactEntity, message *wechat.Msg)

type UserService

type UserService struct {
	UserMap map[int32]entity.UserEntity
}

func NewUserService

func NewUserService() *UserService

func (*UserService) GetAppKeyByAppId

func (o *UserService) GetAppKeyByAppId(appId int32) string

func (*UserService) GetUserByAppId

func (o *UserService) GetUserByAppId(appId int32) entity.UserEntity

Jump to

Keyboard shortcuts

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