Documentation ¶
Index ¶
- Constants
- func About(ctx *macaron.Context, dStorer *storage.DocumentStorer, log *log.Logger)
- func Account(ctx *macaron.Context, log *log.Logger, sess session.Store, ...)
- func Calendar(ctx *macaron.Context, log *log.Logger, sess session.Store)
- func Certificate(ctx *macaron.Context, sess session.Store, log *log.Logger)
- func Confirm(ctx *macaron.Context, uStorer *storage.UserStorer, sess session.Store)
- func Current(ctx *macaron.Context, log *log.Logger)
- func Day(ctx *macaron.Context, log *log.Logger, dStorer *storage.DocumentStorer, ...)
- func Home(ctx *macaron.Context, sess session.Store)
- func Login(ctx *macaron.Context, log *log.Logger, uStorer *storage.UserStorer, ...)
- func Logout(ctx *macaron.Context, uStorer *storage.UserStorer, sess session.Store)
- func Overview(ctx *macaron.Context, log *log.Logger, dStorer *storage.DocumentStorer)
- func Protect(ctx *macaron.Context, sess session.Store)
- func PublicReady(ctx *macaron.Context, dStorer *storage.DocumentStorer)
- func Register(ctx *macaron.Context, cpt *captcha.Captcha, log *log.Logger, ...)
- func RequireAdmin(ctx *macaron.Context, sess session.Store)
- func Restore(ctx *macaron.Context, log *log.Logger, uStorer *storage.UserStorer)
- func ToS(ctx *macaron.Context, dStorer *storage.DocumentStorer, log *log.Logger)
- func Upload(ctx *macaron.Context, log *log.Logger, dStorer *storage.DocumentStorer)
- type Name
Constants ¶
View Source
const ( ErrDB = "database_error" ErrUnexpected = "unexpected_error" ErrWrongCredentials = "wrong_credentials_error" ErrNotConfirmed = "user_not_confirmed" ErrUnequalPasswords = "passwords_unequal" ErrUserExists = "user_exists" ErrMail = "mail_error" ErrWrongGrade = "wrong_grade_error" ErrIllegalInput = "illegal_input_error" ErrFS = "filesystem_error" ErrIllegalDate = "illegal_date_error" ErrNotReady = "server_not_ready_error" ErrNoAssets = "no_assets_error" ErrUserNotFound = "user_not_found_error" ErrRelationExists = "relation_already_exists_error" ErrNoStudent = "this_is_a_teacher_error" ErrInvalidCaptcha = "invalid_captcha_error" ErrAdventNotOver = "advent_not_over_error" )
errors
View Source
const ( MessLoggedIn = "login_success" MessLoggedOut = "logged_out" MessConfirmMailSent = "confirm_mail_sent" MessRestoreMailSent = "restore_mail_sent" MessChangedPassword = "password_changed" MessUserAssigned = "user_assigned" MessUserConfirmed = "user_confirmed" MessUserUnconfirmed = "user_unconfirmed" MessUserRemoved = "user_removed" )
messages
Variables ¶
This section is empty.
Functions ¶
func Account ¶
func Account(ctx *macaron.Context, log *log.Logger, sess session.Store, rStorer *storage.RelationStorer, uStorer *storage.UserStorer)
Account handles the route "/account"
func Certificate ¶
Certificate handles the route "/certificate"
func Confirm ¶
Confirm handles the route "/confirm". The route is used by the confirmation link sent via mail.
func Day ¶
func Day(ctx *macaron.Context, log *log.Logger, dStorer *storage.DocumentStorer, sess session.Store, uStorer *storage.UserStorer)
Day handles the routes "/day/[some_day]"
func Protect ¶
Protect ensures the routes "/logout", "/account", "/certificate", "/calendar" and "/day" can only be accessed when logged in
func PublicReady ¶
func PublicReady(ctx *macaron.Context, dStorer *storage.DocumentStorer)
PublicReady ensures the routes "/calendar" and "/day" can only be accessed, when all required documents are available
func Register ¶
func Register(ctx *macaron.Context, cpt *captcha.Captcha, log *log.Logger, uStorer *storage.UserStorer, sess session.Store)
Register handles the route "/register"
func RequireAdmin ¶
RequireAdmin ensures the routes "/upload" and "/overview" can only be accessed by the admin
Types ¶
Click to show internal directories.
Click to hide internal directories.