core

package
v0.0.0-...-228f294 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2016 License: MIT Imports: 3 Imported by: 0

Documentation

Overview

Package core contains core definitions used by cifer modules

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	DatabaseName string
	Conn         string
	// contains filtered or unexported fields
}

func (*Config) CloseSession

func (c *Config) CloseSession()

func (*Config) Collection

func (c *Config) Collection(name string) (*mgo.Collection, error)

func (*Config) Init

func (c *Config) Init() error

func (*Config) Session

func (c *Config) Session() (*mgo.Session, error)

type Job

type Job struct {
	ID          bson.ObjectId
	Title       string
	Description string
}

type Person

type Person struct {
	ID         bson.ObjectId
	AboutMe    string
	Email      string
	Gender     string
	FamilyName string
	GivenName  string
	MiddleName string
	URL        string
	Resumes    []Resume
}

type Resume

type Resume struct {
	ID           bson.ObjectId       `json:"id"`
	PersonID     int                 `json:"person_id"`
	Name         string              `json:"name"`
	ResumeBasic  ResumeBasic         `json:"basic"`
	Work         []ResumeWork        `json:"work"`
	Volunteer    []ResumeWork        `json:"volunteer"`
	Education    []ResumeEducation   `json:"education"`
	Awards       []ResumeAward       `json:"awards"`
	Publications []ResumePublication `json:"publications"`
	Skills       []ResumeSkill       `json:"skills"`
	Languages    []ResumeLanguage    `json:"languages"`
	Interests    []ResumeInterest    `json:"interests"`
	References   []ResumeReferee     `json:"references"`
	CreatedAt    time.Time           `json:"created_at"`
	UpdatedAt    time.Time           `json:"updated_at"`
}

Resume represent Curriculum Vitae

func SampleResume

func SampleResume() Resume

SampleResume cretes a sample resume.

type ResumeAward

type ResumeAward struct {
	ID       int `json:"id"`
	ResumeID int `json:"resume_id"`
	// e.g Best dreamer
	Title string `json:"title"`

	// e.g 2015-10-10
	Date time.Time `json:"date"`

	// e.g  my uncle
	Awarder string `json:"awarder"`

	// e.g  A big time dreamer in a big dream
	Summary string `json:"summary"`

	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

ResumeAward is the award details of the resume owner.

type ResumeBasic

type ResumeBasic struct {

	// Name is the name of the resume holder
	// e.g Geofrey Ernest
	Name string `json:"name" schema:"name"`

	// Label is a short description
	// e.g A dreamer from Tanzania
	Label string `json:"label" schema:"label"`

	// Picture is a URL to an image file, format JPEG or PNG
	Picture string `json:"picture" schema:"picture"`

	// Email is an email address
	// e.g gernest@wakalikwanza.tz
	Email string `json:"email" schema:"email"`

	// Phone is the phonenumber, this is used as a string
	// to suppoert mutliple formats.
	Phone string `json:"phone" schema:"phone"`

	// Website is the URL to a website.
	Website string `json:"website" schema:"website"`

	//Summary is a 2-3 sentence biography about resume owner
	Summary string `json:"summary" schema:"summary"`

	ResumeLocation   ResumeLocation `json:"location" schema:"location"`
	ResumeLocationID int            `json:"-" shema:"-"`

	Profiles []ResumeProfile `json:"profiles" schema:"-"`
}

ResumeBasic is the basic information for a resume

type ResumeEducation

type ResumeEducation struct {
	ID       int `json:"id"`
	ResumeID int `json:"resume_id"`

	// e.g UDOM
	Institution string `json:"institution"`

	// e.g Business
	Area string `json:"area"`

	// e.g Bachelor
	StudyType string `json:"stydyType"`

	StartDate time.Time `json:"startDate"`
	EndDate   time.Time `json:"endDate"`

	// eg 4.0
	GPA string `json:"gpa"`

	// e.g Development studies
	Courses []string `json:"courses" gorm:"polymorphic:Item"`

	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

ResumeEducation is the education details of the resume owner.

type ResumeInterest

type ResumeInterest struct {
	ID       int `json:"id"`
	ResumeID int `json:"resume_id"`

	// e.g music
	Name string `json:"name"`

	// e.g Vampire Weekend
	Keywords []string `json:"keywords" gorm:"polymorphic:Item"`

	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

ResumeInterest is the interest details of the resume owner.

type ResumeLanguage

type ResumeLanguage struct {
	ID       int `json:"id"`
	ResumeID int `json:"resume_id"`

	// e.g English, Swahili
	Language string `json:"language"`

	// e.g fluent, beginner
	Fluency string `json:"fluency"`

	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

ResumeLanguage is the language details of the resume owner.

type ResumeLocation

type ResumeLocation struct {
	Address     string `json:"address" schema:"address"`
	PostalCode  string `json:"postalCode" schema:"postal_code"`
	City        string `json:"city" schema:"city"`
	CountryCode string `json:"countryCode" schema:"country_code"`
	Region      string `json:"region" schema:"region"`
}

ResumeLocation is the location details of a resume owner.

type ResumeProfile

type ResumeProfile struct {

	// Network is a social network
	// e.g Facebook google+ or github
	Network string `json:"network"`

	// UserName is the social network's username
	// e.g gerest
	UserName string `json:"username"`

	// URL is the link to the profile
	// e.g https://github.com/gernest
	URL string `json:"string"`
}

ResumeProfile is the profile of the resume owner.

type ResumePublication

type ResumePublication struct {
	ID       int `json:"id"`
	ResumeID int `json:"resume_id"`

	// e.g Beating poverty with golang
	Name string `json:"name"`

	// e.g Zedlist
	Publisher string `json:"publisher"`

	// e.g 2005-10-10
	ReleaseDate time.Time `json:"releaseDate"`

	// e.g zedlist.com
	Website string `json:"website"`

	// e.g cheating on poverty with code
	Summary string `json:"summary"`

	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

ResumePublication is the publication details of the resume owner.

type ResumeReferee

type ResumeReferee struct {
	ID        int       `json:"id"`
	ResumeID  int       `json:"resume_id"`
	Name      string    `json:"name"`
	Reference string    `json:"reference"`
	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

ResumeReferee is the details about a person who is refereeing for the resume owner.

type ResumeSkill

type ResumeSkill struct {
	ID       int `json:"id"`
	ResumeID int `json:"resume_id"`

	// e.g web dev
	Name string `json:"name"`

	// e.g Intermediary
	Level string `json:"level"`

	// e.g Golang
	KeyWords []string `json:"keywords" gorm:"polymorphic:Item"`

	CreatedAt time.Time `json:"created_at"`
	UpdatedAt time.Time `json:"updated_at"`
}

ResumeSkill is the skill details of the resume owner.

type ResumeWork

type ResumeWork struct {

	// e.g zedlist
	Company string `json:"company"`

	// e.g founder
	Position string `json:"position"`

	//e.g zedlist.co.tz
	Website string `json:"website"`

	// StartDate is the time you started working in the company
	// TODO(gernest): use a string?
	StartDate time.Time `json:"startDate"`

	// EndDate is the time you stoped working for the company
	// TODO(gernest): use string?
	EndDate time.Time `json:"endDate"`

	// Summary is the overview of your responsibilities at the company.
	Summary string `json:"summary"`

	//Highlights is a list of accomplishments
	Highlights []string `json:"highlights" gorm:"polymorphic:Item"`
}

ResumeWork is the work details of the resume owner.

type User

type User struct {
	ID       bson.ObjectId
	Email    string
	Password string
	Profile  *Person
}

User is the zedlist user.

Jump to

Keyboard shortcuts

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