transformers

package
v0.4.53 Latest Latest
Warning

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

Go to latest
Published: Aug 21, 2024 License: MIT Imports: 25 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CapitalizeFirst added in v0.4.49

func CapitalizeFirst(s string) string

Types

type Address

type Address struct {
	Address1 string `json:"address1"`
	Address2 string `json:"address2"`
	City     string `json:"city"`
	State    string `json:"state"`
	Zipcode  string `json:"zipcode"`
}

type BenthosSpec added in v0.4.47

type BenthosSpec struct {
	Name        string
	Description string
	Example     string
	Params      []*BenthosSpecParam
	Type        string
	SourceFile  string
}

func ExtractBenthosSpec added in v0.4.49

func ExtractBenthosSpec(fileSet *token.FileSet) ([]*BenthosSpec, error)

type BenthosSpecParam added in v0.4.47

type BenthosSpecParam struct {
	Name        string
	TypeStr     string
	IsOptional  bool
	HasDefault  bool
	Default     string
	Description string
}

type GenerateBool added in v0.4.42

type GenerateBool struct{}

func NewGenerateBool added in v0.4.42

func NewGenerateBool() *GenerateBool

func (*GenerateBool) Generate added in v0.4.42

func (t *GenerateBool) Generate(opts any) (any, error)

func (*GenerateBool) GetJsTemplateData added in v0.4.42

func (t *GenerateBool) GetJsTemplateData() (*TemplateData, error)

func (*GenerateBool) ParseOptions added in v0.4.42

func (t *GenerateBool) ParseOptions(opts map[string]any) (any, error)

type GenerateBoolOpts added in v0.4.42

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

func NewGenerateBoolOpts added in v0.4.51

func NewGenerateBoolOpts(
	seedArg *int64,
) (*GenerateBoolOpts, error)

type GenerateCardNumber added in v0.4.42

type GenerateCardNumber struct{}

func NewGenerateCardNumber added in v0.4.42

func NewGenerateCardNumber() *GenerateCardNumber

func (*GenerateCardNumber) Generate added in v0.4.42

func (t *GenerateCardNumber) Generate(opts any) (any, error)

func (*GenerateCardNumber) GetJsTemplateData added in v0.4.42

func (t *GenerateCardNumber) GetJsTemplateData() (*TemplateData, error)

func (*GenerateCardNumber) ParseOptions added in v0.4.42

func (t *GenerateCardNumber) ParseOptions(opts map[string]any) (any, error)

type GenerateCardNumberOpts added in v0.4.42

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

func NewGenerateCardNumberOpts added in v0.4.51

func NewGenerateCardNumberOpts(
	validLuhn bool,
	seedArg *int64,
) (*GenerateCardNumberOpts, error)

type GenerateCategorical added in v0.4.42

type GenerateCategorical struct{}

func NewGenerateCategorical added in v0.4.42

func NewGenerateCategorical() *GenerateCategorical

func (*GenerateCategorical) Generate added in v0.4.42

func (t *GenerateCategorical) Generate(opts any) (any, error)

func (*GenerateCategorical) GetJsTemplateData added in v0.4.42

func (t *GenerateCategorical) GetJsTemplateData() (*TemplateData, error)

func (*GenerateCategorical) ParseOptions added in v0.4.42

func (t *GenerateCategorical) ParseOptions(opts map[string]any) (any, error)

type GenerateCategoricalOpts added in v0.4.42

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

func NewGenerateCategoricalOpts added in v0.4.51

func NewGenerateCategoricalOpts(
	categories string,
	seedArg *int64,
) (*GenerateCategoricalOpts, error)

type GenerateCity added in v0.4.42

type GenerateCity struct{}

func NewGenerateCity added in v0.4.42

func NewGenerateCity() *GenerateCity

func (*GenerateCity) Generate added in v0.4.42

func (t *GenerateCity) Generate(opts any) (any, error)

func (*GenerateCity) GetJsTemplateData added in v0.4.42

func (t *GenerateCity) GetJsTemplateData() (*TemplateData, error)

func (*GenerateCity) ParseOptions added in v0.4.42

func (t *GenerateCity) ParseOptions(opts map[string]any) (any, error)

type GenerateCityOpts added in v0.4.42

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

func NewGenerateCityOpts added in v0.4.51

func NewGenerateCityOpts(
	maxLength int64,
	seedArg *int64,
) (*GenerateCityOpts, error)

type GenerateEmail added in v0.4.42

type GenerateEmail struct{}

func NewGenerateEmail added in v0.4.42

func NewGenerateEmail() *GenerateEmail

func (*GenerateEmail) Generate added in v0.4.42

func (t *GenerateEmail) Generate(opts any) (any, error)

func (*GenerateEmail) GetJsTemplateData added in v0.4.42

func (t *GenerateEmail) GetJsTemplateData() (*TemplateData, error)

func (*GenerateEmail) ParseOptions added in v0.4.42

func (t *GenerateEmail) ParseOptions(opts map[string]any) (any, error)

type GenerateEmailOpts added in v0.4.42

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

func NewGenerateEmailOpts added in v0.4.51

func NewGenerateEmailOpts(
	maxLengthArg *int64,
	emailTypeArg *string,
	seedArg *int64,
) (*GenerateEmailOpts, error)

type GenerateEmailType

type GenerateEmailType string
const (
	GenerateEmailType_UuidV4   GenerateEmailType = "uuidv4"
	GenerateEmailType_FullName GenerateEmailType = "fullname"
	GenerateEmailType_Any      GenerateEmailType = "any"
)

func (GenerateEmailType) String

func (g GenerateEmailType) String() string

type GenerateFirstName added in v0.4.42

type GenerateFirstName struct{}

func NewGenerateFirstName added in v0.4.42

func NewGenerateFirstName() *GenerateFirstName

func (*GenerateFirstName) Generate added in v0.4.42

func (t *GenerateFirstName) Generate(opts any) (any, error)

func (*GenerateFirstName) GetJsTemplateData added in v0.4.42

func (t *GenerateFirstName) GetJsTemplateData() (*TemplateData, error)

func (*GenerateFirstName) ParseOptions added in v0.4.42

func (t *GenerateFirstName) ParseOptions(opts map[string]any) (any, error)

type GenerateFirstNameOpts added in v0.4.42

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

func NewGenerateFirstNameOpts added in v0.4.51

func NewGenerateFirstNameOpts(
	maxLengthArg *int64,
	seedArg *int64,
) (*GenerateFirstNameOpts, error)

type GenerateFloat64 added in v0.4.42

type GenerateFloat64 struct{}

func NewGenerateFloat64 added in v0.4.42

func NewGenerateFloat64() *GenerateFloat64

func (*GenerateFloat64) Generate added in v0.4.42

func (t *GenerateFloat64) Generate(opts any) (any, error)

func (*GenerateFloat64) GetJsTemplateData added in v0.4.42

func (t *GenerateFloat64) GetJsTemplateData() (*TemplateData, error)

func (*GenerateFloat64) ParseOptions added in v0.4.42

func (t *GenerateFloat64) ParseOptions(opts map[string]any) (any, error)

type GenerateFloat64Opts added in v0.4.42

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

func NewGenerateFloat64Opts added in v0.4.51

func NewGenerateFloat64Opts(
	randomizeSignArg *bool,
	min float64,
	max float64,
	precision *int64,
	scale *int64,
	seedArg *int64,
) (*GenerateFloat64Opts, error)

type GenerateFullAddress added in v0.4.42

type GenerateFullAddress struct{}

func NewGenerateFullAddress added in v0.4.42

func NewGenerateFullAddress() *GenerateFullAddress

func (*GenerateFullAddress) Generate added in v0.4.42

func (t *GenerateFullAddress) Generate(opts any) (any, error)

func (*GenerateFullAddress) GetJsTemplateData added in v0.4.42

func (t *GenerateFullAddress) GetJsTemplateData() (*TemplateData, error)

func (*GenerateFullAddress) ParseOptions added in v0.4.42

func (t *GenerateFullAddress) ParseOptions(opts map[string]any) (any, error)

type GenerateFullAddressOpts added in v0.4.42

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

func NewGenerateFullAddressOpts added in v0.4.51

func NewGenerateFullAddressOpts(
	maxLength int64,
	seedArg *int64,
) (*GenerateFullAddressOpts, error)

type GenerateFullName added in v0.4.42

type GenerateFullName struct{}

func NewGenerateFullName added in v0.4.42

func NewGenerateFullName() *GenerateFullName

func (*GenerateFullName) Generate added in v0.4.42

func (t *GenerateFullName) Generate(opts any) (any, error)

func (*GenerateFullName) GetJsTemplateData added in v0.4.42

func (t *GenerateFullName) GetJsTemplateData() (*TemplateData, error)

func (*GenerateFullName) ParseOptions added in v0.4.42

func (t *GenerateFullName) ParseOptions(opts map[string]any) (any, error)

type GenerateFullNameOpts added in v0.4.42

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

func NewGenerateFullNameOpts added in v0.4.51

func NewGenerateFullNameOpts(
	maxLengthArg *int64,
	seedArg *int64,
) (*GenerateFullNameOpts, error)

type GenerateGender added in v0.4.42

type GenerateGender struct{}

func NewGenerateGender added in v0.4.42

func NewGenerateGender() *GenerateGender

func (*GenerateGender) Generate added in v0.4.42

func (t *GenerateGender) Generate(opts any) (any, error)

func (*GenerateGender) GetJsTemplateData added in v0.4.42

func (t *GenerateGender) GetJsTemplateData() (*TemplateData, error)

func (*GenerateGender) ParseOptions added in v0.4.42

func (t *GenerateGender) ParseOptions(opts map[string]any) (any, error)

type GenerateGenderOpts added in v0.4.42

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

func NewGenerateGenderOpts added in v0.4.51

func NewGenerateGenderOpts(
	abbreviateArg *bool,
	maxLengthArg *int64,
	seedArg *int64,
) (*GenerateGenderOpts, error)

type GenerateInt64 added in v0.4.42

type GenerateInt64 struct{}

func NewGenerateInt64 added in v0.4.42

func NewGenerateInt64() *GenerateInt64

func (*GenerateInt64) Generate added in v0.4.42

func (t *GenerateInt64) Generate(opts any) (any, error)

func (*GenerateInt64) GetJsTemplateData added in v0.4.42

func (t *GenerateInt64) GetJsTemplateData() (*TemplateData, error)

func (*GenerateInt64) ParseOptions added in v0.4.42

func (t *GenerateInt64) ParseOptions(opts map[string]any) (any, error)

type GenerateInt64Opts added in v0.4.42

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

func NewGenerateInt64Opts added in v0.4.51

func NewGenerateInt64Opts(
	randomizeSignArg *bool,
	min int64,
	max int64,
	seedArg *int64,
) (*GenerateInt64Opts, error)

type GenerateInt64PhoneNumber added in v0.4.42

type GenerateInt64PhoneNumber struct{}

func NewGenerateInt64PhoneNumber added in v0.4.42

func NewGenerateInt64PhoneNumber() *GenerateInt64PhoneNumber

func (*GenerateInt64PhoneNumber) Generate added in v0.4.42

func (t *GenerateInt64PhoneNumber) Generate(opts any) (any, error)

func (*GenerateInt64PhoneNumber) GetJsTemplateData added in v0.4.42

func (t *GenerateInt64PhoneNumber) GetJsTemplateData() (*TemplateData, error)

func (*GenerateInt64PhoneNumber) ParseOptions added in v0.4.42

func (t *GenerateInt64PhoneNumber) ParseOptions(opts map[string]any) (any, error)

type GenerateInt64PhoneNumberOpts added in v0.4.42

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

func NewGenerateInt64PhoneNumberOpts added in v0.4.51

func NewGenerateInt64PhoneNumberOpts(
	seedArg *int64,
) (*GenerateInt64PhoneNumberOpts, error)

type GenerateInternationalPhoneNumber added in v0.4.42

type GenerateInternationalPhoneNumber struct{}

func NewGenerateInternationalPhoneNumber added in v0.4.42

func NewGenerateInternationalPhoneNumber() *GenerateInternationalPhoneNumber

func (*GenerateInternationalPhoneNumber) Generate added in v0.4.42

func (t *GenerateInternationalPhoneNumber) Generate(opts any) (any, error)

func (*GenerateInternationalPhoneNumber) GetJsTemplateData added in v0.4.42

func (t *GenerateInternationalPhoneNumber) GetJsTemplateData() (*TemplateData, error)

func (*GenerateInternationalPhoneNumber) ParseOptions added in v0.4.42

func (t *GenerateInternationalPhoneNumber) ParseOptions(opts map[string]any) (any, error)

type GenerateInternationalPhoneNumberOpts added in v0.4.42

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

func NewGenerateInternationalPhoneNumberOpts added in v0.4.51

func NewGenerateInternationalPhoneNumberOpts(
	min int64,
	max int64,
	seedArg *int64,
) (*GenerateInternationalPhoneNumberOpts, error)

type GenerateLastName added in v0.4.42

type GenerateLastName struct{}

func NewGenerateLastName added in v0.4.42

func NewGenerateLastName() *GenerateLastName

func (*GenerateLastName) Generate added in v0.4.42

func (t *GenerateLastName) Generate(opts any) (any, error)

func (*GenerateLastName) GetJsTemplateData added in v0.4.42

func (t *GenerateLastName) GetJsTemplateData() (*TemplateData, error)

func (*GenerateLastName) ParseOptions added in v0.4.42

func (t *GenerateLastName) ParseOptions(opts map[string]any) (any, error)

type GenerateLastNameOpts added in v0.4.42

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

func NewGenerateLastNameOpts added in v0.4.51

func NewGenerateLastNameOpts(
	maxLengthArg *int64,
	seedArg *int64,
) (*GenerateLastNameOpts, error)

type GenerateRandomString added in v0.4.42

type GenerateRandomString struct{}

func NewGenerateRandomString added in v0.4.42

func NewGenerateRandomString() *GenerateRandomString

func (*GenerateRandomString) Generate added in v0.4.42

func (t *GenerateRandomString) Generate(opts any) (any, error)

func (*GenerateRandomString) GetJsTemplateData added in v0.4.42

func (t *GenerateRandomString) GetJsTemplateData() (*TemplateData, error)

func (*GenerateRandomString) ParseOptions added in v0.4.42

func (t *GenerateRandomString) ParseOptions(opts map[string]any) (any, error)

type GenerateRandomStringOpts added in v0.4.42

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

func NewGenerateRandomStringOpts added in v0.4.51

func NewGenerateRandomStringOpts(
	min int64,
	max int64,
	seedArg *int64,
) (*GenerateRandomStringOpts, error)

type GenerateSHA256Hash added in v0.4.42

type GenerateSHA256Hash struct{}

func NewGenerateSHA256Hash added in v0.4.42

func NewGenerateSHA256Hash() *GenerateSHA256Hash

func (*GenerateSHA256Hash) Generate added in v0.4.42

func (t *GenerateSHA256Hash) Generate(opts any) (any, error)

func (*GenerateSHA256Hash) GetJsTemplateData added in v0.4.42

func (t *GenerateSHA256Hash) GetJsTemplateData() (*TemplateData, error)

func (*GenerateSHA256Hash) ParseOptions added in v0.4.42

func (t *GenerateSHA256Hash) ParseOptions(opts map[string]any) (any, error)

type GenerateSHA256HashOpts added in v0.4.42

type GenerateSHA256HashOpts struct {
}

func NewGenerateSHA256HashOpts added in v0.4.51

func NewGenerateSHA256HashOpts() (*GenerateSHA256HashOpts, error)

type GenerateSSN added in v0.4.42

type GenerateSSN struct{}

func NewGenerateSSN added in v0.4.42

func NewGenerateSSN() *GenerateSSN

func (*GenerateSSN) Generate added in v0.4.42

func (t *GenerateSSN) Generate(opts any) (any, error)

func (*GenerateSSN) GetJsTemplateData added in v0.4.42

func (t *GenerateSSN) GetJsTemplateData() (*TemplateData, error)

func (*GenerateSSN) ParseOptions added in v0.4.42

func (t *GenerateSSN) ParseOptions(opts map[string]any) (any, error)

type GenerateSSNOpts added in v0.4.42

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

func NewGenerateSSNOpts added in v0.4.51

func NewGenerateSSNOpts(
	seedArg *int64,
) (*GenerateSSNOpts, error)

type GenerateState added in v0.4.42

type GenerateState struct{}

func NewGenerateState added in v0.4.42

func NewGenerateState() *GenerateState

func (*GenerateState) Generate added in v0.4.42

func (t *GenerateState) Generate(opts any) (any, error)

func (*GenerateState) GetJsTemplateData added in v0.4.42

func (t *GenerateState) GetJsTemplateData() (*TemplateData, error)

func (*GenerateState) ParseOptions added in v0.4.42

func (t *GenerateState) ParseOptions(opts map[string]any) (any, error)

type GenerateStateOpts added in v0.4.42

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

func NewGenerateStateOpts added in v0.4.51

func NewGenerateStateOpts(
	generateFullNameArg *bool,
	seedArg *int64,
) (*GenerateStateOpts, error)

type GenerateStreetAddress added in v0.4.42

type GenerateStreetAddress struct{}

func NewGenerateStreetAddress added in v0.4.42

func NewGenerateStreetAddress() *GenerateStreetAddress

func (*GenerateStreetAddress) Generate added in v0.4.42

func (t *GenerateStreetAddress) Generate(opts any) (any, error)

func (*GenerateStreetAddress) GetJsTemplateData added in v0.4.42

func (t *GenerateStreetAddress) GetJsTemplateData() (*TemplateData, error)

func (*GenerateStreetAddress) ParseOptions added in v0.4.42

func (t *GenerateStreetAddress) ParseOptions(opts map[string]any) (any, error)

type GenerateStreetAddressOpts added in v0.4.42

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

func NewGenerateStreetAddressOpts added in v0.4.51

func NewGenerateStreetAddressOpts(
	maxLength int64,
	seedArg *int64,
) (*GenerateStreetAddressOpts, error)

type GenerateStringPhoneNumber added in v0.4.42

type GenerateStringPhoneNumber struct{}

func NewGenerateStringPhoneNumber added in v0.4.42

func NewGenerateStringPhoneNumber() *GenerateStringPhoneNumber

func (*GenerateStringPhoneNumber) Generate added in v0.4.42

func (t *GenerateStringPhoneNumber) Generate(opts any) (any, error)

func (*GenerateStringPhoneNumber) GetJsTemplateData added in v0.4.42

func (t *GenerateStringPhoneNumber) GetJsTemplateData() (*TemplateData, error)

func (*GenerateStringPhoneNumber) ParseOptions added in v0.4.42

func (t *GenerateStringPhoneNumber) ParseOptions(opts map[string]any) (any, error)

type GenerateStringPhoneNumberOpts added in v0.4.42

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

func NewGenerateStringPhoneNumberOpts added in v0.4.51

func NewGenerateStringPhoneNumberOpts(
	min int64,
	max int64,
	seedArg *int64,
) (*GenerateStringPhoneNumberOpts, error)

type GenerateUTCTimestamp added in v0.4.42

type GenerateUTCTimestamp struct{}

func NewGenerateUTCTimestamp added in v0.4.42

func NewGenerateUTCTimestamp() *GenerateUTCTimestamp

func (*GenerateUTCTimestamp) Generate added in v0.4.42

func (t *GenerateUTCTimestamp) Generate(opts any) (any, error)

func (*GenerateUTCTimestamp) GetJsTemplateData added in v0.4.42

func (t *GenerateUTCTimestamp) GetJsTemplateData() (*TemplateData, error)

func (*GenerateUTCTimestamp) ParseOptions added in v0.4.42

func (t *GenerateUTCTimestamp) ParseOptions(opts map[string]any) (any, error)

type GenerateUTCTimestampOpts added in v0.4.42

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

func NewGenerateUTCTimestampOpts added in v0.4.51

func NewGenerateUTCTimestampOpts(
	seedArg *int64,
) (*GenerateUTCTimestampOpts, error)

type GenerateUUID added in v0.4.42

type GenerateUUID struct{}

func NewGenerateUUID added in v0.4.42

func NewGenerateUUID() *GenerateUUID

func (*GenerateUUID) Generate added in v0.4.42

func (t *GenerateUUID) Generate(opts any) (any, error)

func (*GenerateUUID) GetJsTemplateData added in v0.4.42

func (t *GenerateUUID) GetJsTemplateData() (*TemplateData, error)

func (*GenerateUUID) ParseOptions added in v0.4.42

func (t *GenerateUUID) ParseOptions(opts map[string]any) (any, error)

type GenerateUUIDOpts added in v0.4.42

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

func NewGenerateUUIDOpts added in v0.4.51

func NewGenerateUUIDOpts(
	includeHyphensArg *bool,
) (*GenerateUUIDOpts, error)

type GenerateUnixTimestamp added in v0.4.42

type GenerateUnixTimestamp struct{}

func NewGenerateUnixTimestamp added in v0.4.42

func NewGenerateUnixTimestamp() *GenerateUnixTimestamp

func (*GenerateUnixTimestamp) Generate added in v0.4.42

func (t *GenerateUnixTimestamp) Generate(opts any) (any, error)

func (*GenerateUnixTimestamp) GetJsTemplateData added in v0.4.42

func (t *GenerateUnixTimestamp) GetJsTemplateData() (*TemplateData, error)

func (*GenerateUnixTimestamp) ParseOptions added in v0.4.42

func (t *GenerateUnixTimestamp) ParseOptions(opts map[string]any) (any, error)

type GenerateUnixTimestampOpts added in v0.4.42

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

func NewGenerateUnixTimestampOpts added in v0.4.51

func NewGenerateUnixTimestampOpts(
	seedArg *int64,
) (*GenerateUnixTimestampOpts, error)

type GenerateUsername added in v0.4.42

type GenerateUsername struct{}

func NewGenerateUsername added in v0.4.42

func NewGenerateUsername() *GenerateUsername

func (*GenerateUsername) Generate added in v0.4.42

func (t *GenerateUsername) Generate(opts any) (any, error)

func (*GenerateUsername) GetJsTemplateData added in v0.4.42

func (t *GenerateUsername) GetJsTemplateData() (*TemplateData, error)

func (*GenerateUsername) ParseOptions added in v0.4.42

func (t *GenerateUsername) ParseOptions(opts map[string]any) (any, error)

type GenerateUsernameOpts added in v0.4.42

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

func NewGenerateUsernameOpts added in v0.4.51

func NewGenerateUsernameOpts(
	maxLengthArg *int64,
	seedArg *int64,
) (*GenerateUsernameOpts, error)

type GenerateZipcode added in v0.4.42

type GenerateZipcode struct{}

func NewGenerateZipcode added in v0.4.42

func NewGenerateZipcode() *GenerateZipcode

func (*GenerateZipcode) Generate added in v0.4.42

func (t *GenerateZipcode) Generate(opts any) (any, error)

func (*GenerateZipcode) GetJsTemplateData added in v0.4.42

func (t *GenerateZipcode) GetJsTemplateData() (*TemplateData, error)

func (*GenerateZipcode) ParseOptions added in v0.4.42

func (t *GenerateZipcode) ParseOptions(opts map[string]any) (any, error)

type GenerateZipcodeOpts added in v0.4.42

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

func NewGenerateZipcodeOpts added in v0.4.51

func NewGenerateZipcodeOpts(
	seedArg *int64,
) (*GenerateZipcodeOpts, error)

type InvalidEmailAction

type InvalidEmailAction string
const (
	InvalidEmailAction_Reject      InvalidEmailAction = "reject"
	InvalidEmailAction_Passthrough InvalidEmailAction = "passthrough"
	InvalidEmailAction_Null        InvalidEmailAction = "null"
	InvalidEmailAction_Generate    InvalidEmailAction = "generate"
)

func (InvalidEmailAction) String

func (g InvalidEmailAction) String() string

type NeosyncGenerator added in v0.4.42

type NeosyncGenerator interface {
	ParseOptions(opts map[string]any) (any, error)
	GetJsTemplateData() (*TemplateData, error)
	Generate(opts any) (any, error)
}

func GetNeosyncGenerators added in v0.4.42

func GetNeosyncGenerators() []NeosyncGenerator

type NeosyncTransformer added in v0.4.42

type NeosyncTransformer interface {
	ParseOptions(opts map[string]any) (any, error)
	GetJsTemplateData() (*TemplateData, error)
	Transform(value any, opts any) (any, error)
}

func GetNeosyncTransformers added in v0.4.42

func GetNeosyncTransformers() []NeosyncTransformer

type ParsedBenthosSpec added in v0.4.47

type ParsedBenthosSpec struct {
	Params          []*BenthosSpecParam
	SpecDescription string
}

func ParseBloblangSpec added in v0.4.47

func ParseBloblangSpec(benthosSpec *BenthosSpec) (*ParsedBenthosSpec, error)

type TemplateData added in v0.4.42

type TemplateData struct {
	Name        string
	Description string
	Example     string
}

type TransformCharacterScramble

type TransformCharacterScramble struct{}

func NewTransformCharacterScramble added in v0.4.42

func NewTransformCharacterScramble() *TransformCharacterScramble

func (*TransformCharacterScramble) GetJsTemplateData added in v0.4.42

func (t *TransformCharacterScramble) GetJsTemplateData() (*TemplateData, error)

func (*TransformCharacterScramble) ParseOptions added in v0.4.42

func (t *TransformCharacterScramble) ParseOptions(opts map[string]any) (any, error)

func (*TransformCharacterScramble) Transform added in v0.4.42

func (t *TransformCharacterScramble) Transform(value, opts any) (any, error)

type TransformCharacterScrambleOpts added in v0.4.42

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

func NewTransformCharacterScrambleOpts added in v0.4.51

func NewTransformCharacterScrambleOpts(
	userProvidedRegex *string,
	seedArg *int64,
) (*TransformCharacterScrambleOpts, error)

type TransformE164PhoneNumber

type TransformE164PhoneNumber struct{}

func NewTransformE164PhoneNumber added in v0.4.42

func NewTransformE164PhoneNumber() *TransformE164PhoneNumber

func (*TransformE164PhoneNumber) GetJsTemplateData added in v0.4.42

func (t *TransformE164PhoneNumber) GetJsTemplateData() (*TemplateData, error)

func (*TransformE164PhoneNumber) ParseOptions added in v0.4.42

func (t *TransformE164PhoneNumber) ParseOptions(opts map[string]any) (any, error)

func (*TransformE164PhoneNumber) Transform added in v0.4.42

func (t *TransformE164PhoneNumber) Transform(value, opts any) (any, error)

type TransformE164PhoneNumberOpts added in v0.4.42

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

func NewTransformE164PhoneNumberOpts added in v0.4.51

func NewTransformE164PhoneNumberOpts(
	preserveLength bool,
	maxLength *int64,
	seedArg *int64,
) (*TransformE164PhoneNumberOpts, error)

type TransformEmail added in v0.4.42

type TransformEmail struct{}

func NewTransformEmail added in v0.4.42

func NewTransformEmail() *TransformEmail

func (*TransformEmail) GetJsTemplateData added in v0.4.42

func (t *TransformEmail) GetJsTemplateData() (*TemplateData, error)

func (*TransformEmail) ParseOptions added in v0.4.42

func (t *TransformEmail) ParseOptions(opts map[string]any) (any, error)

func (*TransformEmail) Transform added in v0.4.42

func (t *TransformEmail) Transform(value, opts any) (any, error)

type TransformEmailOpts added in v0.4.42

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

func NewTransformEmailOpts added in v0.4.51

func NewTransformEmailOpts(
	preserveLengthArg *bool,
	preserveDomainArg *bool,
	excludedDomainsArg *any,
	maxLengthArg *int64,
	seedArg *int64,
	emailTypeArg *string,
	invalidEmailActionArg *string,
) (*TransformEmailOpts, error)

type TransformFirstName added in v0.4.42

type TransformFirstName struct{}

func NewTransformFirstName added in v0.4.42

func NewTransformFirstName() *TransformFirstName

func (*TransformFirstName) GetJsTemplateData added in v0.4.42

func (t *TransformFirstName) GetJsTemplateData() (*TemplateData, error)

func (*TransformFirstName) ParseOptions added in v0.4.42

func (t *TransformFirstName) ParseOptions(opts map[string]any) (any, error)

func (*TransformFirstName) Transform added in v0.4.42

func (t *TransformFirstName) Transform(value, opts any) (any, error)

type TransformFirstNameOpts added in v0.4.42

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

func NewTransformFirstNameOpts added in v0.4.51

func NewTransformFirstNameOpts(
	maxLengthArg *int64,
	preserveLengthArg *bool,
	seedArg *int64,
) (*TransformFirstNameOpts, error)

type TransformFloat64 added in v0.4.42

type TransformFloat64 struct{}

func NewTransformFloat64 added in v0.4.42

func NewTransformFloat64() *TransformFloat64

func (*TransformFloat64) GetJsTemplateData added in v0.4.42

func (t *TransformFloat64) GetJsTemplateData() (*TemplateData, error)

func (*TransformFloat64) ParseOptions added in v0.4.42

func (t *TransformFloat64) ParseOptions(opts map[string]any) (any, error)

func (*TransformFloat64) Transform added in v0.4.42

func (t *TransformFloat64) Transform(value, opts any) (any, error)

type TransformFloat64Opts added in v0.4.42

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

func NewTransformFloat64Opts added in v0.4.51

func NewTransformFloat64Opts(
	randomizationRangeMin float64,
	randomizationRangeMax float64,
	precision *int64,
	scale *int64,
	seedArg *int64,
) (*TransformFloat64Opts, error)

type TransformFullName added in v0.4.42

type TransformFullName struct{}

func NewTransformFullName added in v0.4.42

func NewTransformFullName() *TransformFullName

func (*TransformFullName) GetJsTemplateData added in v0.4.42

func (t *TransformFullName) GetJsTemplateData() (*TemplateData, error)

func (*TransformFullName) ParseOptions added in v0.4.42

func (t *TransformFullName) ParseOptions(opts map[string]any) (any, error)

func (*TransformFullName) Transform added in v0.4.42

func (t *TransformFullName) Transform(value, opts any) (any, error)

type TransformFullNameOpts added in v0.4.42

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

func NewTransformFullNameOpts added in v0.4.51

func NewTransformFullNameOpts(
	maxLengthArg *int64,
	preserveLengthArg *bool,
	seedArg *int64,
) (*TransformFullNameOpts, error)

type TransformInt64 added in v0.4.42

type TransformInt64 struct{}

func NewTransformInt64 added in v0.4.42

func NewTransformInt64() *TransformInt64

func (*TransformInt64) GetJsTemplateData added in v0.4.42

func (t *TransformInt64) GetJsTemplateData() (*TemplateData, error)

func (*TransformInt64) ParseOptions added in v0.4.42

func (t *TransformInt64) ParseOptions(opts map[string]any) (any, error)

func (*TransformInt64) Transform added in v0.4.42

func (t *TransformInt64) Transform(value, opts any) (any, error)

type TransformInt64Opts added in v0.4.42

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

func NewTransformInt64Opts added in v0.4.51

func NewTransformInt64Opts(
	randomizationRangeMin int64,
	randomizationRangeMax int64,
	seedArg *int64,
) (*TransformInt64Opts, error)

type TransformInt64PhoneNumber

type TransformInt64PhoneNumber struct{}

func NewTransformInt64PhoneNumber added in v0.4.42

func NewTransformInt64PhoneNumber() *TransformInt64PhoneNumber

func (*TransformInt64PhoneNumber) GetJsTemplateData added in v0.4.42

func (t *TransformInt64PhoneNumber) GetJsTemplateData() (*TemplateData, error)

func (*TransformInt64PhoneNumber) ParseOptions added in v0.4.42

func (t *TransformInt64PhoneNumber) ParseOptions(opts map[string]any) (any, error)

func (*TransformInt64PhoneNumber) Transform added in v0.4.42

func (t *TransformInt64PhoneNumber) Transform(value, opts any) (any, error)

type TransformInt64PhoneNumberOpts added in v0.4.42

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

func NewTransformInt64PhoneNumberOpts added in v0.4.51

func NewTransformInt64PhoneNumberOpts(
	preserveLength bool,
	seedArg *int64,
) (*TransformInt64PhoneNumberOpts, error)

type TransformLastName added in v0.4.42

type TransformLastName struct{}

func NewTransformLastName added in v0.4.42

func NewTransformLastName() *TransformLastName

func (*TransformLastName) GetJsTemplateData added in v0.4.42

func (t *TransformLastName) GetJsTemplateData() (*TemplateData, error)

func (*TransformLastName) ParseOptions added in v0.4.42

func (t *TransformLastName) ParseOptions(opts map[string]any) (any, error)

func (*TransformLastName) Transform added in v0.4.42

func (t *TransformLastName) Transform(value, opts any) (any, error)

type TransformLastNameOpts added in v0.4.42

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

func NewTransformLastNameOpts added in v0.4.51

func NewTransformLastNameOpts(
	maxLengthArg *int64,
	preserveLengthArg *bool,
	seedArg *int64,
) (*TransformLastNameOpts, error)

type TransformString added in v0.4.42

type TransformString struct{}

func NewTransformString added in v0.4.42

func NewTransformString() *TransformString

func (*TransformString) GetJsTemplateData added in v0.4.42

func (t *TransformString) GetJsTemplateData() (*TemplateData, error)

func (*TransformString) ParseOptions added in v0.4.42

func (t *TransformString) ParseOptions(opts map[string]any) (any, error)

func (*TransformString) Transform added in v0.4.42

func (t *TransformString) Transform(value, opts any) (any, error)

type TransformStringOpts added in v0.4.42

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

func NewTransformStringOpts added in v0.4.51

func NewTransformStringOpts(
	preserveLengthArg *bool,
	minLengthArg *int64,
	maxLengthArg *int64,
	seedArg *int64,
) (*TransformStringOpts, error)

type TransformStringPhoneNumber added in v0.4.42

type TransformStringPhoneNumber struct{}

func NewTransformStringPhoneNumber added in v0.4.42

func NewTransformStringPhoneNumber() *TransformStringPhoneNumber

func (*TransformStringPhoneNumber) GetJsTemplateData added in v0.4.42

func (t *TransformStringPhoneNumber) GetJsTemplateData() (*TemplateData, error)

func (*TransformStringPhoneNumber) ParseOptions added in v0.4.42

func (t *TransformStringPhoneNumber) ParseOptions(opts map[string]any) (any, error)

func (*TransformStringPhoneNumber) Transform added in v0.4.42

func (t *TransformStringPhoneNumber) Transform(value, opts any) (any, error)

type TransformStringPhoneNumberOpts added in v0.4.42

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

func NewTransformStringPhoneNumberOpts added in v0.4.51

func NewTransformStringPhoneNumberOpts(
	preserveLength bool,
	maxLength int64,
	seedArg *int64,
) (*TransformStringPhoneNumberOpts, error)

type TransformerExecutor added in v0.4.51

type TransformerExecutor struct {
	Opts   any
	Mutate func(value any, opts any) (any, error)
}

func InitializeTransformer added in v0.4.51

func InitializeTransformer(transformerMapping *mgmtv1alpha1.JobMappingTransformer) (*TransformerExecutor, error)

Source Files

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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