sessions

package
v0.0.0-...-5a4b634 Latest Latest
Warning

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

Go to latest
Published: May 29, 2022 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Key = []byte("session")

Functions

func NewStore

func NewStore(path string, intervals int) (*store, error)

Types

type Session

type Session struct {
	Current Type `json:"current"`
	Count   int  `json:"count"`
}

func (Session) Next

func (s Session) Next(intervals int) Type

type Store

type Store interface {
	Current() (Type, error)
	Next() (Type, error)
	Reset() error
	Increment() error
	Session() (*Session, error)
}

type Type

type Type string
const (
	Focus Type = "focus"
	Short Type = "short"
	Long  Type = "long"
)

Jump to

Keyboard shortcuts

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