Documentation ¶
Overview ¶
dataq.go defines the Surfer object and its methods
helpers.go includes all utility (not exported) functions
Main and only package of DataQ dataq.go defines the Surfer object and its methods
Index ¶
- Constants
- func Compare(f1 interface{}, f2 interface{}) (bool, error)
- type Surfer
- func (s Surfer) GetBool(name string, source interface{}) (bool, error)
- func (s Surfer) GetFlatData(source interface{}) (map[string]interface{}, error)
- func (s Surfer) GetFloat64(name string, source interface{}) (float64, error)
- func (s Surfer) GetInt64(name string, source interface{}) (int64, error)
- func (s Surfer) GetString(name string, source interface{}) (string, error)
- type SurferOption
Constants ¶
View Source
const ( T_PTR = 0 T_STRUCT = 1 T_INT = 2 T_INT64 = 3 T_FLOAT32 = 4 T_FLOAT64 = 5 T_STRING = 6 T_BOOL = 7 T_MAP = 8 T_NOT_SUPPORTED = -1 )
custom standardization for supported data types
View Source
const (
Default_sep = "."
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Surfer ¶
type Surfer struct {
// contains filtered or unexported fields
}
func NewSurfer ¶
func NewSurfer(opts ...SurferOption) *Surfer
NewSurfer creates a pointer to a new Surfer object with default configuration
func (Surfer) GetFlatData ¶
GetFlatData returns a map of interface{} including all fields extracted from the source
func (Surfer) GetFloat64 ¶
GetBool returns the float64 value of the given field
type SurferOption ¶
type SurferOption func(*Surfer)
func WithSep ¶
func WithSep(sep string) SurferOption
WithSep sets the separation string for the fully qualified name of the fields
Click to show internal directories.
Click to hide internal directories.