Versions in this module Expand all Collapse all v1 v1.2.1 Jan 21, 2024 Changes in this version + type ExecOption interface + func MaxParamsPerSQL(v int) ExecOption + type Exporter struct + func NewExporter(resource interface{}) *Exporter + func (ep *Exporter) Associations(ts ...string) *Exporter + func (ep *Exporter) Exec(db *gorm.DB, w Writer, opts ...ExporterExecOption) error + func (ep *Exporter) Metas(ms ...*Meta) *Exporter + type ExporterExecOption interface + type Importer struct + func NewImporter(resource interface{}) *Importer + func (ip *Importer) Associations(ts ...string) *Importer + func (ip *Importer) Exec(db *gorm.DB, r Reader, opts ...ImporterExecOption) error + func (ip *Importer) Metas(ms ...*Meta) *Importer + func (ip *Importer) Validators(vs ...func(metaValues MetaValues) error) *Importer + type ImporterExecOption interface + type Meta struct + func NewMeta(field string) *Meta + func (m *Meta) Header(s string) *Meta + func (m *Meta) PrimaryKey(b bool) *Meta + func (m *Meta) Setter(f MetaSetter) *Meta + func (m *Meta) Valuer(f MetaValuer) *Meta + type MetaSetter func(record interface{}, value string, metaValues MetaValues) error + type MetaValuer func(record interface{}) (string, error) + type MetaValues interface + Get func(field string) (val string) + type Reader interface + Header func() []string + Next func() bool + ReadRow func() ([]string, error) + Total func() uint + func NewCSVReader(rc io.ReadCloser) (Reader, error) + type Writer interface + Flush func() error + WriteHeader func([]string) error + WriteRow func([]string) error + func NewCSVWriter(w io.Writer) (Writer, error) v1.2.0 Nov 9, 2022 Other modules containing this package github.com/qor5/x/v3