boxtools

package
v0.0.0-...-8003347 Latest Latest
Warning

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

Go to latest
Published: Mar 18, 2015 License: MIT Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ApplyFileActionsToFileSystemFileTable

func ApplyFileActionsToFileSystemFileTable(fileActions []structs.FileAction, user structs.User) (errs []error)

func CleanTestFolder

func CleanTestFolder(path string, ignores map[string]bool, rootDir bool) (err error)

func ComputeFilesFromFileActions

func ComputeFilesFromFileActions(fileActions []structs.FileAction) (files []structs.File)

func ConvertFileActionStructToJsonString

func ConvertFileActionStructToJsonString(fileActionStruct structs.FileAction) (fileActionJson string, err error)

func ConvertJsonStringToFileActionsStruct

func ConvertJsonStringToFileActionsStruct(jsonFileAction string, client structs.Client) (fileAction structs.FileAction, err error)

func FindFile

func FindFile(hash string, path string, user structs.User) (file structs.File, err error)

func GenerateFilePathFromRoot

func GenerateFilePathFromRoot(root string, depth int) string

func GenerateNoisyAndNonNoisyFileActions

func GenerateNoisyAndNonNoisyFileActions(user_id int, clients int, totalNonNoisyActions int, createPairs int) (nonNoisyActions []structs.FileAction,
	noisyActions []structs.FileAction, err error)

func GenerateRandomBytes

func GenerateRandomBytes(n int) []byte

func GenerateRandomFile

func GenerateRandomFile(user_id int) (file structs.File, err error)

func GenerateRandomFileAction

func GenerateRandomFileAction(client_id int, user_id int, isCreate bool) (fileAction structs.FileAction, err error)

func GenerateRandomSha256

func GenerateRandomSha256() (s string, err error)

func GenerateSliceOfRandomFileActions

func GenerateSliceOfRandomFileActions(user_id int, clients int, actions int) (fileActions []structs.FileAction, err error)

func NewClient

func NewClient(user structs.User, name string, isServer bool) (client structs.Client, err error)

func NewUser

func NewUser(email string, password string) (user structs.User, err error)

func RandomString

func RandomString(n int) string

func RemoveRedundancyFromFileActions

func RemoveRedundancyFromFileActions(fileActions []structs.FileAction) (simplifiedFileActions []structs.FileAction)

func SimulateFilesystemChanges

func SimulateFilesystemChanges(dir string, inserts int, alters int, deletes int)

func ValidateUserPassword

func ValidateUserPassword(email, password string) (user structs.User, err error)

func WriteFileActionsToDatabase

func WriteFileActionsToDatabase(fileActions []structs.FileAction,
	client structs.Client) (outPutFileActions []structs.FileAction,
	err error)

func WriteRandomFileContent

func WriteRandomFileContent(path string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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