Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( ErrValueIsIncompatibleOfStringSlice = errors.New("value is incompatible of string slice") ErrValueIsIncompatibleOfIntSlice = errors.New("value is incompatible of int slice") ErrValueIsIncompatibleOfFloat64Slice = errors.New("value is incompatible of float64 slice") ErrValueIsIncompatibleOfBinarySlice = errors.New("value is incompatible of []byte slice") ErrCollectionAlreadyContainsItem = errors.New("collection already contains item") ErrFailedToCast = errors.New("failed to cast") )
var ErrDocumentAttributeValueIsIncompatible = fmt.Errorf("document-attribute-value is incompatible")
ErrDocumentAttributeValueIsIncompatible occurs when an incompatible conversion to following:
- *types.AttributeValueMemberL
- *types.AttributeValueMemberM
- *types.AttributeValueMemberSS
- *types.AttributeValueMemberNS
- *types.AttributeValueMemberBS
var ErrNestedStructHasIncompatibleAttributes = errors.New("nested struct has incompatible attributes")
ErrNestedStructHasIncompatibleAttributes occurs when the nested struct has incompatible attributes.
Functions ¶
func AssignMapValueToReflectValue ¶
func AssignMapValueToReflectValue(rt reflect.Type, rv reflect.Value, mv map[string]interface{}) error
AssignMapValueToReflectValue assigns the map type value to the reflect.Value
func ToDocumentAttributeValue ¶
func ToDocumentAttributeValue[T DocumentAttributeMember](value interface{}) (T, error)
ToDocumentAttributeValue converts given interface to a DocumentAttributeMember.
NOTE: this function returns a typed-nil if the conversion is incompatible. therefore, nil-check is not guaranteed to work.
Types ¶
type DocumentAttributeMember ¶
type DocumentAttributeMember interface { *types.AttributeValueMemberL | *types.AttributeValueMemberM | *types.AttributeValueMemberSS | *types.AttributeValueMemberNS | *types.AttributeValueMemberBS }
DocumentAttributeMember represents Document Attribute Member.
type List ¶
type List []interface{}
List is a DynamoDB list type.
func (*List) GormDataType ¶ added in v0.2.0
GormDataType returns the data type for Gorm.
func (*List) Scan ¶
Scan implements the sql.Scanner#Scan
type Map ¶
type Map map[string]interface{}
Map is a DynamoDB map type.
func (Map) GormDataType ¶ added in v0.2.0
GormDataType returns the data type for Gorm.
type Set ¶
type Set[T SetSupportable] []T
Set is a DynamoDB set type.
func (*Set[T]) GormDataType ¶ added in v0.2.0
GormDataType returns the data type for Gorm.
func (*Set[T]) Scan ¶
Scan implements the sql.Scanner#Scan
type SetSupportable ¶
SetSupportable are the types that support the Set
type TypedList ¶
type TypedList[T any] []T
TypedList is a DynamoDB list type with type specification.
func (*TypedList[T]) GormDataType ¶ added in v0.2.0
GormDataType returns the data type for Gorm.
func (*TypedList[T]) Scan ¶
Scan implements the sql.Scanner#Scan