package module
v0.0.0-...-c5ab883 Latest Latest

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

Go to latest
Published: Aug 20, 2015 License: LGPL-3.0 Imports: 7 Imported by: 1



Epitech Web Service utility package for Go.




This section is empty.


This section is empty.


This section is empty.


type Client

type Client struct {
	Host string
	// contains filtered or unexported fields

func (*Client) Authenticate

func (client *Client) Authenticate(login string, password string) (err error)

func (*Client) GetData

func (client *Client) GetData(url string) (data []byte, err error)

func (*Client) GetNetsoul

func (client *Client) GetNetsoul(login string) ([]NetsoulPeriod, error)

func (*Client) GetUser

func (client *Client) GetUser(login string) (*User, error)

type Netsoul

type Netsoul []NetsoulPeriod

type NetsoulPeriod

type NetsoulPeriod struct {
	Timestamp        float64
	SecondsActive    float64
	SecondsIdle      float64
	SecondsOutActive float64
	SecondsOutIdle   float64
	Norm             float64

func (*NetsoulPeriod) UnmarshalJSON

func (netsoul *NetsoulPeriod) UnmarshalJSON(data []byte) (err error)

type User

type User struct {
	Login              string              `json:"login"`
	FullName           string              `json:"title"`
	Email              string              `json:"internal_email"`
	LastName           string              `json:"lastname"`
	FirstName          string              `json:"firstname"`
	UserInfo           map[string]UserInfo `json:"userinfo"`
	AvatarURL          string              `json:"picture"`
	Promotion          float64             `json:"promo"`
	Semester           float64             `json:"semester"`
	UID                float64             `json:"uid"`
	GID                float64             `json:"gid"`
	Location           string              `json:"location"`
	Closed             bool                `json:"close"`
	PromoID            string              `json:"id_promo"`
	HistoryID          string              `json:"id_history"`
	CourseCode         string              `json:"course_code"`
	SemesterCode       string              `json:"semester_code"`
	SchoolID           string              `json:"school_id"`
	SchoolCode         string              `json:"school_code"`
	SchoolTitle        string              `json:"school_title"`
	PreviousPromoID    string              `json:"old_id_promo"`
	PreviousLocationId string              `json:"old_id_location"`
	StudentYear        float64             `json:"studentyear"`
	IsAdmin            bool                `json:"admin"`
	IsEditable         bool                `json:"editable"`
	Groups             []UserGroup         `json:"groups"`
	Credits            float64             `json:"credits"`
	GPA                []UserGPA           `json:"gpa"`
	AverageGPA         []UserAverageGPA    `json:"average_gpa"`
	Spices             float64             `json:"spice"`
	Netsoul            UserNetsoul         `json:"nsstat"`

type UserAverageGPA

type UserAverageGPA struct {
	Value string `json:"gpa_average"`
	Cycle string `json:"cycle"`

Average Grade Point Average. This is some next level shit.

type UserGPA

type UserGPA struct {
	Value string `json:"gpa"`
	Cycle string `json:"cycle"`

type UserGroup

type UserGroup struct {
	Name  string  `json:"name"`
	Title string  `json:"title"`
	Size  float64 `json:"count"`

type UserInfo

type UserInfo struct {
	Value            string `json:"value"`
	IsVisible        bool   `json:"public"`
	IsVisibleByAdmin bool   `json:"adm"`

type UserNetsoul

type UserNetsoul struct {
	HoursActive        float64 `json:"active"`
	HoursIdle          float64 `json:"idle"`
	HoursActiveOutside float64 `json:"out_active"`
	HoursIdleOutside   float64 `json:"out_idle"`
	LogNorm            float64 `json:"nslog_norm"`

Jump to

Keyboard shortcuts

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