-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
48 lines (38 loc) · 862 Bytes
/
main.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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
/*
* @Author: Mamba24 [email protected]
* @Date: 2022-12-04 22:20:26
* @LastEditors: Mamba24 [email protected]
* @LastEditTime: 2023-03-07 01:24:08
* @FilePath: /FullService/main.go
* @Description: Web+DB
*
* Copyright (c) 2022 by Mamba24 [email protected], All Rights Reserved.
*/
package main
import (
"FullService/dbManager"
"FullService/person"
"FullService/pwd"
"FullService/webservice"
_ "github.com/mattn/go-sqlite3"
)
func main() {
openServices()
forUnitTest() // TODO: delete
}
func openServices() {
// database
dbManager.SetupDatabase()
dbManager.DbBindClass(new(person.Person))
dbManager.DbBindClass(new(pwd.Secret))
// web
webservice.SetupWebservice()
}
func forUnitTest() {
// user1 := new(person.Person)
// user1.Id = 0
// user1.Name = "yes"
// user1.Sex = "male"
// dbManager.Upsert(*user1)
person.SelectAll()
}