job

package
v0.0.0-...-b0b2d72 Latest Latest
Warning

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

Go to latest
Published: Sep 16, 2021 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InMemoryRepository

type InMemoryRepository struct {
	sync.Mutex
	// contains filtered or unexported fields
}

func NewMemoryRepository

func NewMemoryRepository() *InMemoryRepository

NewMemoryRepository initializes a memory with mock data

func (*InMemoryRepository) GetJob

func (imr *InMemoryRepository) GetJob(employeeID, jobID string) (Job, error)

func (*InMemoryRepository) GetJobs

func (imr *InMemoryRepository) GetJobs(employeeID string, companyName string) ([]Job, error)

GetJobs returns all jobs for a certain Employee

func (*InMemoryRepository) Update

func (imr *InMemoryRepository) Update(j Job) (Job, error)

type Job

type Job struct {
	ID         string `json:"id"`
	EmployeeID string `json:"employeeID"`
	Company    string `json:"company"`
	Title      string `json:"title"`
	Start      string `json:"start"`
	End        string `json:"end"`
}

type Repository

type Repository interface {
	GetJobs(employeeID, company string) ([]Job, error)
	GetJob(employeeID, jobid string) (Job, error)
	Update(Job) (Job, error)
}

Jump to

Keyboard shortcuts

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