Documentation ¶
Overview ¶
Package util is a CLI tool for generating test exposure key data.
Index ¶
- func DecodeKey(b64key string) []byte
- func GenerateExposureKeys(numKeys, tr int, randomInterval bool) []v1.ExposureKey
- func GenerateKey() (string, error)
- func RandomArrValue(arr []string) (string, error)
- func RandomBytes(arrLen int) ([]byte, error)
- func RandomExposureKey(intervalNumber int32, intervalCount int32, transmissionRisk int) (v1.ExposureKey, error)
- func RandomInt(maxValue int) (int, error)
- func RandomIntWithMin(min, max int) (int, error)
- func RandomIntervalCount() (int32, error)
- func RandomReportType() (string, error)
- func RandomRevisedReportType() (string, error)
- func RandomTransmissionRisk() (int, error)
- func ToBase64(key []byte) string
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenerateExposureKeys ¶
func GenerateExposureKeys(numKeys, tr int, randomInterval bool) []v1.ExposureKey
GenerateExposureKeys creates the given number of exposure keys.
func RandomArrValue ¶
RandomArrValue chooses a random element from the array.
func RandomBytes ¶
RandomBytes generates a random byte sequence.
func RandomExposureKey ¶
func RandomExposureKey(intervalNumber int32, intervalCount int32, transmissionRisk int) (v1.ExposureKey, error)
RandomExposureKey creates a random exposure key.
func RandomIntWithMin ¶
RandomIntWithMin is inclusive, [min:max].
func RandomIntervalCount ¶
RandomIntervalCount produces a random interval.
func RandomReportType ¶
func RandomRevisedReportType ¶
func RandomTransmissionRisk ¶
RandomTransmissionRisk produces a random transmission risk score.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.