utils

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jan 3, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Validator = validator.New()

Functions

func AnyTypeToInt64

func AnyTypeToInt64(data interface{}) (int64, error)

func AnyTypeToString

func AnyTypeToString(src interface{}) (string, error)

func AynTypeToSlice

func AynTypeToSlice(data interface{}) ([]interface{}, error)

func JSONUnmarshalWithMap

func JSONUnmarshalWithMap(data map[string]interface{}, dst interface{}) error

Types

type FieldDefinition

type FieldDefinition struct {
	Name string
	Type string
	Tags map[string]string
}

func GetTypeDefinitions

func GetTypeDefinitions(obj interface{}, tags []string) []FieldDefinition

Jump to

Keyboard shortcuts

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