conversion

package
v0.2.21 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Collection

type Collection interface {
	Bool() ValueConverter[bool, uint8]
	Int8() ValueConverter[int8, int8]
	Int16() ValueConverter[int16, int16]
	Int32() ValueConverter[int32, int32]
	Int64() ValueConverter[int64, int64]
	Uint8() ValueConverter[uint8, uint8]
	Uint16() ValueConverter[uint16, uint16]
	Uint32() ValueConverter[uint32, uint32]
	Uint64() ValueConverter[uint64, uint64]
	Float32() ValueConverter[float32, float32]
	Float64() ValueConverter[float64, float64]
	String() ValueConverter[string, string]
	StringToBytes() ValueConverter[string, []byte]
	Bytes() ValueConverter[[]byte, []byte]
	Date() ValueConverter[time.Time, uint16]
	DateToString() ValuePtrConverter[time.Time, string]
	Datetime() ValueConverter[time.Time, uint32]
	DatetimeToString() ValuePtrConverter[time.Time, string]
	Timestamp() ValueConverter[time.Time, uint64]
	TimestampToString() ValuePtrConverter[time.Time, string]
}

func NewCollection

func NewCollection(cfg *config.TConversionConfig) Collection

type ValueConverter

type ValueConverter[IN common.ValueType, OUT common.ValueType] interface {
	Convert(in IN) (OUT, error)
}

type ValuePtrConverter

type ValuePtrConverter[IN common.ValueType, OUT common.ValueType] interface {
	Convert(in *IN) (OUT, error)
}

Jump to

Keyboard shortcuts

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