smart_wecom

package module
v0.0.0-...-b118752 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2023 License: GPL-3.0 Imports: 8 Imported by: 0

README

smart-wecom

企业微信接入ChatGPT

说明

此项目已具备访问控制、一次与多个smart对话和多用户控制管理等功能,管理入口暂时还不完善,如需要导入定制数据则需要另行开发,默认可以导入企微应用可见范围内部门所有成员。

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewRedis

func NewRedis(Addr string, Password string, db int) sc.Cache

Types

type Redis

type Redis struct {
	sc.Cache
	// contains filtered or unexported fields
}

func (Redis) Configure

func (r Redis) Configure(id string) (configure sc.Configure, err error)

func (Redis) ConfigureStore

func (r Redis) ConfigureStore(id string, configure sc.Configure) (err error)

func (Redis) Error

func (r Redis) Error(id sc.SessionID) (sc.SessionError, error)

func (Redis) ErrorStore

func (r Redis) ErrorStore(id sc.SessionID, sessionError sc.SessionError) error

func (Redis) Session

func (r Redis) Session(sessionID sc.SessionID) (session *sc.Session, err error)

func (Redis) SessionHistory

func (r Redis) SessionHistory(userUID sc.UserUID, start time.Time, end time.Time) (sessions []sc.Session, err error)

func (Redis) SessionStatus

func (r Redis) SessionStatus(sessionID sc.SessionID) (status sc.SessionStatus, err error)

func (Redis) SessionStatusRecord

func (r Redis) SessionStatusRecord(sessionID sc.SessionID, status sc.SessionStatus) error

func (Redis) SessionStore

func (r Redis) SessionStore(session *sc.Session) (err error)

func (Redis) User

func (r Redis) User(userUID sc.UserUID) (user *sc.User, err error)

func (Redis) UserAnswer

func (r Redis) UserAnswer(userUID sc.UserUID) ([]string, error)

func (Redis) UserAnswerStore

func (r Redis) UserAnswerStore(userUID sc.UserUID, smartIDs ...string) (err error)

func (Redis) UserBalance

func (r Redis) UserBalance(id sc.UserUID) (float32, error)

func (Redis) UserID2UID

func (r Redis) UserID2UID(userID string) (userUID sc.UserUID, err error)

func (Redis) UserSmartUIDs

func (r Redis) UserSmartUIDs(userUID sc.UserUID) ([]string, error)

func (Redis) UserSmartsStore

func (r Redis) UserSmartsStore(userUID sc.UserUID, smartIDs ...string) error

func (Redis) UserStore

func (r Redis) UserStore(user *sc.User) (err error)

func (Redis) UserUIDBind

func (r Redis) UserUIDBind(userID string, userUID sc.UserUID) (err error)

Directories

Path Synopsis
cmd

Jump to

Keyboard shortcuts

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