Documentation ¶
Overview ¶
Neat Note. A notes sharing platform for university students. Copyright (C) 2020 Humaid AlQassimi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Neat Note. A notes sharing platform for university students. Copyright (C) 2020 Humaid AlQassimi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Neat Note. A notes sharing platform for university students. Copyright (C) 2020 Humaid AlQassimi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Neat Note. A notes sharing platform for university students. Copyright (C) 2020 Humaid AlQassimi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Neat Note. A notes sharing platform for university students. Copyright (C) 2020 Humaid AlQassimi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Neat Note. A notes sharing platform for university students. Copyright (C) 2020 Humaid AlQassimi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Neat Note. A notes sharing platform for university students. Copyright (C) 2020 Humaid AlQassimi
This program is free software: you can redistribute it and/or modify it under the terms of the GNU Affero General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version.
This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details.
You should have received a copy of the GNU Affero General Public License along with this program. If not, see <https://www.gnu.org/licenses/>.
Index ¶
- Constants
- func AdminAddCourseHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func AdminHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func AdminPostAddCourseHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func AdminViewUserHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func CancelHandler(ctx *macaron.Context, sess session.Store)
- func ContextInit() macaron.Handler
- func CourseExists(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func CourseHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func CourseUnlocked(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func CreatePostHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func DeleteCommentHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func DeletePostHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func EditCommentHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func EditPostHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func GuidelinesHandler(ctx *macaron.Context, sess session.Store)
- func HomepageHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func LitePostHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func LoginHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func LogoutHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func PostAdminHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func PostCommentPostHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func PostCreatePostHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func PostDataHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func PostEditCommentHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func PostEditPostHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func PostExists(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func PostLoginHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func PostPageHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func PostProfileHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func PostUnlocked(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func PostVerifyHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func ProfileHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func QnAHandler(ctx *macaron.Context, sess session.Store)
- func RequireAdmin(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func RequireLogin(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func RevealPosterHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
- func UpvotePostHandler(ctx *macaron.Context, sess session.Store, f *session.Flash)
- func VerifyHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
Constants ¶
const ( // LoggedOut is when a user is logged out. LoggedOut = iota // Verification is when a user is in the verification process. Verification // LoggedIn is when the user is verified and logged in. LoggedIn )
Variables ¶
This section is empty.
Functions ¶
func AdminAddCourseHandler ¶
AdminAddCourseHandler response for adding a new course.
func AdminHandler ¶ added in v0.3.1
AdminHandler response for the admin dashboard.
func AdminPostAddCourseHandler ¶
AdminPostAddCourseHandler post response for adding a new course.
func AdminViewUserHandler ¶ added in v0.3.1
AdminViewUserHandler response for viewing a user's information.
func CancelHandler ¶
CancelHandler post response for canceling verification.
func ContextInit ¶
ContextInit is a middleware which initialises some global variables, and verifies the login status.
func CourseExists ¶
CourseExists is a per-route middleware which checks if the course exists in the database, otherwise display an error.
func CourseHandler ¶
CourseHandler response for a course page.
func CourseUnlocked ¶
CourseUnlocked is a per-route middleware which checks if the course is unlocked, otherwise display an error.
func CreatePostHandler ¶
CreatePostHandler response for creating a new post.
func DeleteCommentHandler ¶
DeleteCommentHandler response for deleting a comment.
func DeletePostHandler ¶
DeletePostHandler response for deleting a post.
func EditCommentHandler ¶
EditCommentHandler response for a post page.
func EditPostHandler ¶
EditPostHandler response for a post page.
func GuidelinesHandler ¶
GuidelinesHandler response for the Guidelines page.
func HomepageHandler ¶
HomepageHandler response for the home page.
func LitePostHandler ¶ added in v0.3.1
LitePostHandler response for a light post page.
func LoginHandler ¶
LoginHandler response for logging in page.
func LogoutHandler ¶
LogoutHandler response for logging out.
func PostAdminHandler ¶ added in v0.3.1
PostAdminHandler post response for admin dashboard.
func PostCommentPostHandler ¶
PostCommentPostHandler post response for posting a comment to a post.
func PostCreatePostHandler ¶
PostCreatePostHandler post response for creating a new post.
func PostDataHandler ¶
PostDataHandler post response for requesting data (GDPR compliance).
func PostEditCommentHandler ¶
func PostEditCommentHandler(ctx *macaron.Context, x csrf.CSRF, sess session.Store, f *session.Flash)
PostEditCommentHandler post response for editing a post.
func PostEditPostHandler ¶
PostEditPostHandler post response for editing a post.
func PostExists ¶
PostExists is a per-route middleware which checks if the course and post exists in the database, otherwise display an error.
func PostLoginHandler ¶
PostLoginHandler post response for login page.
func PostPageHandler ¶
PostPageHandler response for a post page.
func PostProfileHandler ¶
PostProfileHandler post response for the profile page.
func PostUnlocked ¶
PostUnlocked is a per-route middleware which checks if the course and post is unlocked, otherwise display an error.
func PostVerifyHandler ¶
PostVerifyHandler post reponse for verification.
func ProfileHandler ¶
ProfileHandler response for the profile page.
func QnAHandler ¶
QnAHandler response for the Questions and Answers page.
func RequireAdmin ¶
RequireAdmin is a per-route middleware which checks if the user is an admin, otherwise display an error.
func RequireLogin ¶
RequireLogin is a per-route middleware which checks if the user is logged in, othwerise redirect to the login page and display an error.
func RevealPosterHandler ¶
ReveaPosterHandler response for revealing the user.
func UpvotePostHandler ¶
UpvotePostHandler post response for posting a comment to a post.
Types ¶
This section is empty.