-
Notifications
You must be signed in to change notification settings - Fork 0
/
picturex.go
46 lines (33 loc) · 1.14 KB
/
picturex.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
package picturex
import (
"net/http"
"github.com/dekoch/gouniversal/module/picturex/global"
"github.com/dekoch/gouniversal/module/picturex/lang"
"github.com/dekoch/gouniversal/module/picturex/pairlist"
"github.com/dekoch/gouniversal/module/picturex/request"
"github.com/dekoch/gouniversal/module/picturex/ui"
"github.com/dekoch/gouniversal/module/picturex/upload"
"github.com/dekoch/gouniversal/shared/language"
"github.com/dekoch/gouniversal/shared/navigation"
"github.com/dekoch/gouniversal/shared/types"
)
func LoadConfig() {
global.Config.LoadConfig()
en := lang.DefaultEn()
global.Lang = language.New(global.Config.LangFileRoot, en, "en")
global.PairList.SetMaxPairs(global.Config.MaxPairs)
pairlist.SetSourcePath(global.Config.RawFileRoot)
pairlist.SetDestinationPath(global.Config.TempFileRoot)
pairlist.SetStaticPath(global.Config.StaticFileRoot)
request.LoadConfig()
upload.LoadConfig()
ui.LoadConfig()
}
func RegisterPage(page *types.Page, nav *navigation.Navigation) {
ui.RegisterPage(page, nav)
}
func Render(page *types.Page, nav *navigation.Navigation, r *http.Request) {
ui.Render(page, nav, r)
}
func Exit() {
}