-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
51 lines (41 loc) · 1.58 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
package main
import (
"log"
"net/http"
"adrdn/dit/user"
"adrdn/dit/role"
"adrdn/dit/home"
"adrdn/dit/flow"
"adrdn/dit/request"
"adrdn/dit/credential"
)
func main() {
log.Println("Server is started on: http://localhost:8000")
http.HandleFunc("/", credential.Login)
http.HandleFunc("/register", credential.SignUp)
http.HandleFunc("/signup", credential.RegisterNewUser)
http.HandleFunc("/auth", credential.Authentication)
http.HandleFunc("/logout", credential.Logout)
http.HandleFunc("/admin/users", user.DisplayAllUsers)
http.HandleFunc("/admin/users/delete", user.DeleteUser)
http.HandleFunc("/admin/role", role.ShowAllRoles)
http.HandleFunc("/admin/role/edit", role.Edit)
http.HandleFunc("/admin/role/update", role.Update)
http.HandleFunc("/admin/role/new", role.New)
http.HandleFunc("/admin/role/insert", role.Insert)
http.HandleFunc("/admin/role/delete", role.Delete)
http.HandleFunc("/admin/flow", flow.ShowAllFlows)
http.HandleFunc("/admin/flow/new", flow.New)
http.HandleFunc("/admin/flow/insert", flow.Insert)
http.HandleFunc("/admin/flow/delete", flow.Delete)
http.HandleFunc("/request/new", request.New)
http.HandleFunc("/request/process", request.Insert)
http.HandleFunc("/request/view", request.Echo)
http.HandleFunc("/request/detail", request.ShowDetails)
http.HandleFunc("/request/update", request.Update)
http.HandleFunc("/request/delete", request.Delete)
http.HandleFunc("/home", home.Home)
http.HandleFunc("/home/password", credential.ChangePassword)
http.HandleFunc("home/password/update", credential.UpdatePassword)
http.ListenAndServe(":8000", nil)
}