Documentation
¶
Index ¶
- Variables
- func GenerateTemplate(profile *Profile, sortedSectionList *[]SectionIndexRank, templateFile string)
- func GetDefaultRanks(theme string) map[string]int
- func PopulateProfile(jsonData *[]byte, profile *Profile)
- func ProfileIO(jsonData []byte)
- func SanitizeAndMakeTitle(text string) string
- func SanitizeLabel(label string) string
- func SanitizeText(text string) string
- func WriteResumeClass(file string)
- type AwardDetail
- type AwardDetailSlice
- type Awards
- type Basics
- type BriefAndDetail
- type Config
- type ConfigMeta
- type Custom
- type CustomMeta
- type CustomSlice
- type Education
- type EducationDetail
- type EducationDetailSlice
- type InterestDetail
- type InterestDetailSlice
- type Interests
- type LanguageDetail
- type LanguageDetailSlice
- type Languages
- type ListDetail
- type ListDetailSlice
- type Location
- type Profile
- type ProfileField
- type ProfileTheme
- type ProjectDetail
- type ProjectDetailSlice
- type Projects
- type PublicationDetail
- type PublicationDetailSlice
- type PublicationField
- type Publications
- type ReferenceDetail
- type ReferenceDetailSlice
- type References
- type Renderable
- type SectionIndexRank
- type SkillDetail
- type SkillDetailSlice
- type Skills
- type SocialProfile
- type ThemeType
- type ValueType
- type WebPage
- type Work
- type WorkDetail
- type WorkDetailSlice
Constants ¶
This section is empty.
Variables ¶
var ProfileFieldNameMap map[ProfileField]string = map[ProfileField]string{
ConfigField: "config",
BasicsField: "basics",
WorkField: "work",
EducationField: "education",
PublicationsField: "publications",
ProjectsField: "projects",
AwardsField: "awards",
SkillsField: "skills",
LanguagesField: "languages",
InterestsField: "interests",
ReferencesField: "references",
ListField: "list",
CustomField: "custom"}
ProfileFieldNameMap stores the field names of different sections in a profile, e.g. "config", "basics", etc.
var ProfileThemes map[ProfileTheme]string = map[ProfileTheme]string{
BasicTheme: "basic",
PantherTheme: "panther"}
ProfileThemes is a map of list of available themes.
var PublicationFieldNameMap map[PublicationField]string = map[PublicationField]string{
ArticleField: "article",
BookField: "book",
ThesisField: "thesis",
TechReportField: "techreport",
InCollectionField: "incollection",
MiscField: "misc",
UnPublishedField: "unpublished"}
PublicationFieldNameMap stores the names of different publication types, "article", "book", etc.
Functions ¶
func GenerateTemplate ¶
func GenerateTemplate(profile *Profile, sortedSectionList *[]SectionIndexRank, templateFile string)
GenerateTemplate writes template file for a given theme.
func GetDefaultRanks ¶
GetDefaultRanks returns default ranks of each section (work, education, publications, etc.) with the exception of custom field in the profile object.
func PopulateProfile ¶
PopulateProfile maps json data to profile struct.
func ProfileIO ¶
func ProfileIO(jsonData []byte)
ProfileIO processes the given json file and generates tex and pdf resume files.
func SanitizeAndMakeTitle ¶
SanitizeAndMakeTitle updates a string using strings.Title(...) and escapes required characters.
func SanitizeLabel ¶
SanitizeLabel returns escaped string for required characters, for a basic theme.
func SanitizeText ¶
SanitizeText updates string by escaping required characters such as '\', '&'.
func WriteResumeClass ¶
func WriteResumeClass(file string)
WriteResumeClass writes contents of res.cls (http://ftp.math.purdue.edu/mirrors/ctan.org/macros/latex/contrib/resume/res.cls).
Types ¶
type AwardDetail ¶
type AwardDetail struct { Value struct { Title string Date string Awarder string Summary string } Render bool }
AwardDetail type
type AwardDetailSlice ¶
type AwardDetailSlice []AwardDetail
AwardDetailSlice type
func (AwardDetailSlice) HasRender ¶
func (s AwardDetailSlice) HasRender() bool
HasRender returns true if any item in the Awards list needs to be rendered.
type Basics ¶
type Basics struct { Name ValueType Label ValueType Email ValueType Phone ValueType URL ValueType Summary ValueType Location Location Profiles []SocialProfile Rank int }
Basics type
type Config ¶
type Config struct { Homepage string Theme ThemeType Meta ConfigMeta }
Config type defining configuration.
type Custom ¶
type Custom struct { Label string Type string Work WorkDetailSlice Publications PublicationDetailSlice Projects ProjectDetailSlice Education EducationDetailSlice Awards AwardDetailSlice Skills SkillDetailSlice Languages LanguageDetailSlice Interests InterestDetailSlice List ListDetailSlice Meta CustomMeta Rank int }
Custom type
type Education ¶
type Education struct { Label string List EducationDetailSlice Rank int }
Education type
type EducationDetail ¶
type EducationDetail struct { Value struct { Institution string URL string Major string Minor string Degree string StartDate string EndDate string Grade float32 GradeTotal float32 Courses []string } Render bool }
EducationDetail type
type EducationDetailSlice ¶
type EducationDetailSlice []EducationDetail
EducationDetailSlice type
func (EducationDetailSlice) HasRender ¶
func (s EducationDetailSlice) HasRender() bool
HasRender returns true if any item in the Education list needs to be rendered.
type InterestDetail ¶
InterestDetail type
type InterestDetailSlice ¶
type InterestDetailSlice []InterestDetail
InterestDetailSlice type
func (InterestDetailSlice) HasRender ¶
func (s InterestDetailSlice) HasRender() bool
HasRender returns true if any item in the Interests list needs to be rendered.
type Interests ¶
type Interests struct { Label string List InterestDetailSlice Rank int }
Interests type
type LanguageDetail ¶
LanguageDetail type
type LanguageDetailSlice ¶
type LanguageDetailSlice []LanguageDetail
LanguageDetailSlice type
func (LanguageDetailSlice) HasRender ¶
func (s LanguageDetailSlice) HasRender() bool
HasRender returns true if any item in the Languages list needs to be rendered.
type Languages ¶
type Languages struct { Label string List LanguageDetailSlice Rank int }
Languages type
type ListDetail ¶
ListDetail type
func (*ListDetail) Sanitize ¶
func (s *ListDetail) Sanitize()
Sanitize escapes required characters for ListDetail type.
type ListDetailSlice ¶
type ListDetailSlice []ListDetail
ListDetailSlice type
func (ListDetailSlice) HasRender ¶
func (s ListDetailSlice) HasRender() bool
HasRender returns true if any item in the list needs to be rendered.
type Location ¶
type Location struct { Value struct { Address string PostalCode string City string CountryName string Region string } Render bool }
Location type
type Profile ¶
type Profile struct { Config Config Basics Basics Work Work Education Education Publications Publications Projects Projects Awards Awards Skills Skills Languages Languages Interests Interests References References Custom CustomSlice }
Profile type
type ProfileField ¶
type ProfileField int
ProfileField type identifier for each section in a profile.
const ( ConfigField ProfileField = iota BasicsField ProfileField = iota WorkField ProfileField = iota EducationField ProfileField = iota ProjectsField ProfileField = iota AwardsField ProfileField = iota PublicationsField ProfileField = iota SkillsField ProfileField = iota LanguagesField ProfileField = iota InterestsField ProfileField = iota ReferencesField ProfileField = iota ListField ProfileField = iota CustomField ProfileField = iota )
ProfileField identifier consts.
type ProfileTheme ¶
type ProfileTheme int
ProfileTheme type identifier for themes, i.e. basic, panther, etc.
const ( BasicTheme ProfileTheme = iota PantherTheme ProfileTheme = iota )
Theme identifier consts
type ProjectDetail ¶
type ProjectDetail struct { Value struct { Name string Description string Team string Note string Highlights []BriefAndDetail Keywords []string StartDate string EndDate string URL string Roles []string Type string } Render bool }
ProjectDetail type
type ProjectDetailSlice ¶
type ProjectDetailSlice []ProjectDetail
ProjectDetailSlice type
func (ProjectDetailSlice) HasRender ¶
func (s ProjectDetailSlice) HasRender() bool
HasRender returns true if any item in the Projects list needs to be rendered.
type Projects ¶
type Projects struct { Label string List ProjectDetailSlice Rank int }
Projects type
type PublicationDetail ¶
type PublicationDetail struct { Value struct { Type string Category string Author string Title string Editor string Edition string // either edition or series and volume Series string Journal string Volume int Booktitle string Publisher string Address string Note string Howpublished string Year int Number int Pages string URL string WebPage WebPage } Render bool }
PublicationDetail type
func (*PublicationDetail) Parse ¶
func (item *PublicationDetail) Parse(config Config) string
Parse returnes parsed Publication field based on the theme.
func (*PublicationDetail) ParseBasic ¶
func (item *PublicationDetail) ParseBasic(config Config) string
ParseBasic Publication
func (*PublicationDetail) ParsePanther ¶
func (item *PublicationDetail) ParsePanther(config Config) string
ParsePanther Publication
type PublicationDetailSlice ¶
type PublicationDetailSlice []PublicationDetail
PublicationDetailSlice type
func (PublicationDetailSlice) HasRender ¶
func (s PublicationDetailSlice) HasRender() bool
HasRender returns true if any item in the Publications list needs to be rendered.
type PublicationField ¶
type PublicationField int
PublicationField type identifier for publication fields like article, book, thesis, etc.
const ( ArticleField PublicationField = iota BookField PublicationField = iota ThesisField PublicationField = iota TechReportField PublicationField = iota InCollectionField PublicationField = iota MiscField PublicationField = iota UnPublishedField PublicationField = iota )
article field types
type Publications ¶
type Publications struct { Label string List PublicationDetailSlice Rank int }
Publications type
type ReferenceDetail ¶
type ReferenceDetail struct { Value struct { Name string Title string Affiliation string Address string PostalCode string City string CountryName string Region string PhoneNumber string Email string URL string } Render bool }
ReferenceDetail type
type ReferenceDetailSlice ¶
type ReferenceDetailSlice []ReferenceDetail
ReferenceDetailSlice type
func (ReferenceDetailSlice) HasRender ¶
func (s ReferenceDetailSlice) HasRender() bool
HasRender returns true if any item in the Reference list needs to be rendered.
type References ¶
type References struct { Label string List ReferenceDetailSlice Rank int }
References type
type SectionIndexRank ¶
type SectionIndexRank struct {
// contains filtered or unexported fields
}
SectionIndexRank type
func GetSortedSectionArray ¶
func GetSortedSectionArray(profile *Profile) []SectionIndexRank
GetSortedSectionArray returns array of SectionIndexRank type objects sorted by their ranks.
type SkillDetail ¶
SkillDetail type
type SkillDetailSlice ¶
type SkillDetailSlice []SkillDetail
SkillDetailSlice type
func (SkillDetailSlice) HasRender ¶
func (s SkillDetailSlice) HasRender() bool
HasRender returns true if any item in the Skills list needs to be rendered.
type SocialProfile ¶
type SocialProfile struct { Value struct { Network string Username string URL string } Render bool }
SocialProfile type
type ThemeType ¶
type ThemeType struct { Label string Value string Render bool Meta struct { ShowPageNumbers bool HideSectionLines bool PantherHeaderNameFontSize int PantherHeaderColumnOneWidth float32 PantherHeaderColumnTwoWidth float32 } }
ThemeType defines the type for a theme object.
type WorkDetail ¶
type WorkDetail struct { Value struct { Name string Location string Brief string Position string URL string StartDate string EndDate string Active bool Highlights []BriefAndDetail } Render bool }
WorkDetail type
type WorkDetailSlice ¶
type WorkDetailSlice []WorkDetail
WorkDetailSlice type
func (WorkDetailSlice) HasRender ¶
func (s WorkDetailSlice) HasRender() bool
HasRender returns true if any item in the Work list needs to be rendered.