notifier

package
v0.0.0-...-1b8d80d Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 7, 2022 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

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 New

func New(m mail.Mailer, cfg config.Config) *Notifier

New creates a new notifier

func (*Notifier) AccountReseted

func (n *Notifier) AccountReseted(em string, token []byte, err error) error

AccountReseted logs an account reset and send the mail to the targeted user

func (*Notifier) AlumniUpdated

func (n *Notifier) AlumniUpdated(from schema.User, a schema.Alumni, err error)

AlumniUpdated logs the change

func (*Notifier) CompanyUpdated

func (n *Notifier) CompanyUpdated(from schema.User, c schema.Company, err error)

CompanyUpdated logs the change

func (*Notifier) InviteRoot

func (n *Notifier) InviteRoot(from schema.User, u schema.User, token string, err error) error

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

func (n *Notifier) InviteTeacher(from schema.User, u schema.User, token string, err error) error

InviteTeacher calls invite()

func (*Notifier) Login

func (n *Notifier) Login(s schema.Session, err error)

Login logs the login

func (*Notifier) Logout

func (n *Notifier) Logout(s schema.User, err error)

Logout logs the logout

func (*Notifier) NewStudent

func (n *Notifier) NewStudent(from schema.User, st schema.Student, err error)

NewStudent logs the student addition

func (*Notifier) NewTutor

func (n *Notifier) NewTutor(from schema.User, stu string, old, now schema.User, err error) error

NewTutor logs the change and mail the old, the new tutor and the emitter

func (*Notifier) PasswordChanged

func (n *Notifier) PasswordChanged(em string, err error) error

PasswordChanged logs the event and notify the target

func (*Notifier) PrivilegeUpdated

func (n *Notifier) PrivilegeUpdated(from schema.User, em string, p schema.Role, err error) error

PrivilegeUpdated logs the action and notify the target

func (*Notifier) ProfileEdited

func (n *Notifier) ProfileEdited(from schema.User, p schema.Person, err error)

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

func (n *Notifier) ReportIdleAccount(u schema.User)

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

func (n *Notifier) ReportReviewed(from, student, tutor schema.User, kind string, err error) error

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) RmAccount

func (n *Notifier) RmAccount(from schema.User, em string, err error) error

RmAccount logs the target and notify it by mail

func (*Notifier) SkipStudent

func (n *Notifier) SkipStudent(from schema.User, em string, skip bool, err error)

SkipStudent logs the change

func (*Notifier) SupervisorUpdated

func (n *Notifier) SupervisorUpdated(from schema.User, sup schema.Person, err error)

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

func (n *Notifier) SurveyReseted(from schema.User, student, kind string, err error) error

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

type SupervisorLetter

type SupervisorLetter interface {
	//SurveyRequest sends the survey request to the supervisor
	SurveyRequest(sup schema.Person, tutor schema.User, student schema.Student, survey schema.SurveyHeader, err error)
}

SupervisorLetter allows to requests the missing surveys

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL