memorystore

package
v0.0.0-...-ecdd364 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2022 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

Package memorystore provides read and write access to memory.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MemoryStore

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

MemoryStore represents a file in memory.

func New

func New() *MemoryStore

New returns a local filesystem object with a file path.

func (*MemoryStore) Initalize

func (s *MemoryStore) Initalize(content string)

Initalize sets the initial content if it's empty.

func (*MemoryStore) Load

func (s *MemoryStore) Load() ([]byte, error)

Load returns a file contents from the filesystem.

func (*MemoryStore) Save

func (s *MemoryStore) Save(b []byte) error

Save writes a file to the filesystem and returns an error if one occurs.

Jump to

Keyboard shortcuts

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