argstruct

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Jun 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(value any, options ...Option) litsql.ArgValues

New returns a litsql.ArgValues from struct fields. If value is not a struct, returns nil.

func WithGetArgsValuesOption

func WithGetArgsValuesOption(options ...Option) sq.GetArgValuesInstanceOption

WithGetArgsValuesOption adds a litsql.ArgValues to be parsed by sq.ParseArgs.

Types

type Option

type Option func(*argValues)

func WithDerefPointer

func WithDerefPointer(deref bool) Option

WithDerefPointer dereferences pointers in struct field values.

func WithMapperFunc

func WithMapperFunc(mapperFunc func(string) string) Option

WithMapperFunc sets the field name mapper function.

func WithTagName

func WithTagName(tagName string) Option

WithTagName sets the struct tag name to use. Default is "json".

Jump to

Keyboard shortcuts

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