Add some comments to internal/structs/structs.go

pull/32/head
Vinícius Garcia 2022-12-13 22:34:54 -03:00
parent 37b26debeb
commit 259b3a228a
1 changed files with 17 additions and 4 deletions

View File

@ -23,10 +23,23 @@ type StructInfo struct {
// information regarding a specific field
// of a struct.
type FieldInfo struct {
// AttrName is the name of struct attribute of the struct.
AttrName string
// ColumnName is the name of the database column described by the ksql tag.
ColumnName string
// Index indexes the position of this attribute on the struct.
// This field is meant to be used together with the
// `reflect.Value.Field()` and `reflect.Type.Field()` methods.
Index int
// Valid will only be set to false if the instance
// of this field was not initialized, i.e.
// it denotes the zero value of a FieldInfo.
Valid bool
// Modifier contains the AttrModifier associated with this field.
Modifier ksqlmodifiers.AttrModifier
}