-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathmain.go
More file actions
41 lines (35 loc) · 892 Bytes
/
Copy pathmain.go
File metadata and controls
41 lines (35 loc) · 892 Bytes
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
29
30
31
32
33
34
35
36
37
38
39
40
41
package main
import (
"context"
"github.com/Cosydays/codeql_demo/biz/handler"
"github.com/Cosydays/codeql_demo/client"
"github.com/Cosydays/codeql_demo/model"
)
func main() {
ctx := context.Background()
client.InitRedisClient(ctx)
infoMap := map[string]string{}
infoMap["old_email"] = "test5@email.com"
deleteEmailReq := model.DeleteEmailRequest{
UserId: 123,
Email: "test1@email.com",
Info: infoMap,
}
handler.DeleteEmail(ctx, deleteEmailReq)
updateEmailReq := model.UpdateEmailRequest{
UserId: 456,
Email: "test2@email.com",
}
handler.UpdateEmail(ctx, updateEmailReq)
createEmailReq := model.CreateEmailRequest{
UserId: 789,
Email: "test3@email.com",
Status: "init",
}
handler.CreateEmail(ctx, createEmailReq)
changeEmailReq := model.ChangeEmailRequest{
UserId: 123,
Email: "test4@email.com",
}
handler.ChangeEmail(ctx, changeEmailReq)
}