Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVWriter ¶
CSVWriter writes CSV data.
func (*CSVWriter) WriteMapping ¶
WriteMapping write the csv head mapping file
type HeaderAutoIncrementConv ¶
type HeaderAutoIncrementConv struct {
// contains filtered or unexported fields
}
func NewHeaderAutoIncrementConv ¶
func NewHeaderAutoIncrementConv() *HeaderAutoIncrementConv
func (*HeaderAutoIncrementConv) ConvertHeader ¶
func (h *HeaderAutoIncrementConv) ConvertHeader(s string) KeyType
type HeaderConverter ¶
HeaderConverter will convert the path string of the original struct field to the custom of KeyType
type HeaderOriginalStringConv ¶
type HeaderOriginalStringConv struct { }
func NewHeaderOriginalStringConv ¶
func NewHeaderOriginalStringConv() *HeaderOriginalStringConv
func (*HeaderOriginalStringConv) ConvertHeader ¶
func (h *HeaderOriginalStringConv) ConvertHeader(s string) KeyType
type KVs ¶
type KVs struct {
// contains filtered or unexported fields
}
func (*KVs) GetEncodedSortHeader ¶
func (*KVs) GetMapping ¶
func (*KVs) GetSortMappingValues ¶
func (*KVs) GetUnEncodedSortHeader ¶
func (*KVs) SetEncodedSortHeader ¶
type KeyAutoIncrementID ¶
type KeyAutoIncrementID uint64
func (KeyAutoIncrementID) Int ¶
func (k KeyAutoIncrementID) Int() uint64
func (KeyAutoIncrementID) String ¶
func (k KeyAutoIncrementID) String() string
type KeyValue ¶
type KeyValue struct {
// contains filtered or unexported fields
}
KeyValue records the struct's key(containing the path) and its value consider the performance problems caused by map keys of the interface type uint64 is used as the map key, and wrapped by KeyValue. call Set and Get of map's read and write. KeyType can be extended to different types, then both performance and code extensibility are considered
type Option ¶
type Option func(opts *Options)
func WithIsObjArray ¶
func WithOptions ¶
func WithResultCap ¶
func WithRowSize ¶
func WithStrBuilderCap ¶
type PathBuilder ¶
type PathBuilder struct {
// contains filtered or unexported fields
}
PathBuilder is a sequence of Token.
func NewPathBuilder ¶
func NewPathBuilder(growSize int) PathBuilder
func (PathBuilder) AppendString ¶
func (p PathBuilder) AppendString(token string) PathBuilder
AppendString appends the token.
func (PathBuilder) Clone ¶
func (p PathBuilder) Clone(growSize int) PathBuilder
Clone returns a duplicate of the PathBuilder.
type StructConverter ¶
type StructConverter struct {
// contains filtered or unexported fields
}
func NewStructConverter ¶
func NewStructConverter(headerConv HeaderConverter, opts ...Option) (*StructConverter, error)
NewStructConverter a converter can convert struct to csv kv
func (*StructConverter) Convert ¶
func (s *StructConverter) Convert(data interface{}) (*KVs, error)
Convert converts Struct to CSV key value
type WrapperValue ¶
type WrapperValue struct {
// contains filtered or unexported fields
}