Documentation
¶
Index ¶
- func EpitechTimeToRFC(timeStr string) string
- func GetModuleProjects(conf *parser.Config, module Module, chanProjects *chan []Activity, ...)
- func GetModules(conf *parser.Config, client *http.Client) (*[]Module, error)
- func GetProjects(config *parser.Config, projects *[]Activity) error
- func GetRegisteredEvents(conf *parser.Config, listEvents *[]Event) error
- type Activities
- type Activity
- type Event
- type Member
- type Module
- type Project
- type Registered
- type Room
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EpitechTimeToRFC ¶
EpitechTimeToRFC allows to convert the Epitech Timestamp to RFC 3339
func GetModuleProjects ¶
func GetModuleProjects(conf *parser.Config, module Module, chanProjects *chan []Activity, wg *sync.WaitGroup, client *http.Client)
GetModuleProjects retrieves the projects for every modules
func GetModules ¶
GetModules retrieves registered modules of the user
func GetProjects ¶
GetProjects fetches the list of all the projects the user is registered to goroutines are used in order to improve the performances. After waiting for every module information to be sent to the channel, the said channel is read until all projects are retrieved.
Types ¶
type Activities ¶
type Activities struct {
Activities []Activity `json:"activites"`
}
Activities is a struct containing an array of activies. Only there in order to match the intra output so that I can easily unmarshall to json
type Activity ¶
type Activity struct { Title string `json:"title"` Description string `json:"description"` Begin string `json:"begin"` End string `json:"end"` TypeTitle string `json:"type_title"` IsProject bool `json:"is_projet"` CodeActi string `json:"codeacti"` Participants []string ParticipantsName []string Update bool // for calendar update purposes. I know it's ugly to put it here. Sorry ID string // for calendar update purposes. I know it's ugly to put it here. Sorry }
Activity is a struct that contains useful information for every activity
type Event ¶
type Event struct { CodeModule string `json:"codemodule"` CodeInstance string `json:"codeinstance"` CodeActi string `json:"codeacti"` CodeEvent string `json:"codeevent"` ModuleTitle string `json:"titlemodule"` ActiTitle string `json:"acti_title"` Start string `json:"start"` End string `json:"end"` IsRdv string `json:"is_rdv"` Room Room `json:"room"` RawEventRegistered interface{} `json:"event_registered"` EventRegistered bool `json:"-"` RdvGroupRegistered string `json:"rdv_group_registered"` RdvIndivRegistered string `json:"rdv_indiv_registered"` }
Event is a json structure of the elements in the intra json response
type Module ¶
type Module struct { ID int `json:"id"` Semester int `json:"semester"` Scholaryear int `json:"scolaryear"` Code string `json:"code"` Codeinstance string `json:"codeinstance"` Title string `json:"title"` Registered string `json:"status"` }
Module is a structure that represents the intra Module
type Project ¶
type Project struct { Title string `json:"title"` UserGroupName string `json:"user_project_title"` Registered []Registered `json:"registered"` }
Project is a struct that contains information about the project
type Registered ¶
type Registered struct { Title string `json:"title"` Master Member `json:"master"` Members []Member `json:"members"` }
Registered is the list of groups