jobutils

package module
v0.0.0-...-79a34b5 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2023 License: MIT Imports: 8 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Job

type Job struct {
	Post *Post  `json:"post"`
	Tag  string `json:"tag"`
	Done bool   `json:"done"`
}

func NewJob

func NewJob(number int, title, url, tag string, done bool) *Job

type Post

type Post struct {
	Number int    `json:"number"`
	Title  string `json:"title"`
	URL    string `json:"url"`
}

type Store

type Store interface {
	GetWaitingJobsByTag(string) ([]*Job, error)
	MakeJobDone(job *Job) error
	SubmitJobIfNotExist(job *Job) (bool, error)
	Close() error
}

func NewFireStore

func NewFireStore(projectID string) (Store, error)

Jump to

Keyboard shortcuts

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