storage

package
v1.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FileExists

func FileExists(path string) (bool, error)

Types

type Config

type Config struct {
	FilePath string
}

type Handler

type Handler[T any] struct {
	// contains filtered or unexported fields
}

func New

func New[T any](config Config) (*Handler[T], error)

func (*Handler[T]) Clear

func (h *Handler[T]) Clear() error

func (*Handler[T]) Data

func (h *Handler[T]) Data() T

func (*Handler[T]) Update

func (h *Handler[T]) Update(callback func(T) T) (T, error)

Jump to

Keyboard shortcuts

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