Documentation
¶
Overview ¶
Package routecases holds the request paths that pin manifest.MatchRoute to the pages handler: the tests of web check what the handler serves at each path, and the tests of manifest check that MatchRoute names the same page.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Cases = []Case{ {Folders: notes, Keys: notesKeys, Path: "/notes", Want: "/notes"}, {Folders: notes, Keys: notesKeys, Path: "/notes/12", Want: "/notes/{id}"}, {Folders: notes, Keys: notesKeys, Path: "/notes/%31%32", Want: "/notes/{id}"}, {Folders: notes, Keys: notesKeys, Path: "/notes/12/", Want: "/notes/{id}"}, {Folders: notes, Keys: notesKeys, Path: "/notes/abc"}, {Folders: notes, Keys: notesKeys, Path: "/notes/n_5"}, {Folders: notes, Keys: notesKeys, Path: "/notes/1%2F2"}, {Folders: notes, Keys: notesKeys, Path: "/notes//12"}, {Folders: notes, Keys: notesKeys, Path: "/notes/12/x"}, {Folders: tags, Keys: tagsKeys, Path: "/t/s_y", Want: "/t/{x}"}, {Folders: tags, Keys: tagsKeys, Path: "/t/s_x", Want: "/t/{x}"}, {Folders: tags, Keys: tagsKeys, Path: "/t/n_5", Want: "/t/{x}"}, {Folders: tags, Keys: tagsKeys, Path: "/t/x%2Fy"}, {Folders: tags, Keys: tagsKeys, Path: "/t"}, {Folders: ab, Keys: ab, Path: "/a/b", Want: "/a/b"}, {Folders: ab, Keys: ab, Path: "/a/b/", Want: "/a/b"}, {Folders: ab, Keys: ab, Path: "//a/b//", Want: "/a/b"}, {Folders: ab, Keys: ab, Path: "/a%2Fb", Want: "/a/b"}, {Folders: ab, Keys: ab, Path: "/a//b"}, {Folders: ab, Keys: ab, Path: "/A/b"}, {Folders: ab, Keys: ab, Path: "/a"}, {Folders: ab, Keys: ab, Path: "/"}, {Folders: users, Keys: usersKeys, Path: "/u/new", Want: "/u/new"}, {Folders: users, Keys: usersKeys, Path: "/u/bob", Want: "/u/{name}"}, {Folders: branch, Keys: branchKeys, Path: "/v/z/d", Want: "/v/{x}/d"}, {Folders: branch, Keys: branchKeys, Path: "/v/w/d"}, {Folders: []string{"/l", "/l/p"}, Keys: []string{"/l/p"}, Path: "/l"}, {Folders: []string{"/l", "/l/p"}, Keys: []string{"/l/p"}, Path: "/l/p", Want: "/l/p"}, {Folders: []string{"/m", "/m/n_id"}, Keys: []string{"/m/{id}"}, Path: "/m"}, {Folders: []string{"/m", "/m/n_id"}, Keys: []string{"/m/{id}"}, Path: "/m/7", Want: "/m/{id}"}, {Folders: []string{"/"}, Keys: []string{"/"}, Path: "/", Want: "/"}, {Folders: []string{"/", "/a"}, Keys: []string{"/", "/a"}, Path: "/a", Want: "/a"}, {Folders: []string{"/"}, Keys: []string{"/"}, Path: "/x"}, }
Cases are the paths every matcher of access keys must agree on with the pages handler.
Functions ¶
This section is empty.
Types ¶
type Case ¶
Case is one app and one request path. Folders are the app's page folders, such as /notes/n_id; Keys the access keys aicoded generate writes for them, such as /notes/{id}, where a folder without a key is a layout whose default page is its first page folder right below it that is not a parameter folder; Path the request target; and Want the key of the page the pages handler serves at Path, or "" when it answers 404 or a redirect.