Documentation
¶
Index ¶
- Constants
- Variables
- func GenerateBucketNameCharacters() []rune
- func GenerateCommonSafeCharacters() []rune
- func GenerateEC2AccessKeyCharacters() []rune
- func GenerateEC2SecretKeyCharacters() []rune
- func GeneratePasswordCharacters() []rune
- func GenerateS3AvoidCharacters() []rune
- func GenerateS3SafeCharacters() []rune
- func GenerateS3SpecialHandlingCharacters() []rune
- func GenerateUsernameCharacters() []rune
- type BucketNameGenerator
- type CommonObjectGenerator
- type CommonObjectGeneratorOptions
- func WithContentLengthhRange(min uint32, max uint32) CommonObjectGeneratorOptions
- func WithNameCharacters(chars []rune) CommonObjectGeneratorOptions
- func WithNameLengthRange(min uint32, max uint32) CommonObjectGeneratorOptions
- func WithVersionRange(min uint32, max uint32) CommonObjectGeneratorOptions
- func WithVersioned() CommonObjectGeneratorOptions
- type ContentFiller
- type CredentialsGenerator
- type DepthFirstTreeNodeIterator
- type DepthFirstTreeValueIterator
- type DummyObjectGenerator
- type EC2Credentials
- type EC2CredentialsGenerator
- type GeneratedObject
- func (r *GeneratedObject) ContentReaderIterator() iter.Seq2[uint64, *GeneratedObjectContentReader]
- func (r *GeneratedObject) GetContentReader() *GeneratedObjectContentReader
- func (r *GeneratedObject) GetFirstVersionContentReader() *GeneratedObjectContentReader
- func (r *GeneratedObject) GetFullPath() string
- func (r *GeneratedObject) GetLastVersionContentReader() *GeneratedObjectContentReader
- func (r *GeneratedObject) GetNodeType() TreeNodeType
- func (r *GeneratedObject) GetVersionContentReader(versionIdx uint64) *GeneratedObjectContentReader
- func (r *GeneratedObject) GetVersionCount() uint64
- type GeneratedObjectContentReader
- type GeneratorRange
- type KeystoneNameGenerator
- type ObjectGenerator
- type ObjectInfo
- type Queue
- type QueueNode
- type Rnd
- func (r *Rnd) Bool() bool
- func (r *Rnd) Int64() int64
- func (r *Rnd) Int64InRange(min int64, max int64) int64
- func (r *Rnd) IntInRange(min int, max int) int
- func (r *Rnd) Read(p []byte)
- func (r *Rnd) StringFromAlphabet(alphabet string, resultLength int64) string
- func (r *Rnd) StringFromRunes(alphabet []rune, resultLength int64) string
- func (r *Rnd) VarLengthStringFromAlphabet(alphabet string, minLength int64, maxLength int64) string
- func (r *Rnd) VarLengthStringFromRunes(alphabet []rune, minLength int64, maxLength int64) string
- type S3Filler
- type S3Validator
- type Stack
- type StackNode
- type SwiftFiller
- type SwiftValidator
- type Tree
- type TreeGenerationTask
- type TreeGenerator
- type TreeGeneratorOption
- func WithDepthRange[T any](min uint32, max uint32) TreeGeneratorOption[T]
- func WithForceTargetDepth[T any]() TreeGeneratorOption[T]
- func WithObjectGenerator[T any](generator ObjectGenerator[T]) TreeGeneratorOption[T]
- func WithRandomSeed[T any](seed int64) TreeGeneratorOption[T]
- func WithRnd[T any](rnd *Rnd) TreeGeneratorOption[T]
- func WithWidthRange[T any](min uint32, max uint32) TreeGeneratorOption[T]
- type TreeGeneratorWithDepthRangeOption
- type TreeGeneratorWithForceTargetDepthOption
- type TreeGeneratorWithObjectGeneratorOption
- type TreeGeneratorWithRandomSeedOption
- type TreeGeneratorWithRndOption
- type TreeGeneratorWithWidthRangeOption
- type TreeNode
- type TreeNodeType
- type TreeRandomElementPicker
- func (r *TreeRandomElementPicker[T]) RandomJointNode() *TreeNode[T]
- func (r *TreeRandomElementPicker[T]) RandomJointSubtree() *Tree[T]
- func (r *TreeRandomElementPicker[T]) RandomJointValue() T
- func (r *TreeRandomElementPicker[T]) RandomLeafNode() *TreeNode[T]
- func (r *TreeRandomElementPicker[T]) RandomLeafValue() T
- func (r *TreeRandomElementPicker[T]) RootNode() *TreeNode[T]
- func (r *TreeRandomElementPicker[T]) RootValue() T
- type UsernamePassword
- type UsernamePasswordGenerator
- type WidthFirstTreeNodeIterator
- type WidthFirstTreeValueIterator
Constants ¶
View Source
const ( CTestGenSeed = 811509576612567777 CUseTestGenSeed = false )
View Source
const (
CEC2CredsType = "ec2"
)
Variables ¶
View Source
var (
ErrEmptyIterator = errors.New("iterator is empty")
)
View Source
var (
ErrEmptyQueue = errors.New("queue is empty")
)
View Source
var (
ErrEmptyStack = errors.New("stack is empty")
)
Functions ¶
func GenerateBucketNameCharacters ¶ added in v0.7.1
func GenerateBucketNameCharacters() []rune
func GenerateCommonSafeCharacters ¶ added in v0.7.1
func GenerateCommonSafeCharacters() []rune
func GenerateEC2AccessKeyCharacters ¶ added in v0.7.1
func GenerateEC2AccessKeyCharacters() []rune
func GenerateEC2SecretKeyCharacters ¶ added in v0.7.1
func GenerateEC2SecretKeyCharacters() []rune
func GeneratePasswordCharacters ¶ added in v0.7.1
func GeneratePasswordCharacters() []rune
func GenerateS3AvoidCharacters ¶
func GenerateS3AvoidCharacters() []rune
func GenerateS3SafeCharacters ¶
func GenerateS3SafeCharacters() []rune
func GenerateS3SpecialHandlingCharacters ¶
func GenerateS3SpecialHandlingCharacters() []rune
func GenerateUsernameCharacters ¶ added in v0.7.1
func GenerateUsernameCharacters() []rune
Types ¶
type BucketNameGenerator ¶ added in v0.7.1
type BucketNameGenerator struct {
NameAlphabet []rune
}
func NewBucketNameGenerator ¶ added in v0.7.1
func NewBucketNameGenerator() *BucketNameGenerator
func (*BucketNameGenerator) Generate ¶ added in v0.7.1
func (r *BucketNameGenerator) Generate(rnd *Rnd) string
Rules are more complex https://docs.aws.amazon.com/AmazonS3/latest/userguide/bucketnamingrules.html Approaching with easy and safe option
type CommonObjectGenerator ¶ added in v0.7.1
type CommonObjectGenerator struct {
// contains filtered or unexported fields
}
func NewCommonObjectGenerator ¶ added in v0.7.1
func NewCommonObjectGenerator(opts ...CommonObjectGeneratorOptions) *CommonObjectGenerator
func (*CommonObjectGenerator) Generate ¶ added in v0.7.1
func (r *CommonObjectGenerator) Generate(rnd *Rnd, nodeType TreeNodeType, parentData *GeneratedObject) (*GeneratedObject, error)
type CommonObjectGeneratorOptions ¶ added in v0.7.1
type CommonObjectGeneratorOptions func(gen *CommonObjectGenerator)
func WithContentLengthhRange ¶
func WithContentLengthhRange(min uint32, max uint32) CommonObjectGeneratorOptions
func WithNameCharacters ¶
func WithNameCharacters(chars []rune) CommonObjectGeneratorOptions
func WithNameLengthRange ¶
func WithNameLengthRange(min uint32, max uint32) CommonObjectGeneratorOptions
func WithVersionRange ¶
func WithVersionRange(min uint32, max uint32) CommonObjectGeneratorOptions
func WithVersioned ¶
func WithVersioned() CommonObjectGeneratorOptions
type ContentFiller ¶ added in v0.7.1
type CredentialsGenerator ¶ added in v0.7.1
type CredentialsGenerator struct {
// contains filtered or unexported fields
}
func NewCredentialsGenerator ¶ added in v0.7.1
func NewCredentialsGenerator(rnd *Rnd) *CredentialsGenerator
func (*CredentialsGenerator) GenerateBucketName ¶ added in v0.7.1
func (r *CredentialsGenerator) GenerateBucketName() string
func (*CredentialsGenerator) GenerateEC2Credentials ¶ added in v0.7.1
func (r *CredentialsGenerator) GenerateEC2Credentials() *EC2Credentials
func (*CredentialsGenerator) GenerateKeystoneName ¶ added in v0.7.1
func (r *CredentialsGenerator) GenerateKeystoneName() string
func (*CredentialsGenerator) GenerateUsernamePassword ¶ added in v0.7.1
func (r *CredentialsGenerator) GenerateUsernamePassword() *UsernamePassword
type DepthFirstTreeNodeIterator ¶
type DepthFirstTreeNodeIterator[T any] struct { // contains filtered or unexported fields }
func (*DepthFirstTreeNodeIterator[T]) HasNext ¶
func (r *DepthFirstTreeNodeIterator[T]) HasNext() bool
func (*DepthFirstTreeNodeIterator[T]) Must ¶
func (r *DepthFirstTreeNodeIterator[T]) Must() iter.Seq[*TreeNode[T]]
func (*DepthFirstTreeNodeIterator[T]) Next ¶
func (r *DepthFirstTreeNodeIterator[T]) Next() (*TreeNode[T], error)
type DepthFirstTreeValueIterator ¶
type DepthFirstTreeValueIterator[T any] struct { DepthFirstTreeNodeIterator[T] }
func (*DepthFirstTreeValueIterator[T]) Must ¶
func (r *DepthFirstTreeValueIterator[T]) Must() iter.Seq[T]
func (*DepthFirstTreeValueIterator[T]) Next ¶
func (r *DepthFirstTreeValueIterator[T]) Next() (T, error)
type DummyObjectGenerator ¶
type DummyObjectGenerator[T any] struct{}
func NewDummyObjectGenerator ¶
func NewDummyObjectGenerator[T any]() *DummyObjectGenerator[T]
func (*DummyObjectGenerator[T]) Generate ¶
func (r *DummyObjectGenerator[T]) Generate(_ *Rnd, _ TreeNodeType, _ T) (T, error)
type EC2Credentials ¶ added in v0.7.1
type EC2CredentialsGenerator ¶ added in v0.7.1
func NewEC2CredentialsGenerator ¶ added in v0.7.1
func NewEC2CredentialsGenerator() *EC2CredentialsGenerator
func (*EC2CredentialsGenerator) Generate ¶ added in v0.7.1
func (r *EC2CredentialsGenerator) Generate(rnd *Rnd) *EC2Credentials
type GeneratedObject ¶ added in v0.7.1
type GeneratedObject struct {
// contains filtered or unexported fields
}
func (*GeneratedObject) ContentReaderIterator ¶ added in v0.7.1
func (r *GeneratedObject) ContentReaderIterator() iter.Seq2[uint64, *GeneratedObjectContentReader]
func (*GeneratedObject) GetContentReader ¶ added in v0.7.1
func (r *GeneratedObject) GetContentReader() *GeneratedObjectContentReader
func (*GeneratedObject) GetFirstVersionContentReader ¶ added in v0.7.1
func (r *GeneratedObject) GetFirstVersionContentReader() *GeneratedObjectContentReader
func (*GeneratedObject) GetFullPath ¶ added in v0.7.1
func (r *GeneratedObject) GetFullPath() string
func (*GeneratedObject) GetLastVersionContentReader ¶ added in v0.7.1
func (r *GeneratedObject) GetLastVersionContentReader() *GeneratedObjectContentReader
func (*GeneratedObject) GetNodeType ¶ added in v0.7.1
func (r *GeneratedObject) GetNodeType() TreeNodeType
func (*GeneratedObject) GetVersionContentReader ¶ added in v0.7.1
func (r *GeneratedObject) GetVersionContentReader(versionIdx uint64) *GeneratedObjectContentReader
func (*GeneratedObject) GetVersionCount ¶ added in v0.7.1
func (r *GeneratedObject) GetVersionCount() uint64
type GeneratedObjectContentReader ¶ added in v0.7.1
type GeneratedObjectContentReader struct {
// contains filtered or unexported fields
}
func NewGeneratedObjectContentReader ¶ added in v0.7.1
func NewGeneratedObjectContentReader(seed int64, contentLengthRange *GeneratorRange) *GeneratedObjectContentReader
func (*GeneratedObjectContentReader) Len ¶ added in v0.7.1
func (r *GeneratedObjectContentReader) Len() uint64
type GeneratorRange ¶
type KeystoneNameGenerator ¶ added in v0.7.1
type KeystoneNameGenerator struct {
NameAlphabet []rune
}
func NewKeystoneNameGenerator ¶ added in v0.7.1
func NewKeystoneNameGenerator() *KeystoneNameGenerator
func (*KeystoneNameGenerator) Generate ¶ added in v0.7.1
func (r *KeystoneNameGenerator) Generate(rnd *Rnd) string
type ObjectGenerator ¶
type ObjectGenerator[T any] interface { Generate(rnd *Rnd, nodeType TreeNodeType, parentData T) (T, error) }
type ObjectInfo ¶ added in v0.7.1
type Rnd ¶
type Rnd struct {
// contains filtered or unexported fields
}
func (*Rnd) StringFromAlphabet ¶
func (*Rnd) StringFromRunes ¶
func (*Rnd) VarLengthStringFromAlphabet ¶
type S3Filler ¶
type S3Filler struct {
// contains filtered or unexported fields
}
func NewS3Filler ¶
func NewS3Filler(tree *Tree[*GeneratedObject], client *minio.Client) *S3Filler
func (*S3Filler) FillBucket ¶ added in v0.7.1
type S3Validator ¶
type S3Validator struct {
// contains filtered or unexported fields
}
func NewS3Validator ¶
func NewS3Validator(tree *Tree[*GeneratedObject], client *minio.Client) *S3Validator
type SwiftFiller ¶ added in v0.7.1
type SwiftFiller struct {
// contains filtered or unexported fields
}
func NewSwiftFiller ¶ added in v0.7.1
func NewSwiftFiller(tree *Tree[*GeneratedObject], client *gophercloud.ServiceClient) *SwiftFiller
func (*SwiftFiller) FillBucket ¶ added in v0.7.1
func (r *SwiftFiller) FillBucket(ctx context.Context, bucket string) error
func (*SwiftFiller) FillBucketWithLastVersions ¶ added in v0.7.1
func (r *SwiftFiller) FillBucketWithLastVersions(ctx context.Context, bucket string) error
type SwiftValidator ¶ added in v0.7.1
type SwiftValidator struct {
// contains filtered or unexported fields
}
func NewSwiftValidator ¶ added in v0.7.1
func NewSwiftValidator(tree *Tree[*GeneratedObject], client *gophercloud.ServiceClient) *SwiftValidator
type Tree ¶
type Tree[T any] struct { // contains filtered or unexported fields }
func (*Tree[T]) DepthFirstNodeIterator ¶
func (r *Tree[T]) DepthFirstNodeIterator() *DepthFirstTreeNodeIterator[T]
func (*Tree[T]) DepthFirstValueIterator ¶
func (r *Tree[T]) DepthFirstValueIterator() *DepthFirstTreeValueIterator[T]
func (*Tree[T]) WidthFirstNodeIterator ¶
func (r *Tree[T]) WidthFirstNodeIterator() *WidthFirstTreeNodeIterator[T]
func (*Tree[T]) WidthFirstValueIterator ¶
func (r *Tree[T]) WidthFirstValueIterator() *WidthFirstTreeValueIterator[T]
type TreeGenerationTask ¶
type TreeGenerationTask[T any] struct { // contains filtered or unexported fields }
type TreeGenerator ¶
type TreeGenerator[T any] struct { // contains filtered or unexported fields }
func NewTreeGenerator ¶
func NewTreeGenerator[T any](opts ...TreeGeneratorOption[T]) (*TreeGenerator[T], error)
func (*TreeGenerator[T]) Generate ¶
func (r *TreeGenerator[T]) Generate() (*Tree[T], error)
type TreeGeneratorOption ¶
type TreeGeneratorOption[T any] interface { // contains filtered or unexported methods }
func WithDepthRange ¶
func WithDepthRange[T any](min uint32, max uint32) TreeGeneratorOption[T]
func WithForceTargetDepth ¶
func WithForceTargetDepth[T any]() TreeGeneratorOption[T]
func WithObjectGenerator ¶
func WithObjectGenerator[T any](generator ObjectGenerator[T]) TreeGeneratorOption[T]
func WithRandomSeed ¶
func WithRandomSeed[T any](seed int64) TreeGeneratorOption[T]
func WithRnd ¶
func WithRnd[T any](rnd *Rnd) TreeGeneratorOption[T]
func WithWidthRange ¶
func WithWidthRange[T any](min uint32, max uint32) TreeGeneratorOption[T]
type TreeGeneratorWithDepthRangeOption ¶
type TreeGeneratorWithDepthRangeOption[T any] struct { // contains filtered or unexported fields }
type TreeGeneratorWithForceTargetDepthOption ¶
type TreeGeneratorWithForceTargetDepthOption[T any] struct{}
type TreeGeneratorWithObjectGeneratorOption ¶
type TreeGeneratorWithObjectGeneratorOption[T any] struct { // contains filtered or unexported fields }
type TreeGeneratorWithRandomSeedOption ¶
type TreeGeneratorWithRandomSeedOption[T any] struct { // contains filtered or unexported fields }
type TreeGeneratorWithRndOption ¶
type TreeGeneratorWithRndOption[T any] struct { // contains filtered or unexported fields }
type TreeGeneratorWithWidthRangeOption ¶
type TreeGeneratorWithWidthRangeOption[T any] struct { // contains filtered or unexported fields }
type TreeNodeType ¶
type TreeNodeType int
const ( CRootTreeNodeType TreeNodeType = iota + 1 CJointTreeNodeType CLeafTreeNodeType )
type TreeRandomElementPicker ¶
type TreeRandomElementPicker[T any] struct { // contains filtered or unexported fields }
func NewTreeRandomElementPicker ¶
func NewTreeRandomElementPicker[T any](tree *Tree[T], rnd *Rnd) *TreeRandomElementPicker[T]
func (*TreeRandomElementPicker[T]) RandomJointNode ¶
func (r *TreeRandomElementPicker[T]) RandomJointNode() *TreeNode[T]
func (*TreeRandomElementPicker[T]) RandomJointSubtree ¶
func (r *TreeRandomElementPicker[T]) RandomJointSubtree() *Tree[T]
func (*TreeRandomElementPicker[T]) RandomJointValue ¶
func (r *TreeRandomElementPicker[T]) RandomJointValue() T
func (*TreeRandomElementPicker[T]) RandomLeafNode ¶
func (r *TreeRandomElementPicker[T]) RandomLeafNode() *TreeNode[T]
func (*TreeRandomElementPicker[T]) RandomLeafValue ¶
func (r *TreeRandomElementPicker[T]) RandomLeafValue() T
func (*TreeRandomElementPicker[T]) RootNode ¶
func (r *TreeRandomElementPicker[T]) RootNode() *TreeNode[T]
func (*TreeRandomElementPicker[T]) RootValue ¶
func (r *TreeRandomElementPicker[T]) RootValue() T
type UsernamePassword ¶ added in v0.7.1
type UsernamePasswordGenerator ¶ added in v0.7.1
func NewUsernamePasswordGenerator ¶ added in v0.7.1
func NewUsernamePasswordGenerator() *UsernamePasswordGenerator
func (*UsernamePasswordGenerator) Generate ¶ added in v0.7.1
func (r *UsernamePasswordGenerator) Generate(rnd *Rnd) *UsernamePassword
type WidthFirstTreeNodeIterator ¶
type WidthFirstTreeNodeIterator[T any] struct { // contains filtered or unexported fields }
func (*WidthFirstTreeNodeIterator[T]) HasNext ¶
func (r *WidthFirstTreeNodeIterator[T]) HasNext() bool
func (*WidthFirstTreeNodeIterator[T]) Must ¶
func (r *WidthFirstTreeNodeIterator[T]) Must() iter.Seq[*TreeNode[T]]
func (*WidthFirstTreeNodeIterator[T]) Next ¶
func (r *WidthFirstTreeNodeIterator[T]) Next() (*TreeNode[T], error)
type WidthFirstTreeValueIterator ¶
type WidthFirstTreeValueIterator[T any] struct { WidthFirstTreeNodeIterator[T] }
func (*WidthFirstTreeValueIterator[T]) Must ¶
func (r *WidthFirstTreeValueIterator[T]) Must() iter.Seq[T]
func (*WidthFirstTreeValueIterator[T]) Next ¶
func (r *WidthFirstTreeValueIterator[T]) Next() (T, error)
Click to show internal directories.
Click to hide internal directories.