srm

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jun 28, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// SubTagNameFieldName holds the name of a sub-tag containing the sql field for a struct attribute.
	SubTagNameFieldName = "field_name"
	// TagName holds the name of the tag that contains all of gaum possible sub tags.
	TagName = "gaum"
)

Variables

View Source
var ErrInquisition = errors.Errorf("found an unexpected type")

ErrInquisition indicates that the type passed was not one expected.

View Source
var ErrNoPointer = errors.Errorf("destination needs to be pointer")

ErrNoPointer indicates that the passed type is not a pointer.

Functions

func FieldRecipientsFromType

func FieldRecipientsFromType(logger logging.Logger, sqlFields []string,
	fieldMap map[string]reflect.StructField, aType interface{}) []interface{}

FieldRecipientsFromType returns an array of pointer to attributes from the passed in instance.

func FieldRecipientsFromValueOf

func FieldRecipientsFromValueOf(logger logging.Logger, sqlFields []string,
	fieldMap map[string]reflect.StructField, vod reflect.Value) []interface{}

FieldRecipientsFromValueOf returns an array of pointer to attributes from the passed in reflect.Value.

func MapFromPtrType

func MapFromPtrType(aType interface{},
	include []reflect.Kind,
	exclude []reflect.Kind) (string, map[string]reflect.StructField, error)

MapFromPtrType returns the name of the passed type, a map of field name to field or error.

func MapFromTypeOf

func MapFromTypeOf(tod reflect.Type,
	include []reflect.Kind,
	exclude []reflect.Kind) (string, map[string]reflect.StructField, error)

MapFromTypeOf returns the name of the passed reflect.Type, a map of field name to field or error.

Types

This section is empty.

Jump to

Keyboard shortcuts

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