internal

package
v2.0.0-...-a7fc2a4 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteToForest

func ByteToForest(byteArray []byte, object interface{}) error

ByteToForest Converts byte array representation of object

func Hash

func Hash(buffer []byte) (string, error)

Hash generate sha256 of buffer

func IsCompressed

func IsCompressed(buffer *bytes.Buffer) (bool, error)

IsCompressed checks if buffer is compressed by zlib

func Load

func Load(path string, forest interface{}) error

Load load forest from file

func Mkdir

func Mkdir(path string, perm os.FileMode) error

Mkdir helper, creates directory if not exists

func Save

func Save(object interface{}, path string, compress bool) (string, error)

Save Will save the state of the forest into file

func ToBytes

func ToBytes(object interface{}, compress bool) ([]byte, error)

ToBytes convert object to byte array, you can compress it with compress arg

func UnCompress

func UnCompress(reader io.Reader) (*bytes.Buffer, error)

UnCompress unzips

Types

This section is empty.

Jump to

Keyboard shortcuts

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