storage

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: 5 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultFilePath = "applications.jsonl"
View Source
const DefaultKBFilePath = "candidate-kb.jsonl"

Variables

This section is empty.

Functions

This section is empty.

Types

type KBStorage

type KBStorage struct {
	// contains filtered or unexported fields
}

func NewKBStorage

func NewKBStorage(filePath string) *KBStorage

func (*KBStorage) Add

func (s *KBStorage) Add(entry *models.KBEntry) error

func (*KBStorage) Get

func (s *KBStorage) Get(id string) (*models.KBEntry, error)

func (*KBStorage) GetByCategory

func (s *KBStorage) GetByCategory(category string) ([]*models.KBEntry, error)

GetByCategory returns all entries of a specific category

func (*KBStorage) GetByType

func (s *KBStorage) GetByType(entryType models.KBEntryType) ([]*models.KBEntry, error)

GetByType returns all entries of a specific type

func (*KBStorage) GetContact

func (s *KBStorage) GetContact() (*models.KBEntry, error)

GetContact returns the contact profile entry (there should be at most one)

func (*KBStorage) GetContext

func (s *KBStorage) GetContext() ([]*models.KBEntry, error)

GetContext returns all contextual entries

func (*KBStorage) GetEducation

func (s *KBStorage) GetEducation() ([]*models.KBEntry, error)

GetEducation returns all education entries

func (*KBStorage) GetExperience

func (s *KBStorage) GetExperience() ([]*models.KBEntry, error)

GetExperience returns all experience entries

func (*KBStorage) GetProfile

func (s *KBStorage) GetProfile() ([]*models.KBEntry, error)

GetProfile returns all profile entries

func (*KBStorage) GetSkills

func (s *KBStorage) GetSkills() (*models.KBEntry, error)

GetSkills returns the skills profile entry (there should be at most one)

func (*KBStorage) Load

func (s *KBStorage) Load() ([]*models.KBEntry, error)

func (*KBStorage) Remove

func (s *KBStorage) Remove(id string) error

func (*KBStorage) Save

func (s *KBStorage) Save(entries []*models.KBEntry) error

func (*KBStorage) Update

func (s *KBStorage) Update(id string, updateFn func(*models.KBEntry)) error

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

func New

func New(filePath string) *Storage

func (*Storage) Add

func (s *Storage) Add(app *models.Application) error

func (*Storage) Get

func (s *Storage) Get(id string) (*models.Application, error)

func (*Storage) Load

func (s *Storage) Load() ([]*models.Application, error)

func (*Storage) Remove

func (s *Storage) Remove(id string) error

func (*Storage) Save

func (s *Storage) Save(apps []*models.Application) error

func (*Storage) Update

func (s *Storage) Update(id string, updateFn func(*models.Application)) error

Jump to

Keyboard shortcuts

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