dataconv

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DateTimeISO8601ID = "date-time-iso8601"
	BlobConverterID   = "blob"
)

Variables

This section is empty.

Functions

func ConverterExists

func ConverterExists(id string) bool

func RegisterConverter

func RegisterConverter(id string, converter Converter)

func RegisterConverters

func RegisterConverters()

Types

type BlobConverter

type BlobConverter struct{}

func (BlobConverter) Convert

func (BlobConverter) Convert(_ string, source interface{}) (interface{}, error)

func (BlobConverter) Handle

func (BlobConverter) Handle(vl interface{}) bool

type Converter

type Converter interface {
	Convert(string, interface{}) (interface{}, error)
	Handle(interface{}) bool
}

func GetConverter

func GetConverter(id string) Converter

type DateTimeISO8601Converter

type DateTimeISO8601Converter struct{}

func (DateTimeISO8601Converter) Convert

func (DateTimeISO8601Converter) Convert(_ string, source interface{}) (interface{}, error)

func (DateTimeISO8601Converter) Handle

func (DateTimeISO8601Converter) Handle(vl interface{}) bool

Jump to

Keyboard shortcuts

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