internal

package
v1.2.4 Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2024 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenRandomScalarValue

func GenRandomScalarValue(random *rand.Rand, name string, scalar *schema.ScalarType) any

GenRandomScalarValue generates random scalar value depending on its representation type

func GenRandomString

func GenRandomString(src *rand.Rand, n int) string

GenRandomString generate random string with fixed length

func WritePrettyFileJSON

func WritePrettyFileJSON(fileName string, data any, strategy WriteFileStrategy) error

WritePrettyFileJSON writes JSON data with indent

Types

type WriteFileStrategy

type WriteFileStrategy string

Decide the strategy to do when the written file exists

const (
	WriteFileStrategyNone     WriteFileStrategy = "none"
	WriteFileStrategyOverride WriteFileStrategy = "override"
)

func ParseWriteFileStrategy

func ParseWriteFileStrategy(input string) (WriteFileStrategy, error)

ParseWriteFileStrategy parses a WriteFileStrategy enum from string

Jump to

Keyboard shortcuts

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