storage

package
v1.0.20 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2024 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	FilePath string
	FileMode os.FileMode
}

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() (T, 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