rp_writer_impl

package
v0.6.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 27, 2021 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	XlsxMaxRows         = 10000
	XlsxMaxMemoryTarget = 4 * 1_048_576 // 4MB
)

Variables

View Source
var (
	ErrorMockTheWriterIsNotReady = errors.New("the writer is not ready")
)
View Source
var (
	MSortedWriter = app_msg.Apply(&MsgSortedWriter{}).(*MsgSortedWriter)
)
View Source
var (
	MXlsxWriter = app_msg.Apply(&MsgXlsxWriter{}).(*MsgXlsxWriter)
)

Functions

func New

func New(name string, ctl app_control.Control) rp_writer.Writer

func NewCascade

func NewCascade(name string, c app_control.Control) rp_writer.Writer

func NewCsvWriter

func NewCsvWriter(name string, ctl app_control.Control) rp_writer.Writer

func NewJsonWriter

func NewJsonWriter(name string, ctl app_control.Control, toStdout bool) rp_writer.Writer

func NewSmallCache

func NewSmallCache(name string, writer rp_writer.Writer) rp_writer.Writer

func NewSmallCacheWithThreshold

func NewSmallCacheWithThreshold(name string, writer rp_writer.Writer, threshold int64) rp_writer.Writer

func NewSorted

func NewSorted(name string, writers []rp_writer.Writer) rp_writer.Writer

func NewXlsxWriter

func NewXlsxWriter(name string, ctl app_control.Control) rp_writer.Writer

Types

type Mock

type Mock struct {
	// contains filtered or unexported fields
}

func NewMock

func NewMock() *Mock

func (*Mock) Close

func (z *Mock) Close()

func (*Mock) IsClosed

func (z *Mock) IsClosed() bool

func (*Mock) IsOpened

func (z *Mock) IsOpened() bool

func (*Mock) Name

func (z *Mock) Name() string

func (*Mock) Open

func (z *Mock) Open(ctl app_control.Control, model interface{}, opts ...rp_model.ReportOpt) error

func (*Mock) Records

func (z *Mock) Records() []interface{}

func (*Mock) Row

func (z *Mock) Row(r interface{})

type MockRecord

type MockRecord struct {
	SKU      string `json:"sku"`
	Quantity int    `json:"quantity"`
}

type MsgSortedWriter

type MsgSortedWriter struct {
	ProgressSorting          app_msg.Message
	ProgressPreparing        app_msg.Message
	ErrorUnableComposeReport app_msg.Message
}

type MsgXlsxWriter

type MsgXlsxWriter struct {
	UnableToOpen app_msg.Message
}

type Sorted

type Sorted struct {
	// contains filtered or unexported fields
}

func (*Sorted) Close

func (z *Sorted) Close()

func (*Sorted) Name

func (z *Sorted) Name() string

func (*Sorted) Open

func (z *Sorted) Open(ctl app_control.Control, model interface{}, opts ...rp_model.ReportOpt) (err error)

func (*Sorted) Row

func (z *Sorted) Row(r interface{})

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL