jsonfile

package
v1.7.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JsonFile

type JsonFile[T any] struct {
	sync.Mutex
	FilePath string
}

func NewJsonFile

func NewJsonFile[T any](filePath string) *JsonFile[T]

func (*JsonFile[T]) Create

func (j *JsonFile[T]) Create(obj *T) error

func (*JsonFile[T]) Delete

func (j *JsonFile[T]) Delete() error

func (*JsonFile[T]) Load added in v1.7.0

func (j *JsonFile[T]) Load(obj *T) error

func (*JsonFile[T]) Read

func (j *JsonFile[T]) Read() (*T, error)

func (*JsonFile[T]) Update

func (j *JsonFile[T]) Update(fn func(*T)) error

Jump to

Keyboard shortcuts

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