Documentation ¶
Overview ¶
Package usecase provides use cases related to Multiple File Format.
Index ¶
- type CSVInteractor
- type ExcelInteractor
- type HistoryInteractor
- type JSONInteractor
- type LTSVInteractor
- type SQL
- type SQLite3Interactor
- func (si *SQLite3Interactor) CreateTable(ctx context.Context, t *model.Table) error
- func (si *SQLite3Interactor) Exec(ctx context.Context, statement string) (int64, error)
- func (si *SQLite3Interactor) ExecSQL(ctx context.Context, statement string) (*model.Table, int64, error)
- func (si *SQLite3Interactor) Header(ctx context.Context, tableName string) (*model.Table, error)
- func (si *SQLite3Interactor) Insert(ctx context.Context, t *model.Table) error
- func (si *SQLite3Interactor) List(ctx context.Context, tableName string) (*model.Table, error)
- func (si *SQLite3Interactor) Query(ctx context.Context, query string) (*model.Table, error)
- func (si *SQLite3Interactor) TablesName(ctx context.Context) ([]*model.Table, error)
- type TSVInteractor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CSVInteractor ¶
type CSVInteractor struct {
Repository repository.CSVRepository
}
CSVInteractor implementation of use cases related to CSV handler.
func NewCSVInteractor ¶
func NewCSVInteractor(r repository.CSVRepository) *CSVInteractor
NewCSVInteractor return CSVInteractor
type ExcelInteractor ¶ added in v0.7.0
type ExcelInteractor struct {
repository.ExcelRepository
}
ExcelInteractor implementation of use cases related to Excel handler.
func NewExcelInteractor ¶ added in v0.7.0
func NewExcelInteractor(r repository.ExcelRepository) *ExcelInteractor
NewExcelInteractor return ExcelInteractor
type HistoryInteractor ¶ added in v0.0.5
type HistoryInteractor struct {
Repository repository.HistoryRepository
}
HistoryInteractor implementation of use cases related to sqly history
func NewHistoryInteractor ¶ added in v0.0.5
func NewHistoryInteractor(r repository.HistoryRepository) *HistoryInteractor
NewHistoryInteractor return CSVInteractor
func (*HistoryInteractor) CreateTable ¶ added in v0.0.5
func (hi *HistoryInteractor) CreateTable(ctx context.Context) error
CreateTable create table for sqly history.
type JSONInteractor ¶ added in v0.3.0
type JSONInteractor struct {
Repository repository.JSONRepository
}
JSONInteractor implementation of use cases related to JSON handler.
func NewJSONInteractor ¶ added in v0.3.0
func NewJSONInteractor(r repository.JSONRepository) *JSONInteractor
NewJSONInteractor return JSONInteractor
type LTSVInteractor ¶ added in v0.5.0
type LTSVInteractor struct {
Repository repository.LTSVRepository
}
LTSVInteractor implementation of use cases related to LTSV handler.
func NewLTSVInteractor ¶ added in v0.5.0
func NewLTSVInteractor(r repository.LTSVRepository) *LTSVInteractor
NewLTSVInteractor return LTSVInteractor
type SQL ¶ added in v0.0.7
type SQL struct {
// contains filtered or unexported fields
}
SQL is sql information
type SQLite3Interactor ¶
type SQLite3Interactor struct { Repository repository.SQLite3Repository // contains filtered or unexported fields }
SQLite3Interactor implementation of use cases related to SQLite3 handler.
func NewSQLite3Interactor ¶
func NewSQLite3Interactor(r repository.SQLite3Repository, sql *SQL) *SQLite3Interactor
NewSQLite3Interactor return CSVInteractor
func (*SQLite3Interactor) CreateTable ¶
CreateTable create a DB table with columns given as model.Table
func (*SQLite3Interactor) ExecSQL ¶ added in v0.0.7
func (si *SQLite3Interactor) ExecSQL(ctx context.Context, statement string) (*model.Table, int64, error)
ExecSQL executes "SELECT/EXPLAIN" query or "INSERT/UPDATE/DELETE" statement
func (*SQLite3Interactor) TablesName ¶ added in v0.0.5
TablesName return all table name.
type TSVInteractor ¶ added in v0.4.0
type TSVInteractor struct {
Repository repository.TSVRepository
}
TSVInteractor implementation of use cases related to TSV handler.
func NewTSVInteractor ¶ added in v0.4.0
func NewTSVInteractor(r repository.TSVRepository) *TSVInteractor
NewTSVInteractor return TSVInteractor