structs

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Apr 10, 2025 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Assign

func Assign(dst interface{}, src interface{}) error

func Diff

func Diff(dst interface{}, src interface{}) (map[string]interface{}, []string, error)

func Fields

func Fields(dst interface{}) ([]string, error)

func FieldsDiff

func FieldsDiff(dst, src, reference interface{}) ([]string, error)

func GetName added in v0.0.3

func GetName(src interface{}) string

func GormColumnName

func GormColumnName(st reflect.StructField, namer GormNamer) string

func GormMapToStruct

func GormMapToStruct(data map[string]interface{}, dst interface{}, namer GormNamer) (interface{}, map[string]interface{}, error)

func MapToStruct

func MapToStruct(namingStrategy GormNamer, data map[string]interface{}, dst interface{}) (interface{}, error)

Types

type GormNamer

type GormNamer interface {
	ColumnName(table, column string) string
}

Jump to

Keyboard shortcuts

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