Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FileStorage ¶
type FileStorage struct {
// contains filtered or unexported fields
}
func NewFileStorage ¶
func NewFileStorage(basePath string) *FileStorage
func (*FileStorage) HasFile ¶
func (fs *FileStorage) HasFile(key string) bool
func (*FileStorage) ListFiles ¶
func (fs *FileStorage) ListFiles() []string
func (*FileStorage) ReadRandFile ¶
func (fs *FileStorage) ReadRandFile() (File, error)
ReadRandFile reads a random file from the storage
func (*FileStorage) ReadRandFileWithExt ¶
func (fs *FileStorage) ReadRandFileWithExt(ext string) (File, error)
ReadRandFileWithExt reads a random file with the given extension from the storage
type FileStorageExt ¶
type FileStorageExt struct{}
func (*FileStorageExt) XFileStorage ¶
func (b *FileStorageExt) XFileStorage(call goja.ConstructorCall, rt *goja.Runtime) *goja.Object
XFileStorage creates a new FileStorage instance with the given base path. Usage in k6 scripts: `const storage = new FileStorage("./testdata");`
Click to show internal directories.
Click to hide internal directories.