data

package
v2.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 8, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Buffer

type Buffer struct {
	LastAccess string                 `json:"lastAccess,omitempty"`
	Notes      map[string]models.Note `json:"notes"`
	// contains filtered or unexported fields
}

func NewBuffer

func NewBuffer(config *config.AppConfig) (*Buffer, error)

func (*Buffer) Load

func (b *Buffer) Load() error

First data load, if there's no file to load then it creates it.

func (*Buffer) Reload

func (b *Buffer) Reload() error

Reloads the data taking it from the expected file. If the file doesn't exists then throws an error and doesn't updates anything.

func (*Buffer) Save

func (b *Buffer) Save() error

Saves the current state of the data in the file. If the file doesn't exists then it will be created.

Jump to

Keyboard shortcuts

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