dataproviders

package
v0.0.0-...-46cc183 Latest Latest
Warning

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

Go to latest
Published: Apr 7, 2025 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BatchBuilder

type BatchBuilder struct {
	// contains filtered or unexported fields
}

func NewBatchBuilder

func NewBatchBuilder(rowBuilder StructValue, batchSize uint64) *BatchBuilder

func (*BatchBuilder) BuildBatch

func (builder *BatchBuilder) BuildBatch() []map[string]interface{}

type ClickhouseFieldRaw

type ClickhouseFieldRaw struct {
	ValueType string                 `json:"valueType"`
	Config    map[string]interface{} `json:"config"`
}

type ClickhouseInsertJob

type ClickhouseInsertJob struct {
	// Size of each batch to build
	BatchSize int64

	TableName string

	PartitionId int
	Partitions  int

	Schema StructValue
}

type ClickhouseInsertJobRaw

type ClickhouseInsertJobRaw struct {
	BatchSize   int64                         `json:"batchSize"`
	TableName   string                        `json:"tableName"`
	Partitions  int                           `json:"partitions"`
	PartitionId int                           `json:"partitionId"`
	Config      map[string]ClickhouseFieldRaw `json:"config"`
}

func (*ClickhouseInsertJobRaw) Into

type ConstantValue

type ConstantValue struct {
	// contains filtered or unexported fields
}

This value always returns the same value

func NewConst

func NewConst(
	value interface{},
) *ConstantValue

func NewConstFromConfig

func NewConstFromConfig(config interface{}) (*ConstantValue, error)

func (*ConstantValue) GetValue

func (constant *ConstantValue) GetValue(
	sequence uint64,
) interface{}

type RandomArray

type RandomArray struct {
	// contains filtered or unexported fields
}

Array

func NewRandomArrayFromConfig

func NewRandomArrayFromConfig(config interface{}, valueProvider Value) (*RandomArray, error)

func (*RandomArray) GetValue

func (rnd *RandomArray) GetValue(
	sequence uint64,
) interface{}

type RandomFloat

type RandomFloat struct {
	// contains filtered or unexported fields
}

func NewRandomFloatFromConfig

func NewRandomFloatFromConfig(config interface{}) (*RandomFloat, error)

func (*RandomFloat) GetValue

func (rnd *RandomFloat) GetValue(
	sequence uint64,
) interface{}

type RandomInteger

type RandomInteger struct {
	// contains filtered or unexported fields
}

func NewRandomIntegerFromConfig

func NewRandomIntegerFromConfig(config interface{}) (*RandomInteger, error)

func (*RandomInteger) GetValue

func (rnd *RandomInteger) GetValue(
	sequence uint64,
) interface{}

type RandomMap

type RandomMap struct {
	// contains filtered or unexported fields
}

Map

func NewRandomMapFromConfig

func NewRandomMapFromConfig(config interface{}, keyProvider Value, valueProvider Value) (*RandomMap, error)

func (*RandomMap) GetValue

func (rnd *RandomMap) GetValue(
	sequence uint64,
) interface{}

type RandomSet

type RandomSet struct {
	// contains filtered or unexported fields
}

Discrete values

func NewRandomSetFromConfig

func NewRandomSetFromConfig(config interface{}) (*RandomSet, error)

func (*RandomSet) GetValue

func (seq *RandomSet) GetValue(
	sequence uint64,
) interface{}

type RandomString

type RandomString struct {
	// contains filtered or unexported fields
}

func NewRandomStringFromConfig

func NewRandomStringFromConfig(config interface{}) (*RandomString, error)

func (*RandomString) GetValue

func (rnd *RandomString) GetValue(
	sequence uint64,
) interface{}

type RandomTimestamp

type RandomTimestamp struct {
	// contains filtered or unexported fields
}

RandomTimestamp

func NewRandomTimestampFromConfig

func NewRandomTimestampFromConfig(config interface{}) (*RandomTimestamp, error)

func (*RandomTimestamp) GetValue

func (rt *RandomTimestamp) GetValue(sequence uint64) interface{}

type Sequence

type Sequence struct {
	From uint64
	Step uint64
}

Sequence of integers given a start and step.

func (*Sequence) GetValue

func (seq *Sequence) GetValue(
	sequence uint64,
) interface{}

type SequenceSet

type SequenceSet struct {
	// contains filtered or unexported fields
}

func NewSequenceSetFromConfig

func NewSequenceSetFromConfig(config interface{}) (*SequenceSet, error)

func (*SequenceSet) GetValue

func (seq *SequenceSet) GetValue(
	sequence uint64,
) interface{}

type SequentialTimestamp

type SequentialTimestamp struct {
	// contains filtered or unexported fields
}

SequentialTimestamp

func NewSequentialTimestampFromConfig

func NewSequentialTimestampFromConfig(config interface{}) (*SequentialTimestamp, error)

func (*SequentialTimestamp) GetValue

func (seq *SequentialTimestamp) GetValue(sequence uint64) interface{}

type StructValue

type StructValue struct {
	// contains filtered or unexported fields
}

func NewStructFromConfig

func NewStructFromConfig(
	config map[string]ClickhouseFieldRaw,
	partitions int,
	partition_id int,
) (*StructValue, error)

func NewStructValue

func NewStructValue(
	builders map[string]Value,
	flattened []StructValue,
) *StructValue

func (*StructValue) GetValue

func (structValue *StructValue) GetValue(
	sequence uint64,
) map[string]interface{}

type Timestamp

type Timestamp struct {
	// contains filtered or unexported fields
}

Timestamp

func NewTimestampFromConfig

func NewTimestampFromConfig(config interface{}) (*Timestamp, error)

func (*Timestamp) GetValue

func (seq *Timestamp) GetValue(
	sequence uint64,
) interface{}

type UUIDGenerator

type UUIDGenerator struct{}

UUID

func (*UUIDGenerator) GetValue

func (seq *UUIDGenerator) GetValue(
	sequence uint64,
) interface{}

type Value

type Value interface {
	GetValue(sequence uint64) interface{}
}

Basic interface that produces a value

func BuildField

func BuildField(config ClickhouseFieldRaw, partitions int, partition_id int) (Value, error)

func BuildValueProvider

func BuildValueProvider(config map[string](interface{}), partitions int, partition_id int) (Value, error)

Jump to

Keyboard shortcuts

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