Skip to content

Instantly share code, notes, and snippets.

@percybolmer
Created September 11, 2021 12:04
Show Gist options
  • Save percybolmer/abbbc1170c468aff9dcb6f318f43f58e to your computer and use it in GitHub Desktop.
Save percybolmer/abbbc1170c468aff9dcb6f318f43f58e to your computer and use it in GitHub Desktop.
graphql
// Repository is used to specify whats needed to fulfill the job storage requirements
type Repository interface {
// GetJobs will search for all jobs related to and EmployeeID
GetJobs(employeeID, company string) ([]Job, error)
// GetJob will search for a certain job based on ID
GetJob(employeeID, jobid string) (Job, error)
// Update will take in a job and update the repository, it will return the new state of the job
Update(Job) (Job, error)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment