Categorygithub.com/mailstepcz/keyvalue
modulepackage
0.1.1
Repository: https://github.com/mailstepcz/keyvalue.git
Documentation: pkg.go.dev

# README

copier

A copier of Go structs

# Functions

Cast is a convenience function for obtaining an instance of [Copying].
CopierForPair creates a copier for a pair of structs.
CopierForPairWithOptions creates a copier for a pair of structs with custom options.
Copy copies the contents of the source object to the destination object.
CopyMap creates a copy of the given slice.
CopyV1 copies the contents of the source object to the destination object.
JSONType ...
MustJSONType ...
MustSliceCopierForPair creates a typed copier for a pair of slices.
NewAdapter creates a new adapter.
NewCopy copies the contents of the source object to the destination object.
NewerCopy copies the contents of the source object to the destination object.
NewMapAdapter creates a new adapter for a map.
NewPBStructAdapter creates a new adapter for a map.
NewStructAdapter creates a new adapter for a structure..
RegisterConv registers a custom conversion function.
SliceCopierForPair creates a typed copier for a pair of slices.
SlowestTransmuter ...
SlowTransmuter ...
Transmuter ...
TypedCopierForPair creates a typed copier for a pair of structs.
ValueCopier returns a copier for values of any type (provided the pair of types is supported).

# Variables

dedicated errors.
ErrCircularTypeReference ...
ErrFieldNotFound signifies that the required field was not found.
dedicated errors.
dedicated errors.
ErrPointerNotSupportedInDestinationSlice signifies that a pointer in the slice would clash with the GC.
ErrTransmutingMarshallableType ...
ErrTypeNotStruct signifies that the type is not a structure.
ErrUnexportedFieldInStruct ...
ErrUnsupportedTypePair signifies incompatible type pair.

# Structs

ConvertorOption is an option specifying custom type conversions.
CopierOptions defines copier options.
FactoryOption is an option specifying structure builder for interface-valued fields.
InterfaceValue wraps an empty interface.
MapAdapter is a key-value adapter for maps.
PBStructAdapter is a key-value adapter for Protobuf structures.
PBValue wraps a Protobuf value.
StructAdapter is a key-value adapter for structures.
TypePair is a pair of types.

# Interfaces

Adapter is a key-value adapter for structures and maps.
Copier provides a method for copying values of different types.
Option is an option for adapters.
Value is a value in a struct or map.

# Type aliases

Copying wraps copier functions to conform to the [Copier] interface.