Skip to content

Commit

Permalink
Change comments in structs, making them easier to partially uncomment
Browse files Browse the repository at this point in the history
  • Loading branch information
alexandregv committed Nov 5, 2019
1 parent ed96490 commit 0bca65d
Show file tree
Hide file tree
Showing 3 changed files with 94 additions and 112 deletions.
12 changes: 5 additions & 7 deletions pkg/api/coalition.go
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ package api
// Coalition represents a coalition from the 42's API.
// Truncated to keep only useful entries.
type Coalition struct {
//ID int `json:"id"`
// ID int `json:"id"`
Name string `json:"name"`
Slug string `json:"slug"`
/*
ImageURL string `json:"image_url"`
Color string `json:"color"`
Score int `json:"score"`
UserID int `json:"user_id"`
*/
// ImageURL string `json:"image_url"`
// Color string `json:"color"`
// Score int `json:"score"`
// UserID int `json:"user_id"`
}
20 changes: 10 additions & 10 deletions pkg/api/location.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,14 +5,14 @@ import "time"
// Location represents a connection location from the 42's API.
// Truncated to keep only useful entries.
type Location struct {
ID int `json:"id"`
BeginAt time.Time `json:"begin_at"`
EndAt time.Time `json:"end_at"`
Primary bool `json:"primary"`
Floor interface{} `json:"floor"`
Row interface{} `json:"row"`
Post interface{} `json:"post"`
Host string `json:"host"`
CampusID int `json:"campus_id"`
User User `json:"user"`
// ID int `json:"id"`
BeginAt time.Time `json:"begin_at"`
// EndAt time.Time `json:"end_at"`
// Primary bool `json:"primary"`
// Floor interface{} `json:"floor"`
// Row interface{} `json:"row"`
// Post interface{} `json:"post"`
Host string `json:"host"`
// CampusID int `json:"campus_id"`
// User User `json:"user"`
}
174 changes: 79 additions & 95 deletions pkg/api/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,103 +5,87 @@ package api
// User represents an user from the 42's API.
// Truncated to keep only useful entries.
type User struct {
/*
ID int `json:"id"`
Email string `json:"email"`
*/
// ID int `json:"id"`
// Email string `json:"email"`
Login string `json:"login"`
/*
FirstName string `json:"first_name"`
LastName string `json:"last_name"`
URL string `json:"url"`
Phone interface{} `json:"phone"`
Displayname string `json:"displayname"`
ImageURL string `json:"image_url"`
Staff bool `json:"staff?"`
CorrectionPoint int `json:"correction_point"`
PoolMonth string `json:"pool_month"`
PoolYear string `json:"pool_year"`
Location string `json:"location"`
Wallet int `json:"wallet"`
Groups []interface{} `json:"groups"`
*/
// FirstName string `json:"first_name"`
// LastName string `json:"last_name"`
// URL string `json:"url"`
// Phone interface{} `json:"phone"`
// Displayname string `json:"displayname"`
// ImageURL string `json:"image_url"`
// Staff bool `json:"staff?"`
// CorrectionPoint int `json:"correction_point"`
// PoolMonth string `json:"pool_month"`
// PoolYear string `json:"pool_year"`
// Location string `json:"location"`
// Wallet int `json:"wallet"`
// Groups []interface{} `json:"groups"`
CursusUsers []struct {
/*
ID int `json:"id"`
BeginAt time.Time `json:"begin_at"`
EndAt interface{} `json:"end_at"`
Grade interface{} `json:"grade"`
*/
// ID int `json:"id"`
// BeginAt time.Time `json:"begin_at"`
// EndAt interface{} `json:"end_at"`
// Grade interface{} `json:"grade"`
Level float64 `json:"level"`
/*
Skills []interface{} `json:"skills"`
CursusID int `json:"cursus_id"`
HasCoalition bool `json:"has_coalition"`
User User `json:"user"`
Cursus struct {
ID int `json:"id"`
CreatedAt time.Time `json:"created_at"`
Name string `json:"name"`
Slug string `json:"slug"`
} `json:"cursus"`
*/
// Skills []interface{} `json:"skills"`
// CursusID int `json:"cursus_id"`
// HasCoalition bool `json:"has_coalition"`
// User User `json:"user"`
// Cursus struct {
// ID int `json:"id"`
// CreatedAt time.Time `json:"created_at"`
// Name string `json:"name"`
// Slug string `json:"slug"`
// } `json:"cursus"`
} `json:"cursus_users"`
/*
ProjectsUsers []interface{} `json:"projects_users"`
LanguagesUsers []struct {
ID int `json:"id"`
LanguageID int `json:"language_id"`
UserID int `json:"user_id"`
Position int `json:"position"`
CreatedAt time.Time `json:"created_at"`
} `json:"languages_users"`
Achievements []interface{} `json:"achievements"`
Titles []interface{} `json:"titles"`
TitlesUsers []interface{} `json:"titles_users"`
Partnerships []interface{} `json:"partnerships"`
Patroned []struct {
ID int `json:"id"`
UserID int `json:"user_id"`
GodfatherID int `json:"godfather_id"`
Ongoing bool `json:"ongoing"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
} `json:"patroned"`
Patroning []interface{} `json:"patroning"`
ExpertisesUsers []struct {
ID int `json:"id"`
ExpertiseID int `json:"expertise_id"`
Interested bool `json:"interested"`
Value int `json:"value"`
ContactMe bool `json:"contact_me"`
CreatedAt time.Time `json:"created_at"`
UserID int `json:"user_id"`
} `json:"expertises_users"`
*/
Campus []struct {
/*
ID int `json:"id"`
*/
Name string `json:"name"`
/*
TimeZone string `json:"time_zone"`
Language struct {
ID int `json:"id"`
Name string `json:"name"`
Identifier string `json:"identifier"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
} `json:"language"`
UsersCount int `json:"users_count"`
VogsphereID int `json:"vogsphere_id"`
*/
} `json:"campus"`
/*
CampusUsers []struct {
ID int `json:"id"`
UserID int `json:"user_id"`
CampusID int `json:"campus_id"`
IsPrimary bool `json:"is_primary"`
} `json:"campus_users"`
*/
// ProjectsUsers []interface{} `json:"projects_users"`
// LanguagesUsers []struct {
// ID int `json:"id"`
// LanguageID int `json:"language_id"`
// UserID int `json:"user_id"`
// Position int `json:"position"`
// CreatedAt time.Time `json:"created_at"`
// } `json:"languages_users"`
// Achievements []interface{} `json:"achievements"`
// Titles []interface{} `json:"titles"`
// TitlesUsers []interface{} `json:"titles_users"`
// Partnerships []interface{} `json:"partnerships"`
// Patroned []struct {
// ID int `json:"id"`
// UserID int `json:"user_id"`
// GodfatherID int `json:"godfather_id"`
// Ongoing bool `json:"ongoing"`
// CreatedAt time.Time `json:"created_at"`
// UpdatedAt time.Time `json:"updated_at"`
// } `json:"patroned"`
// Patroning []interface{} `json:"patroning"`
// ExpertisesUsers []struct {
// ID int `json:"id"`
// ExpertiseID int `json:"expertise_id"`
// Interested bool `json:"interested"`
// Value int `json:"value"`
// ContactMe bool `json:"contact_me"`
// CreatedAt time.Time `json:"created_at"`
// UserID int `json:"user_id"`
// } `json:"expertises_users"`
Campus []struct {
// ID int `json:"id"`
Name string `json:"name"`
// TimeZone string `json:"time_zone"`
// Language struct {
// ID int `json:"id"`
// Name string `json:"name"`
// Identifier string `json:"identifier"`
// CreatedAt time.Time `json:"created_at"`
// UpdatedAt time.Time `json:"updated_at"`
// } `json:"language"`
// UsersCount int `json:"users_count"`
// VogsphereID int `json:"vogsphere_id"`
} `json:"campus"`
// CampusUsers []struct {
// ID int `json:"id"`
// UserID int `json:"user_id"`
// CampusID int `json:"campus_id"`
// IsPrimary bool `json:"is_primary"`
// } `json:"campus_users"`
}

0 comments on commit 0bca65d

Please sign in to comment.