metadata

package
v0.0.0-...-36df34d Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// If we have file systems in the wild, we will need to make sure we
	// are looking at consistent structure.
	FORMAT_VERSION = 2
)

Variables

This section is empty.

Functions

func ReadFat

func ReadFat(fat map[dirent.Id]*dirent.Dirent, reader util.ReadSeekCloser) (int, error)

Read a full fat into memory and return the version of of the version read. This function will not clear the given fat. However, the reader WILL be closed.

func ReadFatWithScanner

func ReadFatWithScanner(fat map[dirent.Id]*dirent.Dirent, scanner *bufio.Scanner) (int, error)

Same as the other read, but we will read directly from a scanner owned by someone else. This is expecially useful if there are multiple sections of metadata written to the same file.

func ReadGroups

func ReadGroups(groups map[identity.GroupId]*identity.Group, reader util.ReadSeekCloser) (int, error)

Read all groups into memory. This function will not clear the given groups. However, the reader WILL be closed.

func ReadGroupsWithScanner

func ReadGroupsWithScanner(groups map[identity.GroupId]*identity.Group, scanner *bufio.Scanner) (int, error)

Same as the other read, but we will read directly from a deocder owned by someone else. This is expecially useful if there are multiple sections of metadata written to the same file.

func ReadUsers

func ReadUsers(users map[identity.UserId]*identity.User, reader util.ReadSeekCloser) (int, error)

Read all users into memory. This function will not clear the given users. However, the reader WILL be closed.

func ReadUsersWithScanner

func ReadUsersWithScanner(users map[identity.UserId]*identity.User, scanner *bufio.Scanner) (int, error)

func WriteFat

func WriteFat(fat map[dirent.Id]*dirent.Dirent, version int, writer *cipherio.CipherWriter) error

Write a full fat. This function will not close the given writer.

func WriteGroups

func WriteGroups(groups map[identity.GroupId]*identity.Group, version int, writer *cipherio.CipherWriter) error

Write all groups. This function will not close the given writer.

func WriteUsers

func WriteUsers(users map[identity.UserId]*identity.User, version int, writer *cipherio.CipherWriter) error

Write all users. This function will not close the given writer.

Types

This section is empty.

Jump to

Keyboard shortcuts

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