internaldb

package
v5.3.0 Latest Latest
Warning

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

Go to latest
Published: Nov 13, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

View Source
const DirPerms = fs.DirPerms
View Source
const ExampleDgutaDirParentSuffix = "dguta.dbs"

Variables

This section is empty.

Functions

func CreateCustomDGUTADB added in v5.1.0

func CreateCustomDGUTADB(t *testing.T, dgutaData string) (string, error)

CreateCustomDGUTADB creates a dguta database in a temp directory using the given dguta data, and returns the database directory.

func CreateDGUTADBFromFakeFiles added in v5.1.0

func CreateDGUTADBFromFakeFiles(t *testing.T, files []internaldata.TestFile,
	modtime ...time.Time) (*dguta.Tree, string, error)

func CreateExampleDGUTADB added in v5.1.0

func CreateExampleDGUTADB(t *testing.T, refUnixTime int64) (string, error)

CreateExampleDGUTADB creates a temporary dguta.db from some example data that uses your uid and 2 of your gids, and returns the path to the database directory. For use when testing something that needs a Tree.

func CreateExampleDGUTADBCustomIDs added in v5.1.0

func CreateExampleDGUTADBCustomIDs(t *testing.T, uid, gidA, gidB string, refUnixTime int64) (string, error)

CreateExampleDGUTADBCustomIDs creates a temporary dguta.db from some example data that uses the given uid and gids, and returns the path to the database directory.

func CreateExampleDGUTADBForBasedirs added in v5.1.0

func CreateExampleDGUTADBForBasedirs(t *testing.T, refTime int64) (*dguta.Tree, []string, error)

CreateExampleDGUTADBForBasedirs makes a tree database with data useful for testing basedirs, and returns it along with a slice of directories where the data is.

func GetUserAndGroups

func GetUserAndGroups(t *testing.T) (string, string, []string)

GetUserAndGroups returns the current users username, uid and gids.

Types

This section is empty.

Jump to

Keyboard shortcuts

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