jsonmanager

package
v0.0.0-...-90f0e2a Latest Latest
Warning

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

Go to latest
Published: Jun 16, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type JSONManager

type JSONManager[T any] struct {
	FS fs.FS
	// contains filtered or unexported fields
}

func Create

func Create[T any]() *JSONManager[T]

func CreateWithFS

func CreateWithFS[T any](filesystem fs.FS) *JSONManager[T]

func (*JSONManager[T]) Clear

func (fm *JSONManager[T]) Clear()

This function will remove all json data in this Manager.

func (*JSONManager[T]) Get

func (fm *JSONManager[T]) Get(key string) T

func (*JSONManager[T]) GetJSON

func (jm *JSONManager[T]) GetJSON(path string) (T, error)

func (*JSONManager[T]) GetJSONBytes

func (jm *JSONManager[T]) GetJSONBytes(key string, dat []byte) (T, error)

func (*JSONManager[T]) Put

func (fm *JSONManager[T]) Put(key string, value T)

func (*JSONManager[T]) Remove

func (fm *JSONManager[T]) Remove(key string)

Jump to

Keyboard shortcuts

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