datamapper

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: May 7, 2022 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataMapper

type DataMapper struct {
	Mapping map[string]Mapping
}

DataMapper container for mappings

func (DataMapper) GetFromMap

func (a DataMapper) GetFromMap(data map[string]string, key string) (string, error)

GetFromMap return string value from mapping

func (DataMapper) GetFromMapBool

func (a DataMapper) GetFromMapBool(data map[string]string, key string) (bool, error)

GetFromMapBool return bool value from mapping. Only empty string consider as false.

func (DataMapper) GetFromMapInt32

func (a DataMapper) GetFromMapInt32(data map[string]string, key string) (int32, error)

GetFromMapInt32 return int32 value from mapping

func (DataMapper) GetFromMapInt64

func (a DataMapper) GetFromMapInt64(data map[string]string, key string) (int64, error)

GetFromMapInt64 return int64 value from mapping

type Mapping

type Mapping interface {
	IsSimple() bool
	GetValue() string
}

Mapping interface for mapping.

Jump to

Keyboard shortcuts

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