models

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2025 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateID

func GenerateID() string

func GenerateKBID

func GenerateKBID() string

GenerateKBID generates a unique ID for KB entries

Types

type Application

type Application struct {
	ID          string    `json:"id"`
	Company     string    `json:"company"`
	Role        string    `json:"role"`
	Status      Status    `json:"status"`
	DateApplied string    `json:"date_applied"`
	JDURL       string    `json:"jd_url,omitempty"`
	JDContent   string    `json:"jd_content,omitempty"`
	ResumePath  string    `json:"resume_path,omitempty"`
	CompanyURL  string    `json:"company_url,omitempty"`
	Notes       string    `json:"notes,omitempty"`
	CreatedAt   time.Time `json:"created_at"`
	UpdatedAt   time.Time `json:"updated_at"`
}

func NewApplication

func NewApplication(company, role string) *Application

type CertificationEntry

type CertificationEntry struct {
	Name         string `json:"name"`
	Issuer       string `json:"issuer,omitempty"`
	Date         string `json:"date,omitempty"`        // YYYY-MM format
	ExpiryDate   string `json:"expiry_date,omitempty"` // YYYY-MM format
	CredentialID string `json:"credential_id,omitempty"`
}

CertificationEntry holds a single certification

func (*CertificationEntry) Validate

func (c *CertificationEntry) Validate() error

type ContactData

type ContactData struct {
	Name     string `json:"name"`
	Email    string `json:"email"`
	Phone    string `json:"phone,omitempty"`
	Location string `json:"location,omitempty"`
	LinkedIn string `json:"linkedin,omitempty"`
	GitHub   string `json:"github,omitempty"`
	Website  string `json:"website,omitempty"`
}

ContactData holds candidate contact information

func (*ContactData) Validate

func (c *ContactData) Validate() error

type EducationEntry

type EducationEntry struct {
	Institution string `json:"institution"`
	Degree      string `json:"degree"`
	Field       string `json:"field,omitempty"`
	StartDate   string `json:"start_date,omitempty"`
	EndDate     string `json:"end_date,omitempty"`
	GPA         string `json:"gpa,omitempty"`
}

EducationEntry holds a single education entry

func (*EducationEntry) Validate

func (e *EducationEntry) Validate() error

type ExperienceEntry

type ExperienceEntry struct {
	Company     string   `json:"company"`
	Role        string   `json:"role"`
	StartDate   string   `json:"start_date"`         // YYYY-MM format
	EndDate     string   `json:"end_date,omitempty"` // YYYY-MM or "present"
	Location    string   `json:"location,omitempty"`
	Description string   `json:"description,omitempty"`
	Highlights  []string `json:"highlights,omitempty"`
}

ExperienceEntry holds a single work experience entry

func (*ExperienceEntry) Validate

func (e *ExperienceEntry) Validate() error

type KBEntry

type KBEntry struct {
	ID        string      `json:"id"`
	Type      KBEntryType `json:"type"`
	Category  string      `json:"category"`
	Data      any         `json:"data,omitempty"`    // For profile entries (typed struct)
	Content   string      `json:"content,omitempty"` // For context entries (free text)
	Source    string      `json:"source,omitempty"`  // "cv-import", "user", "app-xxx"
	CreatedAt time.Time   `json:"created_at"`
	UpdatedAt time.Time   `json:"updated_at"`
}

KBEntry is the unified wrapper for all knowledge base entries

func NewContextEntry

func NewContextEntry(category string, content string, source string) *KBEntry

NewContextEntry creates a new contextual KB entry

func NewProfileEntry

func NewProfileEntry(category ProfileCategory, data any, source string) *KBEntry

NewProfileEntry creates a new profile KB entry

func (*KBEntry) Validate

func (e *KBEntry) Validate() error

Validate checks if the KB entry is valid

type KBEntryType

type KBEntryType string

KBEntryType distinguishes between profile and contextual entries

const (
	KBTypeProfile KBEntryType = "profile"
	KBTypeContext KBEntryType = "context"
)

func (KBEntryType) IsValid

func (t KBEntryType) IsValid() bool

type LanguageEntry

type LanguageEntry struct {
	Language    string `json:"language"`
	Proficiency string `json:"proficiency,omitempty"` // e.g., "native", "fluent", "intermediate", "basic"
}

LanguageEntry holds spoken/written language proficiency

func (*LanguageEntry) Validate

func (l *LanguageEntry) Validate() error

type ProfileCategory

type ProfileCategory string

ProfileCategory defines the categories for structured profile data

const (
	CategoryContact        ProfileCategory = "contact"
	CategoryExperience     ProfileCategory = "experience"
	CategoryEducation      ProfileCategory = "education"
	CategorySkills         ProfileCategory = "skills"
	CategoryCertifications ProfileCategory = "certifications"
	CategoryLanguages      ProfileCategory = "languages"
)

func (ProfileCategory) IsValid

func (c ProfileCategory) IsValid() bool

type SkillsData

type SkillsData struct {
	Languages  []string `json:"languages,omitempty"` // Programming languages
	Frameworks []string `json:"frameworks,omitempty"`
	Tools      []string `json:"tools,omitempty"`
	Databases  []string `json:"databases,omitempty"`
	Cloud      []string `json:"cloud,omitempty"`
	Other      []string `json:"other,omitempty"`
}

SkillsData holds categorized skills

func (*SkillsData) IsEmpty

func (s *SkillsData) IsEmpty() bool

func (*SkillsData) Validate

func (s *SkillsData) Validate() error

type Status

type Status string
const (
	StatusApplied      Status = "applied"
	StatusInterviewing Status = "interviewing"
	StatusRejected     Status = "rejected"
	StatusOffer        Status = "offer"
)

func (Status) IsValid

func (s Status) IsValid() bool

Jump to

Keyboard shortcuts

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