Documentation
¶
Index ¶
- type JSONManager
- func (fm *JSONManager[T]) Clear()
- func (fm *JSONManager[T]) Get(key string) T
- func (jm *JSONManager[T]) GetJSON(path string) (T, error)
- func (jm *JSONManager[T]) GetJSONBytes(key string, dat []byte) (T, error)
- func (fm *JSONManager[T]) Put(key string, value T)
- func (fm *JSONManager[T]) Remove(key string)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type JSONManager ¶
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)
Click to show internal directories.
Click to hide internal directories.