-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathmain.go
146 lines (116 loc) · 4.61 KB
/
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
package main
import (
"fmt"
"log"
"net/http"
"runtime"
_ "github.com/lib/pq"
"go_authentication/chat"
"go_authentication/sqlcsv"
"go_authentication/search"
"go_authentication/sitemap"
"go_authentication/profile"
"go_authentication/article"
"go_authentication/booking"
"go_authentication/provision"
"go_authentication/schedule"
"go_authentication/recording"
"go_authentication/owner_ssc"
"go_authentication/subscription"
"go_authentication/slider"
)
func main() {
http.HandleFunc("/", profile.Home)
http.HandleFunc("/alluser", profile.Alluser)
http.HandleFunc("/signup", profile.Signup)
http.HandleFunc("/login", profile.Login)
http.HandleFunc("/auth", profile.AuthToken)
http.HandleFunc("/update-name", profile.UpName)
http.HandleFunc("/update-password", profile.UpPass)
http.HandleFunc("/send-email", profile.EmailSend)
http.HandleFunc("/verification", profile.VerifyEmail)
http.HandleFunc("/delete-user", profile.DelUs)
// art..
http.HandleFunc("/article", article.HomeArticle)
http.HandleFunc("/allarticle", article.Allarticle)
http.HandleFunc("/detail-art", article.DetArt)
http.HandleFunc("/author-id-article", article.UsAllArt)
http.HandleFunc("/creativity", article.Creativity)
http.HandleFunc("/update-art", article.UpArt)
http.HandleFunc("/delete-art", article.DelArt)
http.HandleFunc("/img-art", article.ImgArt)
http.HandleFunc("/del-img-art", article.DelImgArt)
// csv
http.HandleFunc("/csv-imp-art", sqlcsv.ImpArt)
http.HandleFunc("/csv-exp-art", sqlcsv.ExpArt)
http.HandleFunc("/csv-imp-ssc", sqlcsv.ImpSch)
http.HandleFunc("/csv-exp-ssc", sqlcsv.ExpSch)
// prv..
http.HandleFunc("/all-prv-days", provision.PrvAllD)
http.HandleFunc("/all-prv-hours", provision.PrvAllH)
http.HandleFunc("/creat-days", provision.CreatDays)
http.HandleFunc("/creat-hours", provision.CreatHours)
http.HandleFunc("/id-prv-days", provision.IdPrvDays)
http.HandleFunc("/id-prv-hours", provision.IdPrvHours)
// bkg
http.HandleFunc("/all-bkg", booking.BkgAll)
http.HandleFunc("/creat-bkg", booking.Creat)
http.HandleFunc("/creat-period-days", booking.Period)
http.HandleFunc("/creat-period-hours", booking.PeriodHours)
http.HandleFunc("/search-period-days", booking.SearchDays)
http.HandleFunc("/search-period-hours", booking.SearcHours)
// schedule
http.HandleFunc("/creat-schedule", schedule.Creat)
http.HandleFunc("/all-schedule", schedule.SchAll)
http.HandleFunc("/all-selection", schedule.SchSelect)
// recording
http.HandleFunc("/all-recording", recording.RcgAll)
http.HandleFunc("/creat-period", recording.Period)
http.HandleFunc("/all-sch-search", recording.Search)
// chat..
http.HandleFunc("/chat", chat.HomeChat)
http.HandleFunc("/all-group", chat.GrAll)
http.HandleFunc("/all-or-owner-group", chat.GrOwr)
http.HandleFunc("/detail-group", chat.DetGr)
http.HandleFunc("/creat-group", chat.Creat)
http.HandleFunc("/update-group", chat.UpGr)
http.HandleFunc("/user", chat.UsChat)
http.HandleFunc("/user/us", chat.UsMsg)
http.HandleFunc("/group", chat.GrChat)
http.HandleFunc("/group/rs", chat.GrMsg)
// owner subscription..
http.HandleFunc("/all-ssc", owner_ssc.OwrAllSsc)
http.HandleFunc("/detail-ssc", owner_ssc.DetOwrSsc)
http.HandleFunc("/del-ssc", owner_ssc.OwrDelSsc)
http.HandleFunc("/adduser-ssc", owner_ssc.AddSscUs)
http.HandleFunc("/addroom-ssc", owner_ssc.AddSscGr)
http.HandleFunc("/up-owner-ssc", owner_ssc.OwrUpSsc)
// subscription..
http.HandleFunc("/subscription", subscription.AllSsc)
http.HandleFunc("/user-ssc", subscription.ToUpUsSsc)
http.HandleFunc("/group-ssc", subscription.ToUpGroupSsc)
http.HandleFunc("/all-touser-ssc", subscription.ToUsAllSsc)
http.HandleFunc("/all-to-room-ssc", subscription.ToGroupAllSsc)
// slider..
http.HandleFunc("/add-collection", slider.CreatCollection)
http.HandleFunc("/all-collection", slider.CollectionAll)
http.HandleFunc("/update-collection", slider.UpColl)
http.HandleFunc("/add-slider", slider.CreatSlider)
http.HandleFunc("/all-slider", slider.AllSlider)
http.HandleFunc("/detail-slider", slider.DetSlider)
http.HandleFunc("/update-slider-key", slider.UpSlKey)
http.HandleFunc("/update-slider-text", slider.UpSlText)
http.HandleFunc("/update-slider-img", slider.UpSlImg)
// search..
http.HandleFunc("/search", search.SearchHandler)
// sitemap.xml
http.HandleFunc("/sitemap.xml", sitemap.SitemapHandler)
http.HandleFunc("/onauth", article.OnAuth)
// static..
dir := http.Dir("./sfl/static")
fls := http.FileServer(dir)
http.Handle("/static/", http.StripPrefix("/static", fls))
fmt.Println(" main goroutine..", runtime.NumGoroutine())
fmt.Println("Server running port 8080")
log.Fatal(http.ListenAndServe(":8080", nil))
}