models

package
v0.0.18 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ErrorInvalidEmail   = "invalid email"
	ErrorInvalidUserId  = "invalid user_id"
	ErrorNoResultsFound = "no results found"
	UsersTable          = "resume_user"
)

Variables

This section is empty.

Functions

func DeleteUser

func DeleteUser(key *UserKey, svc dynamodbiface.DynamoDBAPI, logger *zap.Logger) error

func PutUser

func PutUser(user *User, svc dynamodbiface.DynamoDBAPI, logger *zap.Logger) error

Types

type Certification

type Certification struct {
	Name         string `json:"name"`
	DateAchieved string `json:"date_achieved"`
	BadgeLink    string `json:"badge_link,omitempty"`
	DateExpires  string `json:"date_expires,omitempty"`
}

type CertificationKey

type CertificationKey struct {
	CertificationName string `json:"certification_name"`
}

type Degree

type Degree struct {
	Degree    string `json:"degree"`
	Major     string `json:"major"`
	School    string `json:"school"`
	StartYear int    `json:"start_year"`
	EndYear   int    `json:"end_year,omitempty"`
}

type DegreeKey

type DegreeKey struct {
	Degree string `json:"degree"`
	Major  string `json:"major"`
	School string `json:"school"`
}

type Experience

type Experience struct {
	Company          string   `json:"company"`
	JobTitle         string   `json:"job_title"`
	StartMonth       string   `json:"start_month"`
	StartYear        int      `json:"start_year"`
	EndMonth         string   `json:"end_month,omitempty"`
	EndYear          int      `json:"end_year,omitempty"`
	Responsibilities []string `json:"responsibilities,omitempty"`
}

type ExperienceKey

type ExperienceKey struct {
	Company  string `json:"company"`
	JobTitle string `json:"job_title"`
}

type Skill

type Skill struct {
	Name              string `json:"name"`
	YearsOfExperience int    `json:"years_of_experience,omitempty"`
}

type SkillKey

type SkillKey struct {
	Name string `json:"name"`
}

type User

type User struct {
	UserId         string          `json:"user_id"`
	Email          string          `json:"email"`
	Certifications []Certification `json:"certifications,omitempty"`
	Degrees        []Degree        `json:"degrees,omitempty"`
	Experience     []Experience    `json:"experience,omitempty"`
	Github         string          `json:"github,omitempty"`
	GivenName      string          `json:"given_name,omitempty"`
	Location       string          `json:"location,omitempty"`
	Linkedin       string          `json:"linkedin,omitempty"`
	PhoneNumber    string          `json:"phone_number,omitempty"`
	Skills         []Skill         `json:"skills,omitempty"`
	Summary        string          `json:"summary,omitempty"`
	SurName        string          `json:"sur_name,omitempty"`
}

func GetUserByKey

func GetUserByKey(key *UserKey, svc dynamodbiface.DynamoDBAPI, logger *zap.Logger) (*User, error)

type UserKey

type UserKey struct {
	UserId string `json:"user_id"`
}

Jump to

Keyboard shortcuts

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