Documentation ¶
Overview ¶
Package config aggregates the necessary material to configure the wints daemon
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( //DateTimeLayout expresses the expected format for a date + time DateTimeLayout = "02/01/2006 15:04" //DateLayout expresses the expected format for a date DateLayout = "02/01/2006" )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Feeder Feeder Db Db Mailer mail.Config HTTPd HTTPd Majors []string Journal Journal Internships Internships Crons Crons }
Config aggregates all the subcomponents configuration parameters
type Crons ¶
type Crons struct { //NewsLetters is the waiting time between two news letters NewsLetters string //Surveys is the waiting time between two scan for missing surveys Surveys string //Idles is the waiting time between two scan for missing student connections Idles string }
Crons list the waiting periods for some period tasks
type Deadline ¶
type Deadline struct {
// contains filtered or unexported fields
}
Deadline is a simple wrapper to express either durations or date
func AbsoluteDeadline ¶
AbsoluteDeadline returns a deadline from a timestamp
func (*Deadline) UnmarshalText ¶
UnmarshalText parse either duration or date
type Duration ¶
Duration allows to parse duration expressed using toml
func (*Duration) UnmarshalText ¶
UnmarshalText parse durations
type Feeder ¶
type Feeder struct { Login string Password string URL string Frequency Duration Promotions []string Encoding string }
Feeder configures the feeder than scan conventions
type HTTPd ¶
type HTTPd struct { InsecureListen string WWW string Assets string Listen string Certificate string PrivateKey string Rest Rest }
HTTPd configures the http daemon
type Internships ¶
type Internships struct { Majors []string Promotions []string Reports []Report Surveys []Survey LatePenalty int Version string }
Internships declare the internship organization
func (Internships) ValidMajor ¶
func (i Internships) ValidMajor(m string) bool
ValidMajor tests if a given major is supported
func (Internships) ValidPromotion ¶
func (i Internships) ValidPromotion(p string) bool
ValidPromotion tests if a promotion is supported