datastore

package
v0.0.0-...-f6ab670 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package datastore provides interface to read and write json data from/to disk

Index

Constants

View Source
const (
	ReadWriteAccess        = 0600
	ReadWriteExecuteAccess = 0700
)

Variables

This section is empty.

Functions

This section is empty.

Types

type IStore

type IStore interface {
	Write(datajson string, path string, name string) error
	Read(name string, dest interface{}) error
}

type LocalFileStore

type LocalFileStore struct {
	// contains filtered or unexported fields
}

func NewLocalFileStore

func NewLocalFileStore(log log.T) *LocalFileStore

NewLocalFileStore returns a local file store

func (*LocalFileStore) Read

func (localFileStore *LocalFileStore) Read(filename string, dest interface{}) error

Read reads data from disk

func (*LocalFileStore) Write

func (localFileStore *LocalFileStore) Write(datajson string, path string, filename string) error

Write writes data into disk

Directories

Path Synopsis
Package filesystem contains related functions from os, io, and io/ioutil packages
Package filesystem contains related functions from os, io, and io/ioutil packages

Jump to

Keyboard shortcuts

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