app

package
v0.0.0-...-226b666 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2021 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CsvApp

type CsvApp interface {
	Run() error
}

type CsvAppBuilder

type CsvAppBuilder interface {
	Build(k uint32, cfg CsvParserAppConfig) CsvApp
}

type CsvParserApp

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

func NewCsvParserApp

func NewCsvParserApp(k uint32, cfg CsvParserAppConfig) *CsvParserApp

NewCsvParserApp returns new CsvParserApp by k and config.

func (*CsvParserApp) Run

func (s *CsvParserApp) Run() error

Run executes CsvParserApp.

type CsvParserAppConfig

type CsvParserAppConfig struct {
	// Column index of entity(user/repo) ID from events.csv file.
	EventsEntityColumnIndex int

	// Column index of event type from events.csv file.
	EventsEventTypeColumnIndex int

	// Column index of entity(user/repo) ID from entity file (actors.csv, repos.csv).
	EntityEntityColumnIndex int

	// Column index of entity(user/repo) name from entity file (actors.csv, repos.csv).
	EntityNameColumnIndex int

	// Event types to filter.
	EventTypes []string

	// Reader of events.csv
	EventsFileReader *csv.Reader

	// Reader of entity file (actors.csv, repos.csv).
	EntityFileReader *csv.Reader

	// Writer to output the results.
	Writer io.Writer
}

CsvParserAppConfig represents config values required to process csv file and entity file. There are 3 steps of this app, described in Run.

Jump to

Keyboard shortcuts

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