disk

package
v0.0.0-...-ef927d8 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	YYYYMMDD  = "2006-01-02"
	HHMMSSSSS = "15:04:05.000"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

type Storage struct {
	// contains filtered or unexported fields
}

Storage implements the pulse.TemporaryStorage interface, and is used to store coding sessions on disk.

func NewStorage

func NewStorage() (*Storage, error)

NewStorage is used to create a new disk storage. It returns an error if it fails to create a "$HOME/.pulse" directory. Coding sessions will be written to within "$HOME/.pulse/tmp".

func (*Storage) Clean

func (s *Storage) Clean() error

func (*Storage) Read

func (s *Storage) Read() (pulse.Sessions, error)

Read is used to read all coding sessions from disk.

func (*Storage) Root

func (s *Storage) Root() string

Root returns the root directory for the storage.

func (*Storage) Write

func (s *Storage) Write(session pulse.Session) error

Write is used to write a coding session to disk.

Jump to

Keyboard shortcuts

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