fileIO

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadEncryptedZip added in v0.1.2

func ReadEncryptedZip(zipPath string) (map[string][]byte, error)

function to unzip and read encrypted folder

func WriteEncryptedZip added in v0.1.2

func WriteEncryptedZip(outPath string, files map[string][]byte) (retErr error)

func WriteKeyFile added in v0.1.2

func WriteKeyFile(data []byte, outPath string) error

Types

type FileIO

type FileIO struct {
	VaultDir  string
	MetaPath  string
	VaultPath string
	LogPath   string
}

func NewFileIO

func NewFileIO() *FileIO

constructor for fileIO

func (*FileIO) CheckMetaFile

func (f *FileIO) CheckMetaFile() bool

function to check if meta file exists

func (*FileIO) EnsureVaultDir

func (f *FileIO) EnsureVaultDir() error

function to make sure dir exists

func (*FileIO) IsEmpty added in v0.1.2

func (f *FileIO) IsEmpty() (bool, error)

function to check if vault exists

func (*FileIO) PrintPaths

func (f *FileIO) PrintPaths()

function to print all constant path

func (*FileIO) PurgeVault

func (f *FileIO) PurgeVault() error

function to purge all files and directory

func (*FileIO) ReadAll added in v0.1.2

func (f *FileIO) ReadAll() ([]byte, []byte, error)

read and return raw data of both file

func (*FileIO) ReadMeta

func (f *FileIO) ReadMeta() ([]byte, []byte, error)

function to read meta file

func (*FileIO) ReadVault

func (f *FileIO) ReadVault() ([]byte, error)

function to read vault file

func (*FileIO) WriteMeta

func (f *FileIO) WriteMeta(meta model.Meta) error

function to write to meta file

func (*FileIO) WriteSecret

func (f *FileIO) WriteSecret(data []byte) error

function to write to vault file

Jump to

Keyboard shortcuts

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