mismatched

package
v0.3.6 Latest Latest
Warning

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

Go to latest
Published: Feb 18, 2022 License: MIT Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIAddress

type APIAddress struct {
	Suburb, Postcode string
}

func AddressOrDefault

func AddressOrDefault(c Converter, address *DBAddress) APIAddress

type APICustomer

type APICustomer struct {
	*APIPerson
	APIAddress
}

type APICustomers

type APICustomers []APICustomer

type APIPerson

type APIPerson struct {
	First, Last string
}

type Converter

type Converter interface {
	Convert(customers DBCustomers) APICustomers

	// goverter:map DBPerson APIPerson
	// goverter:map DBAddress APIAddress
	ToApiCustomer(DBCustomer) APICustomer

	ToAPIAddress(DBAddress) APIAddress
}

goverter:converter goverter:extend AddressOrDefault

type DBAddress

type DBAddress struct {
	Suburb, Postcode string
}

type DBCustomer

type DBCustomer struct {
	DBPerson
	*DBAddress
}

type DBCustomers

type DBCustomers []DBCustomer

type DBPerson

type DBPerson struct {
	First, Last string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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