mapper

package
v0.0.2 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DestFieldIsNotValidError

type DestFieldIsNotValidError struct {
	// contains filtered or unexported fields
}

func NewDestFieldIsNotValidError

func NewDestFieldIsNotValidError(message string, args ...any) *DestFieldIsNotValidError

type DestinationFieldNotFoundError

type DestinationFieldNotFoundError struct {
	// contains filtered or unexported fields
}

func NewDestinationFieldNotFoundError

func NewDestinationFieldNotFoundError(message string, args ...any) *DestinationFieldNotFoundError

type DestinationFieldNotSettableError

type DestinationFieldNotSettableError struct {
	// contains filtered or unexported fields
}

func NewDestinationFieldNotSettableError

func NewDestinationFieldNotSettableError(message string, args ...any) *DestinationFieldNotSettableError

type DestinationNotPointerError

type DestinationNotPointerError struct {
	// contains filtered or unexported fields
}

func NewDestinationNotPointerError

func NewDestinationNotPointerError(message string, args ...any) *DestinationNotPointerError

type DestinationNotStructError

type DestinationNotStructError struct {
	// contains filtered or unexported fields
}

func NewDestinationNotStructError

func NewDestinationNotStructError(message string, args ...any) *DestinationNotStructError

type FieldsTypesMismatchError

type FieldsTypesMismatchError struct {
	// contains filtered or unexported fields
}

func NewFieldsTypesMismatchError

func NewFieldsTypesMismatchError(message string, args ...any) *FieldsTypesMismatchError

type InvalidMaptoTagError

type InvalidMaptoTagError struct {
	// contains filtered or unexported fields
}

func NewInvalidMaptoTagError

func NewInvalidMaptoTagError(message string, args ...any) *InvalidMaptoTagError

type Mapper

type Mapper struct {
	// contains filtered or unexported fields
}

Mapper is a struct mapper.

func New

func New(opts ...Option) (*Mapper, error)

New creates a new mapper.

func (*Mapper) Map

func (m *Mapper) Map(src interface{}, dest interface{}) error

Map maps fields from a source struct to a destination struct based on "mapto" tags.

type Option

type Option func(*Mapper) error

Option is a mapper option.

func WithLogger

func WithLogger(logger *zap.Logger) Option

WithLogger sets the logger for the mapper.

type SourceFieldIsNotValidError

type SourceFieldIsNotValidError struct {
	// contains filtered or unexported fields
}

func NewSourceFieldIsNotValidError

func NewSourceFieldIsNotValidError(message string, args ...any) *SourceFieldIsNotValidError

type SourceNotStructError

type SourceNotStructError struct {
	// contains filtered or unexported fields
}

func NewSourceNotStructError

func NewSourceNotStructError(message string, args ...any) *SourceNotStructError

Jump to

Keyboard shortcuts

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