converter

package
v0.1.125 Latest Latest
Warning

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

Go to latest
Published: Dec 5, 2024 License: Apache-2.0, BSD-2-Clause, BSD-3-Clause Imports: 5 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertInterfaceToString added in v0.0.67

func ConvertInterfaceToString(value interface{}) string

Types

type BooleanConverter

type BooleanConverter struct{}

func (BooleanConverter) CovertStringToInterface

func (i BooleanConverter) CovertStringToInterface(value string) (interface{}, error)

func (BooleanConverter) CovertStringToPrimitiveTypeAndSetField

func (i BooleanConverter) CovertStringToPrimitiveTypeAndSetField(field reflect.Value, value string, isPtr bool) error

type Converter

type Converter interface {
	CovertStringToInterface(value string) (interface{}, error)
	CovertStringToPrimitiveTypeAndSetField(field reflect.Value, value string, isPtr bool) error
}

func StringConverterFactory

func StringConverterFactory(vType string) Converter

type Float32Converter

type Float32Converter struct{}

func (Float32Converter) CovertStringToInterface

func (i Float32Converter) CovertStringToInterface(value string) (interface{}, error)

func (Float32Converter) CovertStringToPrimitiveTypeAndSetField

func (i Float32Converter) CovertStringToPrimitiveTypeAndSetField(field reflect.Value, value string, isPtr bool) error

type Float64Converter

type Float64Converter struct{}

func (Float64Converter) CovertStringToInterface

func (i Float64Converter) CovertStringToInterface(value string) (interface{}, error)

func (Float64Converter) CovertStringToPrimitiveTypeAndSetField

func (i Float64Converter) CovertStringToPrimitiveTypeAndSetField(field reflect.Value, value string, isPtr bool) error

type Int32Converter

type Int32Converter struct{}

func (Int32Converter) CovertStringToInterface

func (i Int32Converter) CovertStringToInterface(value string) (interface{}, error)

func (Int32Converter) CovertStringToPrimitiveTypeAndSetField

func (i Int32Converter) CovertStringToPrimitiveTypeAndSetField(field reflect.Value, value string, isPtr bool) error

type Int64Converter

type Int64Converter struct{}

func (Int64Converter) CovertStringToInterface

func (i Int64Converter) CovertStringToInterface(value string) (interface{}, error)

func (Int64Converter) CovertStringToPrimitiveTypeAndSetField

func (i Int64Converter) CovertStringToPrimitiveTypeAndSetField(field reflect.Value, value string, isPtr bool) error

type StringConverter

type StringConverter struct{}

func (StringConverter) CovertStringToInterface

func (i StringConverter) CovertStringToInterface(value string) (interface{}, error)

func (StringConverter) CovertStringToPrimitiveTypeAndSetField

func (i StringConverter) CovertStringToPrimitiveTypeAndSetField(field reflect.Value, value string, isPtr bool) error

Jump to

Keyboard shortcuts

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