Versions in this module Expand all Collapse all v0 v0.3.0 Dec 18, 2023 v0.2.0 Dec 6, 2023 Changes in this version + type FieldOptionTag string + const FieldOptionTagDefault + const FieldOptionTagRequired + const FieldOptionTagXID v0.1.0 Nov 30, 2023 Changes in this version + type DefaultValueOption struct + func (o DefaultValueOption) GetBSONTagName() string + func (o DefaultValueOption) GetDefaultValue(field reflect.StructField) interface{} + func (o DefaultValueOption) GetOptName() string + func (o DefaultValueOption) GetValue(field reflect.StructField) (interface{}, error) + func (o DefaultValueOption) IsApplicable(field reflect.StructField) bool + type FieldOption interface + GetBSONTagName func() string + GetDefaultValue func(field reflect.StructField) interface{} + GetOptName func() string + GetValue func(field reflect.StructField) (interface{}, error) + IsApplicable func(field reflect.StructField) bool + type RequiredOption struct + func (o RequiredOption) GetBSONTagName() string + func (o RequiredOption) GetDefaultValue(field reflect.StructField) interface{} + func (o RequiredOption) GetOptName() string + func (o RequiredOption) GetValue(field reflect.StructField) (interface{}, error) + func (o RequiredOption) IsApplicable(field reflect.StructField) bool + type SchemaFieldOptions struct + Default interface{} + Required bool + Select bool + XID bool + func GetSchemaOptionsForField(field reflect.StructField) (SchemaFieldOptions, error) + type XIDOption struct + func (o XIDOption) GetBSONTagName() string + func (o XIDOption) GetDefaultValue(field reflect.StructField) interface{} + func (o XIDOption) GetOptName() string + func (o XIDOption) GetValue(field reflect.StructField) (interface{}, error) + func (o XIDOption) IsApplicable(field reflect.StructField) bool