Copyright (C) 2017-2019 The Open Library Foundation. This software is distributed under the terms of the Apache License, Version 2.0. See the file LICENSE for more information.
- Go 1.12 or later
This purpose of this repo is to generate large amounts of fake FOLIO data to support the LDP analytics team.
To download and install:
go get -u github.com/folio-org/ldp-testdata/...
Run the command from the project root:
cd ~/go/src/folio-org/ldp-testdata
~/go/bin/ldp-testdata
~/go/bin/ldp-testdata [FLAGS]
All flags are optional
-dataFormat string
The outputted data format [folioJSON|jsonArray] (default "folioJSON")
-dir string
The directory to store output
-fileDefs string
The filepath of the JSON file definitions (default "filedefs.json")
-indent
Whether to pretty-print the output (default true)
-json string
JSON array to override the number of objects set filedefs.json
Example: '[{"path": "/loan-storage/loans", "n":50000}]'
-logLevel string
The log level (Trace, Debug, Info, Warning, Error, Fatal and Panic) (default "Info")
-only-json
Use with the -json flag to ignore filedefs.json
Edit filedefs.json to change the number of objects created for each path, or
use the -json
flag to override the number of objects set in filedefs.json
~/go/bin/ldp-testdata -json='[{"path": "/loan-storage/loans", "n":50000}]'