Documentation ¶
Index ¶
- type IdleNotifier
- type NewsLetter
- type Notifier
- func (n *Notifier) AccountReseted(em string, token []byte, err error) error
- func (n *Notifier) AlumniUpdated(from schema.User, a schema.Alumni, err error)
- func (n *Notifier) CompanyUpdated(from schema.User, c schema.Company, err error)
- func (n *Notifier) InviteRoot(from schema.User, u schema.User, token string, err error) error
- func (n *Notifier) InviteStudent(from schema.User, i schema.Internship, token string, err error) error
- func (n *Notifier) InviteTeacher(from schema.User, u schema.User, token string, err error) error
- func (n *Notifier) Login(s schema.Session, err error)
- func (n *Notifier) Logout(s schema.User, err error)
- func (n *Notifier) NewStudent(from schema.User, st schema.Student, err error)
- func (n *Notifier) NewTutor(from schema.User, stu string, old, now schema.User, err error) error
- func (n *Notifier) PasswordChanged(em string, err error) error
- func (n *Notifier) PrivilegeUpdated(from schema.User, em string, p schema.Role, err error) error
- func (n *Notifier) ProfileEdited(from schema.User, p schema.Person, err error)
- func (n *Notifier) ReportDeadlineUpdated(from schema.User, stu, kind string, d time.Time, err error) error
- func (n *Notifier) ReportIdleAccount(u schema.User)
- func (n *Notifier) ReportPrivacyUpdated(from schema.User, stu, kind string, priv bool, err error) error
- func (n *Notifier) ReportReviewed(from, student, tutor schema.User, kind string, err error) error
- func (n *Notifier) ReportUploaded(student schema.User, tutor schema.User, kind string, err error) error
- func (n *Notifier) RmAccount(from schema.User, em string, err error) error
- func (n *Notifier) SkipStudent(from schema.User, em string, skip bool, err error)
- func (n *Notifier) SupervisorUpdated(from schema.User, sup schema.Person, err error)
- func (n *Notifier) SurveyRequest(sup schema.Person, tutor schema.User, student schema.Student, ...) error
- func (n *Notifier) SurveyReseted(from schema.User, student, kind string, err error) error
- func (n *Notifier) SurveyUploaded(student, tutor schema.User, supervisor schema.Person, kind string, err error) error
- func (n *Notifier) TutorNewsLetter(tut schema.User, lates []schema.StudentReports)
- type SupervisorLetter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IdleNotifier ¶
type IdleNotifier interface { //ReportIdleAccount report to a user that he never connected ReportIdleAccount(u schema.User) }
IdleNotifier defines how to report a user that never connected
type NewsLetter ¶
type NewsLetter interface { //TutorNewsLetter notifies a tutor about some late reports or reviews TutorNewsLetter(tut schema.User, reminders []schema.StudentReports) }
NewsLetter describes the news to send to users
type Notifier ¶
type Notifier struct {
// contains filtered or unexported fields
}
Notifier just embed notification mechanisms
func (*Notifier) AccountReseted ¶
AccountReseted logs an account reset and send the mail to the targeted user
func (*Notifier) AlumniUpdated ¶
AlumniUpdated logs the change
func (*Notifier) CompanyUpdated ¶
CompanyUpdated logs the change
func (*Notifier) InviteRoot ¶
InviteRoot calls invite
func (*Notifier) InviteStudent ¶
func (n *Notifier) InviteStudent(from schema.User, i schema.Internship, token string, err error) error
InviteStudent invite() and mail the tutor in case of success
func (*Notifier) InviteTeacher ¶
InviteTeacher calls invite()
func (*Notifier) NewStudent ¶
NewStudent logs the student addition
func (*Notifier) NewTutor ¶
NewTutor logs the change and mail the old, the new tutor and the emitter
func (*Notifier) PasswordChanged ¶
PasswordChanged logs the event and notify the target
func (*Notifier) PrivilegeUpdated ¶
PrivilegeUpdated logs the action and notify the target
func (*Notifier) ProfileEdited ¶
ProfileEdited logs the change
func (*Notifier) ReportDeadlineUpdated ¶
func (n *Notifier) ReportDeadlineUpdated(from schema.User, stu, kind string, d time.Time, err error) error
ReportDeadlineUpdated logs a new deadline for a report
func (*Notifier) ReportIdleAccount ¶
ReportIdleAccount send a mail to the user to remind him to connect
func (*Notifier) ReportPrivacyUpdated ¶
func (n *Notifier) ReportPrivacyUpdated(from schema.User, stu, kind string, priv bool, err error) error
ReportPrivacyUpdated logs a privacy status change for a given report
func (*Notifier) ReportReviewed ¶
ReportReviewed logs the action and notifies the student (tutor in cc.) by mail
func (*Notifier) ReportUploaded ¶
func (n *Notifier) ReportUploaded(student schema.User, tutor schema.User, kind string, err error) error
ReportUploaded logs the upload and notify the student with the tutor in cc.
func (*Notifier) SkipStudent ¶
SkipStudent logs the change
func (*Notifier) SupervisorUpdated ¶
SupervisorUpdated logs the change
func (*Notifier) SurveyRequest ¶
func (n *Notifier) SurveyRequest(sup schema.Person, tutor schema.User, student schema.Student, survey schema.SurveyHeader, err error) error
SurveyRequest sends the survey request to the supervisor
func (*Notifier) SurveyReseted ¶
SurveyReseted logs the action
func (*Notifier) SurveyUploaded ¶
func (n *Notifier) SurveyUploaded(student, tutor schema.User, supervisor schema.Person, kind string, err error) error
SurveyUploaded logs the action and notify the tutor
func (*Notifier) TutorNewsLetter ¶
func (n *Notifier) TutorNewsLetter(tut schema.User, lates []schema.StudentReports)
TutorNewsLetter send to a tutor a mail about the missing reports or reviews