state

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2024 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ReadFileFunc = os.ReadFile
View Source
var WriteFileFunc = os.WriteFile

WriteFileFunc binds to the WriteFile function used to save the statefile.

Functions

func WriteState

func WriteState(filepath string, s *State) error

Types

type FileReader

type FileReader interface {
	ReadFile(filepath string) ([]byte, error)
}

type FileWriter

type FileWriter interface {
	WriteFile(filepath string, data []byte, perm os.FileMode) error
}

FileWriter defines the WriteFile method for saving data to the filesystem.

type State

type State struct {
	SinceID int `json:"sinceID"`
	// contains filtered or unexported fields
}

func ReadState

func ReadState(stateFilePath string) (*State, error)

Jump to

Keyboard shortcuts

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