CV/model.go
Dan Anglin 7ca819fa04
refactor: add structure for start and end dates
The start and end dates for employment and
education experiences were free-form strings.

This commit changes adds a Date struct with Year and Month
variables and declares the Duration field as a type Date.

The TEX template is updated to reflect the change. The resulting
PDF will not change.
2020-02-07 18:46:21 +00:00

51 lines
1.4 KiB
Go

package main
type Cv struct {
FirstName string `json:"firstName"`
LastName string `json:"lastName"`
JobTitle string `json:"jobTitle"`
Contact Contact `json:"contact"`
Links Links `json:"links"`
Summary []string `json:"summary"`
Technologies []Technologies `json:"technologies"`
Employment []Experience `json:"employment"`
Education []Experience `json:"education"`
Interests []string `json:"interests"`
}
type Contact struct {
Email string `json:"email"`
Phone string `json:"phone"`
Location string `json:"location"`
}
type Links struct {
GitLab string `json:"gitlab"`
GitHub string `json:"github"`
Website string `json:"website,omitempty"`
}
type Technologies struct {
Category string `json:"category"`
Values []string `json:"values"`
}
type Experience struct {
Company string `json:"company,omitempty"`
School string `json:"school,omitempty"`
Location string `json:"location"`
JobTitle string `json:"jobTitle,omitempty"`
Qualification string `json:"qualification,omitempty"`
Duration Duration `json:"duration"`
Details []string `json:"details"`
}
type Duration struct {
Start Date `json:"start"`
End Date `json:"end"`
}
type Date struct {
Year string `json:"year"`
Month string `json:"month"`
}