storage

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage is a struct that represents a file storage

func NewStorage

func NewStorage(filename string) *Storage

NewStorage creates a new instance of Storage

func (*Storage) Create

func (s *Storage) Create(content []byte) error

Create creates a file with the given content

func (*Storage) Delete

func (s *Storage) Delete() error

Delete deletes the file

func (*Storage) Read

func (s *Storage) Read() ([]byte, error)

Read reads the file content

func (*Storage) Update

func (s *Storage) Update(newContent []byte) error

Update updates the file content

Jump to

Keyboard shortcuts

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