From a57f780bf1e272b36e5327bd4d760eb28c468292 Mon Sep 17 00:00:00 2001 From: life Date: Thu, 27 Oct 2016 16:38:22 +0800 Subject: [PATCH] =?UTF-8?q?=E9=98=B2=E6=AD=A2Unzip=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E6=81=B6=E6=84=8F=E6=94=BB=E5=87=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../leanote/leanote/app/lea/Debug.go | 28 +- .../leanote/leanote/app/lea/archive/zip.go | 9 +- .../leanote/leanote/app/routes/routes.go | 1304 ++++++++--------- .../leanote/leanote/app/tmp/main.go | 880 +++++------ 4 files changed, 1118 insertions(+), 1103 deletions(-) diff --git a/src/github.com/leanote/leanote/app/lea/Debug.go b/src/github.com/leanote/leanote/app/lea/Debug.go index 70fbf51..8472f61 100644 --- a/src/github.com/leanote/leanote/app/lea/Debug.go +++ b/src/github.com/leanote/leanote/app/lea/Debug.go @@ -1,26 +1,34 @@ package lea import ( - "encoding/json" - "fmt" - "github.com/revel/revel" + "encoding/json" + "fmt" + "github.com/revel/revel" ) -func Log(i interface{}) { - revel.INFO.Println(i) +func Log(i ...interface{}) { + revel.INFO.Println(i...) +} + +func LogW(i ...interface{}) { + revel.WARN.Println(i...) +} + +func Log1(key, i interface{}) { + revel.INFO.Println(key, i) } func LogJ(i interface{}) { - b, _ := json.MarshalIndent(i, "", " ") - revel.INFO.Println(string(b)) + b, _ := json.MarshalIndent(i, "", " ") + revel.INFO.Println(string(b)) } // 为test用 func L(i interface{}) { - fmt.Println(i) + fmt.Println(i) } func LJ(i interface{}) { - b, _ := json.MarshalIndent(i, "", " ") - fmt.Println(string(b)) + b, _ := json.MarshalIndent(i, "", " ") + fmt.Println(string(b)) } diff --git a/src/github.com/leanote/leanote/app/lea/archive/zip.go b/src/github.com/leanote/leanote/app/lea/archive/zip.go index 2f5346f..80a16a4 100644 --- a/src/github.com/leanote/leanote/app/lea/archive/zip.go +++ b/src/github.com/leanote/leanote/app/lea/archive/zip.go @@ -7,6 +7,7 @@ import ( "os" "path" "strings" + "github.com/leanote/leanote/app/lea" ) // main functions shows how to TarGz a directory/file and @@ -144,12 +145,18 @@ func Unzip(srcFilePath string, destDirPath string) (ok bool, msg string) { } defer r.Close() for _, f := range r.File { - // fmt.Println("FileName : ", f.Name); // j/aaa.zip + // fmt.Println("FileName : ", f.Name); // j/aaa.zip rc, err := f.Open() if err != nil { panic(err) } + // 包含恶意目录 + if strings.Contains(f.Name, "../") { + lea.LogW("恶意文件", f.Name); + continue + } + // 把首文件夹去掉, 即j去掉, 分离出文件夹和文件名 paths := strings.Split(f.Name, "/") prePath := "" diff --git a/src/github.com/leanote/leanote/app/routes/routes.go b/src/github.com/leanote/leanote/app/routes/routes.go index 3a9784b..3419cb9 100644 --- a/src/github.com/leanote/leanote/app/routes/routes.go +++ b/src/github.com/leanote/leanote/app/routes/routes.go @@ -54,155 +54,6 @@ func (_ tStatic) ServeModule( } -type tNotebook struct {} -var Notebook tNotebook - - -func (_ tNotebook) Index( - notebook interface{}, - i int, - name string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "notebook", notebook) - revel.Unbind(args, "i", i) - revel.Unbind(args, "name", name) - return revel.MainRouter.Reverse("Notebook.Index", args).Url -} - -func (_ tNotebook) GetNotebooks( - ) string { - args := make(map[string]string) - - return revel.MainRouter.Reverse("Notebook.GetNotebooks", args).Url -} - -func (_ tNotebook) DeleteNotebook( - notebookId string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "notebookId", notebookId) - return revel.MainRouter.Reverse("Notebook.DeleteNotebook", args).Url -} - -func (_ tNotebook) AddNotebook( - notebookId string, - title string, - parentNotebookId string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "notebookId", notebookId) - revel.Unbind(args, "title", title) - revel.Unbind(args, "parentNotebookId", parentNotebookId) - return revel.MainRouter.Reverse("Notebook.AddNotebook", args).Url -} - -func (_ tNotebook) UpdateNotebookTitle( - notebookId string, - title string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "notebookId", notebookId) - revel.Unbind(args, "title", title) - return revel.MainRouter.Reverse("Notebook.UpdateNotebookTitle", args).Url -} - -func (_ tNotebook) DragNotebooks( - data string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "data", data) - return revel.MainRouter.Reverse("Notebook.DragNotebooks", args).Url -} - -func (_ tNotebook) SetNotebook2Blog( - notebookId string, - isBlog bool, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "notebookId", notebookId) - revel.Unbind(args, "isBlog", isBlog) - return revel.MainRouter.Reverse("Notebook.SetNotebook2Blog", args).Url -} - - -type tTag struct {} -var Tag tTag - - -func (_ tTag) UpdateTag( - tag string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "tag", tag) - return revel.MainRouter.Reverse("Tag.UpdateTag", args).Url -} - -func (_ tTag) DeleteTag( - tag string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "tag", tag) - return revel.MainRouter.Reverse("Tag.DeleteTag", args).Url -} - - -type tAlbum struct {} -var Album tAlbum - - -func (_ tAlbum) Index( - ) string { - args := make(map[string]string) - - return revel.MainRouter.Reverse("Album.Index", args).Url -} - -func (_ tAlbum) GetAlbums( - ) string { - args := make(map[string]string) - - return revel.MainRouter.Reverse("Album.GetAlbums", args).Url -} - -func (_ tAlbum) DeleteAlbum( - albumId string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "albumId", albumId) - return revel.MainRouter.Reverse("Album.DeleteAlbum", args).Url -} - -func (_ tAlbum) AddAlbum( - name string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "name", name) - return revel.MainRouter.Reverse("Album.AddAlbum", args).Url -} - -func (_ tAlbum) UpdateAlbum( - albumId string, - name string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "albumId", albumId) - revel.Unbind(args, "name", name) - return revel.MainRouter.Reverse("Album.UpdateAlbum", args).Url -} - - type tBlog struct {} var Blog tBlog @@ -419,109 +270,6 @@ func (_ tBlog) ListCateLatest( } -type tAuth struct {} -var Auth tAuth - - -func (_ tAuth) Login( - email string, - from string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "email", email) - revel.Unbind(args, "from", from) - return revel.MainRouter.Reverse("Auth.Login", args).Url -} - -func (_ tAuth) DoLogin( - email string, - pwd string, - captcha string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "email", email) - revel.Unbind(args, "pwd", pwd) - revel.Unbind(args, "captcha", captcha) - return revel.MainRouter.Reverse("Auth.DoLogin", args).Url -} - -func (_ tAuth) Logout( - ) string { - args := make(map[string]string) - - return revel.MainRouter.Reverse("Auth.Logout", args).Url -} - -func (_ tAuth) Demo( - ) string { - args := make(map[string]string) - - return revel.MainRouter.Reverse("Auth.Demo", args).Url -} - -func (_ tAuth) Register( - from string, - iu string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "from", from) - revel.Unbind(args, "iu", iu) - return revel.MainRouter.Reverse("Auth.Register", args).Url -} - -func (_ tAuth) DoRegister( - email string, - pwd string, - iu string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "email", email) - revel.Unbind(args, "pwd", pwd) - revel.Unbind(args, "iu", iu) - return revel.MainRouter.Reverse("Auth.DoRegister", args).Url -} - -func (_ tAuth) FindPassword( - ) string { - args := make(map[string]string) - - return revel.MainRouter.Reverse("Auth.FindPassword", args).Url -} - -func (_ tAuth) DoFindPassword( - email string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "email", email) - return revel.MainRouter.Reverse("Auth.DoFindPassword", args).Url -} - -func (_ tAuth) FindPassword2( - token string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "token", token) - return revel.MainRouter.Reverse("Auth.FindPassword2", args).Url -} - -func (_ tAuth) FindPasswordUpdate( - token string, - pwd string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "token", token) - revel.Unbind(args, "pwd", pwd) - return revel.MainRouter.Reverse("Auth.FindPasswordUpdate", args).Url -} - - type tFile struct {} var File tFile @@ -625,17 +373,111 @@ func (_ tFile) CopyHttpImage( } -type tNoteContentHistory struct {} -var NoteContentHistory tNoteContentHistory +type tIndex struct {} +var Index tIndex -func (_ tNoteContentHistory) ListHistories( - noteId string, +func (_ tIndex) Default( ) string { args := make(map[string]string) - revel.Unbind(args, "noteId", noteId) - return revel.MainRouter.Reverse("NoteContentHistory.ListHistories", args).Url + return revel.MainRouter.Reverse("Index.Default", args).Url +} + +func (_ tIndex) Index( + ) string { + args := make(map[string]string) + + return revel.MainRouter.Reverse("Index.Index", args).Url +} + +func (_ tIndex) Suggestion( + addr string, + suggestion string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "addr", addr) + revel.Unbind(args, "suggestion", suggestion) + return revel.MainRouter.Reverse("Index.Suggestion", args).Url +} + + +type tNotebook struct {} +var Notebook tNotebook + + +func (_ tNotebook) Index( + notebook interface{}, + i int, + name string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "notebook", notebook) + revel.Unbind(args, "i", i) + revel.Unbind(args, "name", name) + return revel.MainRouter.Reverse("Notebook.Index", args).Url +} + +func (_ tNotebook) GetNotebooks( + ) string { + args := make(map[string]string) + + return revel.MainRouter.Reverse("Notebook.GetNotebooks", args).Url +} + +func (_ tNotebook) DeleteNotebook( + notebookId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "notebookId", notebookId) + return revel.MainRouter.Reverse("Notebook.DeleteNotebook", args).Url +} + +func (_ tNotebook) AddNotebook( + notebookId string, + title string, + parentNotebookId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "notebookId", notebookId) + revel.Unbind(args, "title", title) + revel.Unbind(args, "parentNotebookId", parentNotebookId) + return revel.MainRouter.Reverse("Notebook.AddNotebook", args).Url +} + +func (_ tNotebook) UpdateNotebookTitle( + notebookId string, + title string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "notebookId", notebookId) + revel.Unbind(args, "title", title) + return revel.MainRouter.Reverse("Notebook.UpdateNotebookTitle", args).Url +} + +func (_ tNotebook) DragNotebooks( + data string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "data", data) + return revel.MainRouter.Reverse("Notebook.DragNotebooks", args).Url +} + +func (_ tNotebook) SetNotebook2Blog( + notebookId string, + isBlog bool, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "notebookId", notebookId) + revel.Unbind(args, "isBlog", isBlog) + return revel.MainRouter.Reverse("Notebook.SetNotebook2Blog", args).Url } @@ -790,168 +632,177 @@ func (_ tAttach) DownloadAll( } -type tNote struct {} -var Note tNote +type tTag struct {} +var Tag tTag -func (_ tNote) Index( - noteId string, - online string, +func (_ tTag) UpdateTag( + tag string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteId", noteId) - revel.Unbind(args, "online", online) - return revel.MainRouter.Reverse("Note.Index", args).Url + revel.Unbind(args, "tag", tag) + return revel.MainRouter.Reverse("Tag.UpdateTag", args).Url } -func (_ tNote) ListNotes( - notebookId string, +func (_ tTag) DeleteTag( + tag string, ) string { args := make(map[string]string) - revel.Unbind(args, "notebookId", notebookId) - return revel.MainRouter.Reverse("Note.ListNotes", args).Url + revel.Unbind(args, "tag", tag) + return revel.MainRouter.Reverse("Tag.DeleteTag", args).Url } -func (_ tNote) ListTrashNotes( + +type tAlbum struct {} +var Album tAlbum + + +func (_ tAlbum) Index( ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("Note.ListTrashNotes", args).Url + return revel.MainRouter.Reverse("Album.Index", args).Url } -func (_ tNote) GetNoteAndContent( - noteId string, +func (_ tAlbum) GetAlbums( ) string { args := make(map[string]string) - revel.Unbind(args, "noteId", noteId) - return revel.MainRouter.Reverse("Note.GetNoteAndContent", args).Url + return revel.MainRouter.Reverse("Album.GetAlbums", args).Url } -func (_ tNote) GetNoteContent( - noteId string, +func (_ tAlbum) DeleteAlbum( + albumId string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteId", noteId) - return revel.MainRouter.Reverse("Note.GetNoteContent", args).Url + revel.Unbind(args, "albumId", albumId) + return revel.MainRouter.Reverse("Album.DeleteAlbum", args).Url } -func (_ tNote) UpdateNoteOrContent( - noteOrContent interface{}, +func (_ tAlbum) AddAlbum( + name string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteOrContent", noteOrContent) - return revel.MainRouter.Reverse("Note.UpdateNoteOrContent", args).Url + revel.Unbind(args, "name", name) + return revel.MainRouter.Reverse("Album.AddAlbum", args).Url } -func (_ tNote) DeleteNote( - noteIds []string, - isShared bool, +func (_ tAlbum) UpdateAlbum( + albumId string, + name string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteIds", noteIds) - revel.Unbind(args, "isShared", isShared) - return revel.MainRouter.Reverse("Note.DeleteNote", args).Url + revel.Unbind(args, "albumId", albumId) + revel.Unbind(args, "name", name) + return revel.MainRouter.Reverse("Album.UpdateAlbum", args).Url } -func (_ tNote) DeleteTrash( - noteId string, + +type tAuth struct {} +var Auth tAuth + + +func (_ tAuth) Login( + email string, + from string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteId", noteId) - return revel.MainRouter.Reverse("Note.DeleteTrash", args).Url + revel.Unbind(args, "email", email) + revel.Unbind(args, "from", from) + return revel.MainRouter.Reverse("Auth.Login", args).Url } -func (_ tNote) MoveNote( - noteIds []string, - notebookId string, +func (_ tAuth) DoLogin( + email string, + pwd string, + captcha string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteIds", noteIds) - revel.Unbind(args, "notebookId", notebookId) - return revel.MainRouter.Reverse("Note.MoveNote", args).Url + revel.Unbind(args, "email", email) + revel.Unbind(args, "pwd", pwd) + revel.Unbind(args, "captcha", captcha) + return revel.MainRouter.Reverse("Auth.DoLogin", args).Url } -func (_ tNote) CopyNote( - noteIds []string, - notebookId string, +func (_ tAuth) Logout( ) string { args := make(map[string]string) - revel.Unbind(args, "noteIds", noteIds) - revel.Unbind(args, "notebookId", notebookId) - return revel.MainRouter.Reverse("Note.CopyNote", args).Url + return revel.MainRouter.Reverse("Auth.Logout", args).Url } -func (_ tNote) CopySharedNote( - noteIds []string, - notebookId string, - fromUserId string, +func (_ tAuth) Demo( ) string { args := make(map[string]string) - revel.Unbind(args, "noteIds", noteIds) - revel.Unbind(args, "notebookId", notebookId) - revel.Unbind(args, "fromUserId", fromUserId) - return revel.MainRouter.Reverse("Note.CopySharedNote", args).Url + return revel.MainRouter.Reverse("Auth.Demo", args).Url } -func (_ tNote) SearchNote( - key string, +func (_ tAuth) Register( + from string, + iu string, ) string { args := make(map[string]string) - revel.Unbind(args, "key", key) - return revel.MainRouter.Reverse("Note.SearchNote", args).Url + revel.Unbind(args, "from", from) + revel.Unbind(args, "iu", iu) + return revel.MainRouter.Reverse("Auth.Register", args).Url } -func (_ tNote) SearchNoteByTags( - tags []string, +func (_ tAuth) DoRegister( + email string, + pwd string, + iu string, ) string { args := make(map[string]string) - revel.Unbind(args, "tags", tags) - return revel.MainRouter.Reverse("Note.SearchNoteByTags", args).Url + revel.Unbind(args, "email", email) + revel.Unbind(args, "pwd", pwd) + revel.Unbind(args, "iu", iu) + return revel.MainRouter.Reverse("Auth.DoRegister", args).Url } -func (_ tNote) ToPdf( - noteId string, - appKey string, +func (_ tAuth) FindPassword( ) string { args := make(map[string]string) - revel.Unbind(args, "noteId", noteId) - revel.Unbind(args, "appKey", appKey) - return revel.MainRouter.Reverse("Note.ToPdf", args).Url + return revel.MainRouter.Reverse("Auth.FindPassword", args).Url } -func (_ tNote) ExportPdf( - noteId string, +func (_ tAuth) DoFindPassword( + email string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteId", noteId) - return revel.MainRouter.Reverse("Note.ExportPdf", args).Url + revel.Unbind(args, "email", email) + return revel.MainRouter.Reverse("Auth.DoFindPassword", args).Url } -func (_ tNote) SetNote2Blog( - noteIds []string, - isBlog bool, - isTop bool, +func (_ tAuth) FindPassword2( + token string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteIds", noteIds) - revel.Unbind(args, "isBlog", isBlog) - revel.Unbind(args, "isTop", isTop) - return revel.MainRouter.Reverse("Note.SetNote2Blog", args).Url + revel.Unbind(args, "token", token) + return revel.MainRouter.Reverse("Auth.FindPassword2", args).Url +} + +func (_ tAuth) FindPasswordUpdate( + token string, + pwd string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "token", token) + revel.Unbind(args, "pwd", pwd) + return revel.MainRouter.Reverse("Auth.FindPasswordUpdate", args).Url } @@ -967,33 +818,182 @@ func (_ tCaptcha) Get( } -type tIndex struct {} -var Index tIndex +type tNoteContentHistory struct {} +var NoteContentHistory tNoteContentHistory -func (_ tIndex) Default( +func (_ tNoteContentHistory) ListHistories( + noteId string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("Index.Default", args).Url + revel.Unbind(args, "noteId", noteId) + return revel.MainRouter.Reverse("NoteContentHistory.ListHistories", args).Url } -func (_ tIndex) Index( + +type tNote struct {} +var Note tNote + + +func (_ tNote) Index( + noteId string, + online string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("Index.Index", args).Url + revel.Unbind(args, "noteId", noteId) + revel.Unbind(args, "online", online) + return revel.MainRouter.Reverse("Note.Index", args).Url } -func (_ tIndex) Suggestion( - addr string, - suggestion string, +func (_ tNote) ListNotes( + notebookId string, ) string { args := make(map[string]string) - revel.Unbind(args, "addr", addr) - revel.Unbind(args, "suggestion", suggestion) - return revel.MainRouter.Reverse("Index.Suggestion", args).Url + revel.Unbind(args, "notebookId", notebookId) + return revel.MainRouter.Reverse("Note.ListNotes", args).Url +} + +func (_ tNote) ListTrashNotes( + ) string { + args := make(map[string]string) + + return revel.MainRouter.Reverse("Note.ListTrashNotes", args).Url +} + +func (_ tNote) GetNoteAndContent( + noteId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteId", noteId) + return revel.MainRouter.Reverse("Note.GetNoteAndContent", args).Url +} + +func (_ tNote) GetNoteContent( + noteId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteId", noteId) + return revel.MainRouter.Reverse("Note.GetNoteContent", args).Url +} + +func (_ tNote) UpdateNoteOrContent( + noteOrContent interface{}, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteOrContent", noteOrContent) + return revel.MainRouter.Reverse("Note.UpdateNoteOrContent", args).Url +} + +func (_ tNote) DeleteNote( + noteIds []string, + isShared bool, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteIds", noteIds) + revel.Unbind(args, "isShared", isShared) + return revel.MainRouter.Reverse("Note.DeleteNote", args).Url +} + +func (_ tNote) DeleteTrash( + noteId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteId", noteId) + return revel.MainRouter.Reverse("Note.DeleteTrash", args).Url +} + +func (_ tNote) MoveNote( + noteIds []string, + notebookId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteIds", noteIds) + revel.Unbind(args, "notebookId", notebookId) + return revel.MainRouter.Reverse("Note.MoveNote", args).Url +} + +func (_ tNote) CopyNote( + noteIds []string, + notebookId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteIds", noteIds) + revel.Unbind(args, "notebookId", notebookId) + return revel.MainRouter.Reverse("Note.CopyNote", args).Url +} + +func (_ tNote) CopySharedNote( + noteIds []string, + notebookId string, + fromUserId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteIds", noteIds) + revel.Unbind(args, "notebookId", notebookId) + revel.Unbind(args, "fromUserId", fromUserId) + return revel.MainRouter.Reverse("Note.CopySharedNote", args).Url +} + +func (_ tNote) SearchNote( + key string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "key", key) + return revel.MainRouter.Reverse("Note.SearchNote", args).Url +} + +func (_ tNote) SearchNoteByTags( + tags []string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "tags", tags) + return revel.MainRouter.Reverse("Note.SearchNoteByTags", args).Url +} + +func (_ tNote) ToPdf( + noteId string, + appKey string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteId", noteId) + revel.Unbind(args, "appKey", appKey) + return revel.MainRouter.Reverse("Note.ToPdf", args).Url +} + +func (_ tNote) ExportPdf( + noteId string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteId", noteId) + return revel.MainRouter.Reverse("Note.ExportPdf", args).Url +} + +func (_ tNote) SetNote2Blog( + noteIds []string, + isBlog bool, + isTop bool, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "noteIds", noteIds) + revel.Unbind(args, "isBlog", isBlog) + revel.Unbind(args, "isTop", isTop) + return revel.MainRouter.Reverse("Note.SetNote2Blog", args).Url } @@ -1331,293 +1331,309 @@ func (_ tPreview) Search( } -type tAdminSetting struct {} -var AdminSetting tAdminSetting +type tAdminBlog struct {} +var AdminBlog tAdminBlog -func (_ tAdminSetting) Email( +func (_ tAdminBlog) Index( + sorter string, + keywords string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminSetting.Email", args).Url + revel.Unbind(args, "sorter", sorter) + revel.Unbind(args, "keywords", keywords) + return revel.MainRouter.Reverse("AdminBlog.Index", args).Url } -func (_ tAdminSetting) Blog( +func (_ tAdminBlog) SetRecommend( + noteId string, + recommend bool, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminSetting.Blog", args).Url + revel.Unbind(args, "noteId", noteId) + revel.Unbind(args, "recommend", recommend) + return revel.MainRouter.Reverse("AdminBlog.SetRecommend", args).Url } -func (_ tAdminSetting) DoBlogTag( - recommendTags string, - newTags string, + +type tAdmin struct {} +var Admin tAdmin + + +func (_ tAdmin) Index( ) string { args := make(map[string]string) - revel.Unbind(args, "recommendTags", recommendTags) - revel.Unbind(args, "newTags", newTags) - return revel.MainRouter.Reverse("AdminSetting.DoBlogTag", args).Url + return revel.MainRouter.Reverse("Admin.Index", args).Url } -func (_ tAdminSetting) ShareNote( - registerSharedUserId string, - registerSharedNotebookPerms []int, - registerSharedNotePerms []int, - registerSharedNotebookIds []string, - registerSharedNoteIds []string, - registerCopyNoteIds []string, +func (_ tAdmin) T( + t string, ) string { args := make(map[string]string) - revel.Unbind(args, "registerSharedUserId", registerSharedUserId) - revel.Unbind(args, "registerSharedNotebookPerms", registerSharedNotebookPerms) - revel.Unbind(args, "registerSharedNotePerms", registerSharedNotePerms) - revel.Unbind(args, "registerSharedNotebookIds", registerSharedNotebookIds) - revel.Unbind(args, "registerSharedNoteIds", registerSharedNoteIds) - revel.Unbind(args, "registerCopyNoteIds", registerCopyNoteIds) - return revel.MainRouter.Reverse("AdminSetting.ShareNote", args).Url + revel.Unbind(args, "t", t) + return revel.MainRouter.Reverse("Admin.T", args).Url } -func (_ tAdminSetting) Demo( +func (_ tAdmin) GetView( + view string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminSetting.Demo", args).Url + revel.Unbind(args, "view", view) + return revel.MainRouter.Reverse("Admin.GetView", args).Url } -func (_ tAdminSetting) DoDemo( - demoUsername string, - demoPassword string, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "demoUsername", demoUsername) - revel.Unbind(args, "demoPassword", demoPassword) - return revel.MainRouter.Reverse("AdminSetting.DoDemo", args).Url -} -func (_ tAdminSetting) ExportPdf( - path string, +type tAdminData struct {} +var AdminData tAdminData + + +func (_ tAdminData) Index( ) string { args := make(map[string]string) - revel.Unbind(args, "path", path) - return revel.MainRouter.Reverse("AdminSetting.ExportPdf", args).Url + return revel.MainRouter.Reverse("AdminData.Index", args).Url } -func (_ tAdminSetting) DoSiteUrl( - siteUrl string, +func (_ tAdminData) Backup( ) string { args := make(map[string]string) - revel.Unbind(args, "siteUrl", siteUrl) - return revel.MainRouter.Reverse("AdminSetting.DoSiteUrl", args).Url + return revel.MainRouter.Reverse("AdminData.Backup", args).Url } -func (_ tAdminSetting) SubDomain( +func (_ tAdminData) Restore( + createdTime string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminSetting.SubDomain", args).Url + revel.Unbind(args, "createdTime", createdTime) + return revel.MainRouter.Reverse("AdminData.Restore", args).Url } -func (_ tAdminSetting) DoSubDomain( - noteSubDomain string, - blogSubDomain string, - leaSubDomain string, - blackSubDomains string, - allowCustomDomain string, - blackCustomDomains string, +func (_ tAdminData) Delete( + createdTime string, ) string { args := make(map[string]string) - revel.Unbind(args, "noteSubDomain", noteSubDomain) - revel.Unbind(args, "blogSubDomain", blogSubDomain) - revel.Unbind(args, "leaSubDomain", leaSubDomain) - revel.Unbind(args, "blackSubDomains", blackSubDomains) - revel.Unbind(args, "allowCustomDomain", allowCustomDomain) - revel.Unbind(args, "blackCustomDomains", blackCustomDomains) - return revel.MainRouter.Reverse("AdminSetting.DoSubDomain", args).Url + revel.Unbind(args, "createdTime", createdTime) + return revel.MainRouter.Reverse("AdminData.Delete", args).Url } -func (_ tAdminSetting) OpenRegister( - openRegister string, +func (_ tAdminData) UpdateRemark( + createdTime string, + remark string, ) string { args := make(map[string]string) - revel.Unbind(args, "openRegister", openRegister) - return revel.MainRouter.Reverse("AdminSetting.OpenRegister", args).Url + revel.Unbind(args, "createdTime", createdTime) + revel.Unbind(args, "remark", remark) + return revel.MainRouter.Reverse("AdminData.UpdateRemark", args).Url } -func (_ tAdminSetting) HomePage( - homePage string, +func (_ tAdminData) Download( + createdTime string, ) string { args := make(map[string]string) - revel.Unbind(args, "homePage", homePage) - return revel.MainRouter.Reverse("AdminSetting.HomePage", args).Url + revel.Unbind(args, "createdTime", createdTime) + return revel.MainRouter.Reverse("AdminData.Download", args).Url } -func (_ tAdminSetting) Mongodb( - mongodumpPath string, - mongorestorePath string, + +type tAdminEmail struct {} +var AdminEmail tAdminEmail + + +func (_ tAdminEmail) Email( ) string { args := make(map[string]string) - revel.Unbind(args, "mongodumpPath", mongodumpPath) - revel.Unbind(args, "mongorestorePath", mongorestorePath) - return revel.MainRouter.Reverse("AdminSetting.Mongodb", args).Url + return revel.MainRouter.Reverse("AdminEmail.Email", args).Url } -func (_ tAdminSetting) UploadSize( - uploadImageSize float64, - uploadAvatarSize float64, - uploadBlogLogoSize float64, - uploadAttachSize float64, +func (_ tAdminEmail) Blog( ) string { args := make(map[string]string) - revel.Unbind(args, "uploadImageSize", uploadImageSize) - revel.Unbind(args, "uploadAvatarSize", uploadAvatarSize) - revel.Unbind(args, "uploadBlogLogoSize", uploadBlogLogoSize) - revel.Unbind(args, "uploadAttachSize", uploadAttachSize) - return revel.MainRouter.Reverse("AdminSetting.UploadSize", args).Url + return revel.MainRouter.Reverse("AdminEmail.Blog", args).Url } - -type tAdminUpgrade struct {} -var AdminUpgrade tAdminUpgrade - - -func (_ tAdminUpgrade) UpgradeBlog( +func (_ tAdminEmail) DoBlogTag( + recommendTags string, + newTags string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminUpgrade.UpgradeBlog", args).Url + revel.Unbind(args, "recommendTags", recommendTags) + revel.Unbind(args, "newTags", newTags) + return revel.MainRouter.Reverse("AdminEmail.DoBlogTag", args).Url } -func (_ tAdminUpgrade) UpgradeBetaToBeta2( +func (_ tAdminEmail) Demo( ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminUpgrade.UpgradeBetaToBeta2", args).Url + return revel.MainRouter.Reverse("AdminEmail.Demo", args).Url } -func (_ tAdminUpgrade) UpgradeBeta3ToBeta4( +func (_ tAdminEmail) DoDemo( + demoUsername string, + demoPassword string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminUpgrade.UpgradeBeta3ToBeta4", args).Url + revel.Unbind(args, "demoUsername", demoUsername) + revel.Unbind(args, "demoPassword", demoPassword) + return revel.MainRouter.Reverse("AdminEmail.DoDemo", args).Url } - -type tAdmin struct {} -var Admin tAdmin - - -func (_ tAdmin) Index( +func (_ tAdminEmail) ToImage( ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("Admin.Index", args).Url + return revel.MainRouter.Reverse("AdminEmail.ToImage", args).Url } -func (_ tAdmin) T( - t string, +func (_ tAdminEmail) DoToImage( + toImageBinPath string, ) string { args := make(map[string]string) - revel.Unbind(args, "t", t) - return revel.MainRouter.Reverse("Admin.T", args).Url + revel.Unbind(args, "toImageBinPath", toImageBinPath) + return revel.MainRouter.Reverse("AdminEmail.DoToImage", args).Url } -func (_ tAdmin) GetView( - view string, +func (_ tAdminEmail) Set( + emailHost string, + emailPort string, + emailUsername string, + emailPassword string, ) string { args := make(map[string]string) - revel.Unbind(args, "view", view) - return revel.MainRouter.Reverse("Admin.GetView", args).Url + revel.Unbind(args, "emailHost", emailHost) + revel.Unbind(args, "emailPort", emailPort) + revel.Unbind(args, "emailUsername", emailUsername) + revel.Unbind(args, "emailPassword", emailPassword) + return revel.MainRouter.Reverse("AdminEmail.Set", args).Url } +func (_ tAdminEmail) Template( + ) string { + args := make(map[string]string) + + return revel.MainRouter.Reverse("AdminEmail.Template", args).Url +} -type tAdminData struct {} -var AdminData tAdminData - - -func (_ tAdminData) Index( +func (_ tAdminEmail) SendEmailToEmails( + sendEmails string, + latestEmailSubject string, + latestEmailBody string, + verified bool, + saveAsOldEmail bool, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminData.Index", args).Url + revel.Unbind(args, "sendEmails", sendEmails) + revel.Unbind(args, "latestEmailSubject", latestEmailSubject) + revel.Unbind(args, "latestEmailBody", latestEmailBody) + revel.Unbind(args, "verified", verified) + revel.Unbind(args, "saveAsOldEmail", saveAsOldEmail) + return revel.MainRouter.Reverse("AdminEmail.SendEmailToEmails", args).Url } -func (_ tAdminData) Backup( +func (_ tAdminEmail) SendToUsers2( + emails string, + latestEmailSubject string, + latestEmailBody string, + verified bool, + saveAsOldEmail bool, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminData.Backup", args).Url + revel.Unbind(args, "emails", emails) + revel.Unbind(args, "latestEmailSubject", latestEmailSubject) + revel.Unbind(args, "latestEmailBody", latestEmailBody) + revel.Unbind(args, "verified", verified) + revel.Unbind(args, "saveAsOldEmail", saveAsOldEmail) + return revel.MainRouter.Reverse("AdminEmail.SendToUsers2", args).Url } -func (_ tAdminData) Restore( - createdTime string, +func (_ tAdminEmail) SendEmailDialog( + emails string, ) string { args := make(map[string]string) - revel.Unbind(args, "createdTime", createdTime) - return revel.MainRouter.Reverse("AdminData.Restore", args).Url + revel.Unbind(args, "emails", emails) + return revel.MainRouter.Reverse("AdminEmail.SendEmailDialog", args).Url } -func (_ tAdminData) Delete( - createdTime string, +func (_ tAdminEmail) SendToUsers( + userFilterEmail string, + userFilterWhiteList string, + userFilterBlackList string, + latestEmailSubject string, + latestEmailBody string, + verified bool, + saveAsOldEmail bool, ) string { args := make(map[string]string) - revel.Unbind(args, "createdTime", createdTime) - return revel.MainRouter.Reverse("AdminData.Delete", args).Url + revel.Unbind(args, "userFilterEmail", userFilterEmail) + revel.Unbind(args, "userFilterWhiteList", userFilterWhiteList) + revel.Unbind(args, "userFilterBlackList", userFilterBlackList) + revel.Unbind(args, "latestEmailSubject", latestEmailSubject) + revel.Unbind(args, "latestEmailBody", latestEmailBody) + revel.Unbind(args, "verified", verified) + revel.Unbind(args, "saveAsOldEmail", saveAsOldEmail) + return revel.MainRouter.Reverse("AdminEmail.SendToUsers", args).Url } -func (_ tAdminData) UpdateRemark( - createdTime string, - remark string, +func (_ tAdminEmail) DeleteEmails( + ids string, ) string { args := make(map[string]string) - revel.Unbind(args, "createdTime", createdTime) - revel.Unbind(args, "remark", remark) - return revel.MainRouter.Reverse("AdminData.UpdateRemark", args).Url + revel.Unbind(args, "ids", ids) + return revel.MainRouter.Reverse("AdminEmail.DeleteEmails", args).Url } -func (_ tAdminData) Download( - createdTime string, +func (_ tAdminEmail) List( + sorter string, + keywords string, ) string { args := make(map[string]string) - revel.Unbind(args, "createdTime", createdTime) - return revel.MainRouter.Reverse("AdminData.Download", args).Url + revel.Unbind(args, "sorter", sorter) + revel.Unbind(args, "keywords", keywords) + return revel.MainRouter.Reverse("AdminEmail.List", args).Url } -type tAdminEmail struct {} -var AdminEmail tAdminEmail +type tAdminSetting struct {} +var AdminSetting tAdminSetting -func (_ tAdminEmail) Email( +func (_ tAdminSetting) Email( ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminEmail.Email", args).Url + return revel.MainRouter.Reverse("AdminSetting.Email", args).Url } -func (_ tAdminEmail) Blog( +func (_ tAdminSetting) Blog( ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminEmail.Blog", args).Url + return revel.MainRouter.Reverse("AdminSetting.Blog", args).Url } -func (_ tAdminEmail) DoBlogTag( +func (_ tAdminSetting) DoBlogTag( recommendTags string, newTags string, ) string { @@ -1625,17 +1641,36 @@ func (_ tAdminEmail) DoBlogTag( revel.Unbind(args, "recommendTags", recommendTags) revel.Unbind(args, "newTags", newTags) - return revel.MainRouter.Reverse("AdminEmail.DoBlogTag", args).Url + return revel.MainRouter.Reverse("AdminSetting.DoBlogTag", args).Url } -func (_ tAdminEmail) Demo( +func (_ tAdminSetting) ShareNote( + registerSharedUserId string, + registerSharedNotebookPerms []int, + registerSharedNotePerms []int, + registerSharedNotebookIds []string, + registerSharedNoteIds []string, + registerCopyNoteIds []string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminEmail.Demo", args).Url + revel.Unbind(args, "registerSharedUserId", registerSharedUserId) + revel.Unbind(args, "registerSharedNotebookPerms", registerSharedNotebookPerms) + revel.Unbind(args, "registerSharedNotePerms", registerSharedNotePerms) + revel.Unbind(args, "registerSharedNotebookIds", registerSharedNotebookIds) + revel.Unbind(args, "registerSharedNoteIds", registerSharedNoteIds) + revel.Unbind(args, "registerCopyNoteIds", registerCopyNoteIds) + return revel.MainRouter.Reverse("AdminSetting.ShareNote", args).Url } -func (_ tAdminEmail) DoDemo( +func (_ tAdminSetting) Demo( + ) string { + args := make(map[string]string) + + return revel.MainRouter.Reverse("AdminSetting.Demo", args).Url +} + +func (_ tAdminSetting) DoDemo( demoUsername string, demoPassword string, ) string { @@ -1643,129 +1678,121 @@ func (_ tAdminEmail) DoDemo( revel.Unbind(args, "demoUsername", demoUsername) revel.Unbind(args, "demoPassword", demoPassword) - return revel.MainRouter.Reverse("AdminEmail.DoDemo", args).Url + return revel.MainRouter.Reverse("AdminSetting.DoDemo", args).Url +} + +func (_ tAdminSetting) ExportPdf( + path string, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "path", path) + return revel.MainRouter.Reverse("AdminSetting.ExportPdf", args).Url } -func (_ tAdminEmail) ToImage( +func (_ tAdminSetting) DoSiteUrl( + siteUrl string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminEmail.ToImage", args).Url + revel.Unbind(args, "siteUrl", siteUrl) + return revel.MainRouter.Reverse("AdminSetting.DoSiteUrl", args).Url } -func (_ tAdminEmail) DoToImage( - toImageBinPath string, +func (_ tAdminSetting) SubDomain( ) string { args := make(map[string]string) - revel.Unbind(args, "toImageBinPath", toImageBinPath) - return revel.MainRouter.Reverse("AdminEmail.DoToImage", args).Url + return revel.MainRouter.Reverse("AdminSetting.SubDomain", args).Url } -func (_ tAdminEmail) Set( - emailHost string, - emailPort string, - emailUsername string, - emailPassword string, +func (_ tAdminSetting) DoSubDomain( + noteSubDomain string, + blogSubDomain string, + leaSubDomain string, + blackSubDomains string, + allowCustomDomain string, + blackCustomDomains string, ) string { args := make(map[string]string) - revel.Unbind(args, "emailHost", emailHost) - revel.Unbind(args, "emailPort", emailPort) - revel.Unbind(args, "emailUsername", emailUsername) - revel.Unbind(args, "emailPassword", emailPassword) - return revel.MainRouter.Reverse("AdminEmail.Set", args).Url + revel.Unbind(args, "noteSubDomain", noteSubDomain) + revel.Unbind(args, "blogSubDomain", blogSubDomain) + revel.Unbind(args, "leaSubDomain", leaSubDomain) + revel.Unbind(args, "blackSubDomains", blackSubDomains) + revel.Unbind(args, "allowCustomDomain", allowCustomDomain) + revel.Unbind(args, "blackCustomDomains", blackCustomDomains) + return revel.MainRouter.Reverse("AdminSetting.DoSubDomain", args).Url } -func (_ tAdminEmail) Template( +func (_ tAdminSetting) OpenRegister( + openRegister string, ) string { args := make(map[string]string) - return revel.MainRouter.Reverse("AdminEmail.Template", args).Url + revel.Unbind(args, "openRegister", openRegister) + return revel.MainRouter.Reverse("AdminSetting.OpenRegister", args).Url } -func (_ tAdminEmail) SendEmailToEmails( - sendEmails string, - latestEmailSubject string, - latestEmailBody string, - verified bool, - saveAsOldEmail bool, +func (_ tAdminSetting) HomePage( + homePage string, ) string { args := make(map[string]string) - revel.Unbind(args, "sendEmails", sendEmails) - revel.Unbind(args, "latestEmailSubject", latestEmailSubject) - revel.Unbind(args, "latestEmailBody", latestEmailBody) - revel.Unbind(args, "verified", verified) - revel.Unbind(args, "saveAsOldEmail", saveAsOldEmail) - return revel.MainRouter.Reverse("AdminEmail.SendEmailToEmails", args).Url + revel.Unbind(args, "homePage", homePage) + return revel.MainRouter.Reverse("AdminSetting.HomePage", args).Url } -func (_ tAdminEmail) SendToUsers2( - emails string, - latestEmailSubject string, - latestEmailBody string, - verified bool, - saveAsOldEmail bool, +func (_ tAdminSetting) Mongodb( + mongodumpPath string, + mongorestorePath string, ) string { args := make(map[string]string) - revel.Unbind(args, "emails", emails) - revel.Unbind(args, "latestEmailSubject", latestEmailSubject) - revel.Unbind(args, "latestEmailBody", latestEmailBody) - revel.Unbind(args, "verified", verified) - revel.Unbind(args, "saveAsOldEmail", saveAsOldEmail) - return revel.MainRouter.Reverse("AdminEmail.SendToUsers2", args).Url + revel.Unbind(args, "mongodumpPath", mongodumpPath) + revel.Unbind(args, "mongorestorePath", mongorestorePath) + return revel.MainRouter.Reverse("AdminSetting.Mongodb", args).Url } -func (_ tAdminEmail) SendEmailDialog( - emails string, +func (_ tAdminSetting) UploadSize( + uploadImageSize float64, + uploadAvatarSize float64, + uploadBlogLogoSize float64, + uploadAttachSize float64, ) string { args := make(map[string]string) - revel.Unbind(args, "emails", emails) - return revel.MainRouter.Reverse("AdminEmail.SendEmailDialog", args).Url + revel.Unbind(args, "uploadImageSize", uploadImageSize) + revel.Unbind(args, "uploadAvatarSize", uploadAvatarSize) + revel.Unbind(args, "uploadBlogLogoSize", uploadBlogLogoSize) + revel.Unbind(args, "uploadAttachSize", uploadAttachSize) + return revel.MainRouter.Reverse("AdminSetting.UploadSize", args).Url } -func (_ tAdminEmail) SendToUsers( - userFilterEmail string, - userFilterWhiteList string, - userFilterBlackList string, - latestEmailSubject string, - latestEmailBody string, - verified bool, - saveAsOldEmail bool, + +type tAdminUpgrade struct {} +var AdminUpgrade tAdminUpgrade + + +func (_ tAdminUpgrade) UpgradeBlog( ) string { args := make(map[string]string) - revel.Unbind(args, "userFilterEmail", userFilterEmail) - revel.Unbind(args, "userFilterWhiteList", userFilterWhiteList) - revel.Unbind(args, "userFilterBlackList", userFilterBlackList) - revel.Unbind(args, "latestEmailSubject", latestEmailSubject) - revel.Unbind(args, "latestEmailBody", latestEmailBody) - revel.Unbind(args, "verified", verified) - revel.Unbind(args, "saveAsOldEmail", saveAsOldEmail) - return revel.MainRouter.Reverse("AdminEmail.SendToUsers", args).Url + return revel.MainRouter.Reverse("AdminUpgrade.UpgradeBlog", args).Url } -func (_ tAdminEmail) DeleteEmails( - ids string, +func (_ tAdminUpgrade) UpgradeBetaToBeta2( ) string { args := make(map[string]string) - revel.Unbind(args, "ids", ids) - return revel.MainRouter.Reverse("AdminEmail.DeleteEmails", args).Url + return revel.MainRouter.Reverse("AdminUpgrade.UpgradeBetaToBeta2", args).Url } -func (_ tAdminEmail) List( - sorter string, - keywords string, +func (_ tAdminUpgrade) UpgradeBeta3ToBeta4( ) string { args := make(map[string]string) - revel.Unbind(args, "sorter", sorter) - revel.Unbind(args, "keywords", keywords) - return revel.MainRouter.Reverse("AdminEmail.List", args).Url + return revel.MainRouter.Reverse("AdminUpgrade.UpgradeBeta3ToBeta4", args).Url } @@ -1825,30 +1852,67 @@ func (_ tAdminUser) DoResetPwd( } -type tAdminBlog struct {} -var AdminBlog tAdminBlog +type tApiNotebook struct {} +var ApiNotebook tApiNotebook -func (_ tAdminBlog) Index( - sorter string, - keywords string, +func (_ tApiNotebook) GetSyncNotebooks( + afterUsn int, + maxEntry int, ) string { args := make(map[string]string) - revel.Unbind(args, "sorter", sorter) - revel.Unbind(args, "keywords", keywords) - return revel.MainRouter.Reverse("AdminBlog.Index", args).Url + revel.Unbind(args, "afterUsn", afterUsn) + revel.Unbind(args, "maxEntry", maxEntry) + return revel.MainRouter.Reverse("ApiNotebook.GetSyncNotebooks", args).Url } -func (_ tAdminBlog) SetRecommend( - noteId string, - recommend bool, +func (_ tApiNotebook) GetNotebooks( ) string { args := make(map[string]string) - revel.Unbind(args, "noteId", noteId) - revel.Unbind(args, "recommend", recommend) - return revel.MainRouter.Reverse("AdminBlog.SetRecommend", args).Url + return revel.MainRouter.Reverse("ApiNotebook.GetNotebooks", args).Url +} + +func (_ tApiNotebook) AddNotebook( + title string, + parentNotebookId string, + seq int, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "title", title) + revel.Unbind(args, "parentNotebookId", parentNotebookId) + revel.Unbind(args, "seq", seq) + return revel.MainRouter.Reverse("ApiNotebook.AddNotebook", args).Url +} + +func (_ tApiNotebook) UpdateNotebook( + notebookId string, + title string, + parentNotebookId string, + seq int, + usn int, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "notebookId", notebookId) + revel.Unbind(args, "title", title) + revel.Unbind(args, "parentNotebookId", parentNotebookId) + revel.Unbind(args, "seq", seq) + revel.Unbind(args, "usn", usn) + return revel.MainRouter.Reverse("ApiNotebook.UpdateNotebook", args).Url +} + +func (_ tApiNotebook) DeleteNotebook( + notebookId string, + usn int, + ) string { + args := make(map[string]string) + + revel.Unbind(args, "notebookId", notebookId) + revel.Unbind(args, "usn", usn) + return revel.MainRouter.Reverse("ApiNotebook.DeleteNotebook", args).Url } @@ -2097,70 +2161,6 @@ func (_ tApiFile) GetAllAttachs( } -type tApiNotebook struct {} -var ApiNotebook tApiNotebook - - -func (_ tApiNotebook) GetSyncNotebooks( - afterUsn int, - maxEntry int, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "afterUsn", afterUsn) - revel.Unbind(args, "maxEntry", maxEntry) - return revel.MainRouter.Reverse("ApiNotebook.GetSyncNotebooks", args).Url -} - -func (_ tApiNotebook) GetNotebooks( - ) string { - args := make(map[string]string) - - return revel.MainRouter.Reverse("ApiNotebook.GetNotebooks", args).Url -} - -func (_ tApiNotebook) AddNotebook( - title string, - parentNotebookId string, - seq int, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "title", title) - revel.Unbind(args, "parentNotebookId", parentNotebookId) - revel.Unbind(args, "seq", seq) - return revel.MainRouter.Reverse("ApiNotebook.AddNotebook", args).Url -} - -func (_ tApiNotebook) UpdateNotebook( - notebookId string, - title string, - parentNotebookId string, - seq int, - usn int, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "notebookId", notebookId) - revel.Unbind(args, "title", title) - revel.Unbind(args, "parentNotebookId", parentNotebookId) - revel.Unbind(args, "seq", seq) - revel.Unbind(args, "usn", usn) - return revel.MainRouter.Reverse("ApiNotebook.UpdateNotebook", args).Url -} - -func (_ tApiNotebook) DeleteNotebook( - notebookId string, - usn int, - ) string { - args := make(map[string]string) - - revel.Unbind(args, "notebookId", notebookId) - revel.Unbind(args, "usn", usn) - return revel.MainRouter.Reverse("ApiNotebook.DeleteNotebook", args).Url -} - - type tMemberBlog struct {} var MemberBlog tMemberBlog diff --git a/src/github.com/leanote/leanote/app/tmp/main.go b/src/github.com/leanote/leanote/app/tmp/main.go index 9d9719d..377b4ea 100644 --- a/src/github.com/leanote/leanote/app/tmp/main.go +++ b/src/github.com/leanote/leanote/app/tmp/main.go @@ -79,485 +79,492 @@ func main() { }) - revel.RegisterController((*controllers.Notebook)(nil), + revel.RegisterController((*controllers.Blog)(nil), []*revel.MethodType{ &revel.MethodType{ - Name: "Index", + Name: "E", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "notebook", Type: reflect.TypeOf((*info.Notebook)(nil)) }, - &revel.MethodArg{Name: "i", Type: reflect.TypeOf((*int)(nil)) }, - &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "GetNotebooks", + Name: "Tags", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DeleteNotebook", + Name: "Tag", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "AddNotebook", + Name: "Archives", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "parentNotebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "cateId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "month", Type: reflect.TypeOf((*int)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpdateNotebookTitle", + Name: "Cate", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DragNotebooks", + Name: "Index", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "data", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "SetNotebook2Blog", + Name: "Post", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "isBlog", Type: reflect.TypeOf((*bool)(nil)) }, + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, - - }) - - revel.RegisterController((*controllers.Tag)(nil), - []*revel.MethodType{ &revel.MethodType{ - Name: "UpdateTag", + Name: "Single", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "singleId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DeleteTag", + Name: "Search", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "keywords", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, - - }) - - revel.RegisterController((*controllers.Album)(nil), - []*revel.MethodType{ &revel.MethodType{ - Name: "Index", + Name: "GetPostStat", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "GetAlbums", + Name: "GetLikes", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DeleteAlbum", + Name: "GetLikesAndComments", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "albumId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "AddAlbum", + Name: "IncReadNum", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpdateAlbum", + Name: "LikePost", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "albumId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, - - }) - - revel.RegisterController((*controllers.Blog)(nil), - []*revel.MethodType{ &revel.MethodType{ - Name: "E", + Name: "GetComments", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Tags", + Name: "DeleteComment", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "commentId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Tag", + Name: "CommentPost", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "content", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "toCommentId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Archives", + Name: "LikeComment", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "cateId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "year", Type: reflect.TypeOf((*int)(nil)) }, - &revel.MethodArg{Name: "month", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "commentId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Cate", + Name: "ListCateLatest", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, + + }) + + revel.RegisterController((*controllers.File)(nil), + []*revel.MethodType{ &revel.MethodType{ - Name: "Index", + Name: "UploadBlogLogo", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Post", + Name: "PasteImage", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Single", + Name: "UploadAvatar", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "singleId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Search", + Name: "UploadImageLeaui", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userIdOrEmail", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "keywords", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "albumId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "GetPostStat", + Name: "GetImages", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "albumId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "key", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "GetLikes", + Name: "UpdateImageTitle", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "fileId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "GetLikesAndComments", + Name: "DeleteImage", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "fileId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "IncReadNum", + Name: "OutputImage", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "fileId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "LikePost", + Name: "CopyImage", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "fileId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "toUserId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "GetComments", + Name: "CopyHttpImage", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "src", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, + + }) + + revel.RegisterController((*controllers.Index)(nil), + []*revel.MethodType{ &revel.MethodType{ - Name: "DeleteComment", + Name: "Default", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "commentId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "CommentPost", + Name: "Index", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "content", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "toCommentId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "LikeComment", + Name: "Suggestion", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "commentId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "addr", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "suggestion", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, + + }) + + revel.RegisterController((*controllers.Notebook)(nil), + []*revel.MethodType{ &revel.MethodType{ - Name: "ListCateLatest", + Name: "Index", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "callback", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "notebook", Type: reflect.TypeOf((*info.Notebook)(nil)) }, + &revel.MethodArg{Name: "i", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, - - }) - - revel.RegisterController((*controllers.Auth)(nil), - []*revel.MethodType{ &revel.MethodType{ - Name: "Login", + Name: "GetNotebooks", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "from", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DoLogin", + Name: "DeleteNotebook", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "captcha", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Logout", + Name: "AddNotebook", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "parentNotebookId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Demo", + Name: "UpdateNotebookTitle", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "Register", + Name: "DragNotebooks", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "from", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "iu", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "data", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DoRegister", + Name: "SetNotebook2Blog", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "iu", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "isBlog", Type: reflect.TypeOf((*bool)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, + + }) + + revel.RegisterController((*controllers.User)(nil), + []*revel.MethodType{ &revel.MethodType{ - Name: "FindPassword", + Name: "Account", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "tab", Type: reflect.TypeOf((*int)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DoFindPassword", + Name: "UpdateUsername", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "FindPassword2", + Name: "UpdatePwd", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "oldPwd", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "FindPasswordUpdate", + Name: "UpdateTheme", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "theme", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, - - }) - - revel.RegisterController((*controllers.File)(nil), - []*revel.MethodType{ &revel.MethodType{ - Name: "UploadBlogLogo", + Name: "SendRegisterEmail", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "content", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "toEmail", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "PasteImage", + Name: "ReSendActiveEmail", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UploadAvatar", + Name: "UpdateEmail", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UploadImageLeaui", + Name: "ActiveEmail", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "albumId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "GetImages", + Name: "UpdateColumnWidth", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "albumId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "key", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "page", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "notebookWidth", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "noteListWidth", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "mdEditorWidth", Type: reflect.TypeOf((*int)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpdateImageTitle", + Name: "UpdateLeftIsMin", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "fileId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "leftIsMin", Type: reflect.TypeOf((*bool)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + + }) + + revel.RegisterController((*controllers.Attach)(nil), + []*revel.MethodType{ + &revel.MethodType{ + Name: "UploadAttach", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DeleteImage", + Name: "DeleteAttach", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "fileId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "attachId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "OutputImage", + Name: "GetAttachs", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "fileId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "CopyImage", + Name: "Download", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "userId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "fileId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "toUserId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "attachId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "CopyHttpImage", + Name: "DownloadAll", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "src", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, @@ -565,12 +572,20 @@ func main() { }) - revel.RegisterController((*controllers.NoteContentHistory)(nil), + revel.RegisterController((*controllers.Tag)(nil), []*revel.MethodType{ &revel.MethodType{ - Name: "ListHistories", + Name: "UpdateTag", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "DeleteTag", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "tag", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, @@ -578,130 +593,157 @@ func main() { }) - revel.RegisterController((*controllers.User)(nil), + revel.RegisterController((*controllers.Album)(nil), []*revel.MethodType{ &revel.MethodType{ - Name: "Account", + Name: "Index", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "tab", Type: reflect.TypeOf((*int)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpdateUsername", + Name: "GetAlbums", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "username", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpdatePwd", + Name: "DeleteAlbum", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "oldPwd", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "albumId", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "AddAlbum", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "UpdateAlbum", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "albumId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "name", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, + + }) + + revel.RegisterController((*controllers.Auth)(nil), + []*revel.MethodType{ &revel.MethodType{ - Name: "UpdateTheme", + Name: "Login", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "theme", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "from", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "SendRegisterEmail", + Name: "DoLogin", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "content", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "toEmail", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "captcha", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "ReSendActiveEmail", + Name: "Logout", Args: []*revel.MethodArg{ }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpdateEmail", + Name: "Demo", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "ActiveEmail", + Name: "Register", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "from", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "iu", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpdateColumnWidth", + Name: "DoRegister", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "notebookWidth", Type: reflect.TypeOf((*int)(nil)) }, - &revel.MethodArg{Name: "noteListWidth", Type: reflect.TypeOf((*int)(nil)) }, - &revel.MethodArg{Name: "mdEditorWidth", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "iu", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpdateLeftIsMin", + Name: "FindPassword", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "leftIsMin", Type: reflect.TypeOf((*bool)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, - - }) - - revel.RegisterController((*controllers.Attach)(nil), - []*revel.MethodType{ &revel.MethodType{ - Name: "UploadAttach", + Name: "DoFindPassword", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "email", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "DeleteAttach", + Name: "FindPassword2", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "attachId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "GetAttachs", + Name: "FindPasswordUpdate", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "token", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "pwd", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, + + }) + + revel.RegisterController((*controllers.Captcha)(nil), + []*revel.MethodType{ &revel.MethodType{ - Name: "Download", + Name: "Get", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "attachId", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ + 43: []string{ + }, }, }, + + }) + + revel.RegisterController((*controllers.NoteContentHistory)(nil), + []*revel.MethodType{ &revel.MethodType{ - Name: "DownloadAll", + Name: "ListHistories", Args: []*revel.MethodArg{ &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, }, @@ -852,48 +894,6 @@ func main() { }) - revel.RegisterController((*controllers.Captcha)(nil), - []*revel.MethodType{ - &revel.MethodType{ - Name: "Get", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - 43: []string{ - }, - }, - }, - - }) - - revel.RegisterController((*controllers.Index)(nil), - []*revel.MethodType{ - &revel.MethodType{ - Name: "Default", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "Index", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "Suggestion", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "addr", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "suggestion", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - - }) - revel.RegisterController((*controllers.Share)(nil), []*revel.MethodType{ &revel.MethodType{ @@ -1168,154 +1168,22 @@ func main() { }) - revel.RegisterController((*admin.AdminSetting)(nil), - []*revel.MethodType{ - &revel.MethodType{ - Name: "Email", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "Blog", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "DoBlogTag", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "recommendTags", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "newTags", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "ShareNote", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "registerSharedUserId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "registerSharedNotebookPerms", Type: reflect.TypeOf((*[]int)(nil)) }, - &revel.MethodArg{Name: "registerSharedNotePerms", Type: reflect.TypeOf((*[]int)(nil)) }, - &revel.MethodArg{Name: "registerSharedNotebookIds", Type: reflect.TypeOf((*[]string)(nil)) }, - &revel.MethodArg{Name: "registerSharedNoteIds", Type: reflect.TypeOf((*[]string)(nil)) }, - &revel.MethodArg{Name: "registerCopyNoteIds", Type: reflect.TypeOf((*[]string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "Demo", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "DoDemo", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "demoUsername", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "demoPassword", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "ExportPdf", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "path", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "DoSiteUrl", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "siteUrl", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "SubDomain", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "DoSubDomain", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteSubDomain", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "blogSubDomain", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "leaSubDomain", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "blackSubDomains", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "allowCustomDomain", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "blackCustomDomains", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "OpenRegister", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "openRegister", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "HomePage", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "homePage", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "Mongodb", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "mongodumpPath", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "mongorestorePath", Type: reflect.TypeOf((*string)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "UploadSize", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "uploadImageSize", Type: reflect.TypeOf((*float64)(nil)) }, - &revel.MethodArg{Name: "uploadAvatarSize", Type: reflect.TypeOf((*float64)(nil)) }, - &revel.MethodArg{Name: "uploadBlogLogoSize", Type: reflect.TypeOf((*float64)(nil)) }, - &revel.MethodArg{Name: "uploadAttachSize", Type: reflect.TypeOf((*float64)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - - }) - - revel.RegisterController((*admin.AdminUpgrade)(nil), + revel.RegisterController((*admin.AdminBlog)(nil), []*revel.MethodType{ &revel.MethodType{ - Name: "UpgradeBlog", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "UpgradeBetaToBeta2", + Name: "Index", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "sorter", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "keywords", Type: reflect.TypeOf((*string)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "UpgradeBeta3ToBeta4", + Name: "SetRecommend", Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "recommend", Type: reflect.TypeOf((*bool)(nil)) }, }, RenderArgNames: map[int][]string{ }, @@ -1543,6 +1411,161 @@ func main() { }) + revel.RegisterController((*admin.AdminSetting)(nil), + []*revel.MethodType{ + &revel.MethodType{ + Name: "Email", + Args: []*revel.MethodArg{ + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "Blog", + Args: []*revel.MethodArg{ + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "DoBlogTag", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "recommendTags", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "newTags", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "ShareNote", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "registerSharedUserId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "registerSharedNotebookPerms", Type: reflect.TypeOf((*[]int)(nil)) }, + &revel.MethodArg{Name: "registerSharedNotePerms", Type: reflect.TypeOf((*[]int)(nil)) }, + &revel.MethodArg{Name: "registerSharedNotebookIds", Type: reflect.TypeOf((*[]string)(nil)) }, + &revel.MethodArg{Name: "registerSharedNoteIds", Type: reflect.TypeOf((*[]string)(nil)) }, + &revel.MethodArg{Name: "registerCopyNoteIds", Type: reflect.TypeOf((*[]string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "Demo", + Args: []*revel.MethodArg{ + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "DoDemo", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "demoUsername", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "demoPassword", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "ExportPdf", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "path", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "DoSiteUrl", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "siteUrl", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "SubDomain", + Args: []*revel.MethodArg{ + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "DoSubDomain", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "noteSubDomain", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "blogSubDomain", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "leaSubDomain", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "blackSubDomains", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "allowCustomDomain", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "blackCustomDomains", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "OpenRegister", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "openRegister", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "HomePage", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "homePage", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "Mongodb", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "mongodumpPath", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "mongorestorePath", Type: reflect.TypeOf((*string)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "UploadSize", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "uploadImageSize", Type: reflect.TypeOf((*float64)(nil)) }, + &revel.MethodArg{Name: "uploadAvatarSize", Type: reflect.TypeOf((*float64)(nil)) }, + &revel.MethodArg{Name: "uploadBlogLogoSize", Type: reflect.TypeOf((*float64)(nil)) }, + &revel.MethodArg{Name: "uploadAttachSize", Type: reflect.TypeOf((*float64)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + + }) + + revel.RegisterController((*admin.AdminUpgrade)(nil), + []*revel.MethodType{ + &revel.MethodType{ + Name: "UpgradeBlog", + Args: []*revel.MethodArg{ + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "UpgradeBetaToBeta2", + Args: []*revel.MethodArg{ + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "UpgradeBeta3ToBeta4", + Args: []*revel.MethodArg{ + }, + RenderArgNames: map[int][]string{ + }, + }, + + }) + revel.RegisterController((*admin.AdminUser)(nil), []*revel.MethodType{ &revel.MethodType{ @@ -1591,22 +1614,51 @@ func main() { }) - revel.RegisterController((*admin.AdminBlog)(nil), + revel.RegisterController((*api.ApiNotebook)(nil), []*revel.MethodType{ &revel.MethodType{ - Name: "Index", + Name: "GetSyncNotebooks", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "sorter", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "keywords", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "afterUsn", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "maxEntry", Type: reflect.TypeOf((*int)(nil)) }, }, RenderArgNames: map[int][]string{ }, }, &revel.MethodType{ - Name: "SetRecommend", + Name: "GetNotebooks", Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "noteId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "recommend", Type: reflect.TypeOf((*bool)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "AddNotebook", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "parentNotebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "seq", Type: reflect.TypeOf((*int)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "UpdateNotebook", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "parentNotebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "seq", Type: reflect.TypeOf((*int)(nil)) }, + &revel.MethodArg{Name: "usn", Type: reflect.TypeOf((*int)(nil)) }, + }, + RenderArgNames: map[int][]string{ + }, + }, + &revel.MethodType{ + Name: "DeleteNotebook", + Args: []*revel.MethodArg{ + &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, + &revel.MethodArg{Name: "usn", Type: reflect.TypeOf((*int)(nil)) }, }, RenderArgNames: map[int][]string{ }, @@ -1833,58 +1885,6 @@ func main() { }) - revel.RegisterController((*api.ApiNotebook)(nil), - []*revel.MethodType{ - &revel.MethodType{ - Name: "GetSyncNotebooks", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "afterUsn", Type: reflect.TypeOf((*int)(nil)) }, - &revel.MethodArg{Name: "maxEntry", Type: reflect.TypeOf((*int)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "GetNotebooks", - Args: []*revel.MethodArg{ - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "AddNotebook", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "parentNotebookId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "seq", Type: reflect.TypeOf((*int)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "UpdateNotebook", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "title", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "parentNotebookId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "seq", Type: reflect.TypeOf((*int)(nil)) }, - &revel.MethodArg{Name: "usn", Type: reflect.TypeOf((*int)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - &revel.MethodType{ - Name: "DeleteNotebook", - Args: []*revel.MethodArg{ - &revel.MethodArg{Name: "notebookId", Type: reflect.TypeOf((*string)(nil)) }, - &revel.MethodArg{Name: "usn", Type: reflect.TypeOf((*int)(nil)) }, - }, - RenderArgNames: map[int][]string{ - }, - }, - - }) - revel.RegisterController((*member.MemberBlog)(nil), []*revel.MethodType{ &revel.MethodType{