checklist

package
v0.0.0-...-a380f54 Latest Latest
Warning

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

Go to latest
Published: Sep 1, 2018 License: BSD-2-Clause Imports: 3 Imported by: 0

Documentation

Overview

Package checklist defines a collection of types for managing index checklists.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Store

type Store interface {
	// Set whether the path should be in the checklist.
	Set(index.Path, bool) error

	// Get whether the path is in the checklist.
	Get(index.Path) bool

	// List retuns a list of paths in the checklist.
	List() []index.Path
}

Store is an interface which defines methods necessary for setting and getting checklist items for index paths.

func NewStore

func NewStore(path string) (Store, error)

NewStore creates a basic implementation of a checklist store, using the given path as the source of data. Note: we do not enforce any locking on the underlying file, which is read once to initialise the store, and then overwritten after each call to Set.

Jump to

Keyboard shortcuts

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