-
Notifications
You must be signed in to change notification settings - Fork 1
/
usermgr.go
28 lines (24 loc) · 913 Bytes
/
usermgr.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
package chatbot
import (
"context"
"github.com/golang/protobuf/proto"
chatbotpb "github.com/zhs007/chatbot/chatbotpb"
)
// UserMgr - user maqnager
type UserMgr interface {
// GetAppUserInfo - get user infomation
GetAppUserInfo(ctx context.Context, appToken string, uai *chatbotpb.UserAppInfo) (
*chatbotpb.UserInfo, proto.Message, error)
// GetNoteInfo - get note infomation
GetNoteInfo(ctx context.Context, name string) (
*chatbotpb.NoteInfo, error)
// UpdNoteInfo - update note infomation
UpdNoteInfo(ctx context.Context, ni *chatbotpb.NoteInfo) error
// UpdNoteNode - update note node
UpdNoteNode(ctx context.Context, nn *chatbotpb.NoteNode) error
// GetNoteNode - get note node
GetNoteNode(ctx context.Context, nameNote string, noteIndex int64) (
*chatbotpb.NoteNode, error)
// DelNoteNode - delete note node
DelNoteNode(ctx context.Context, nameNote string, noteIndex int64) error
}