Documentation ¶
Index ¶
- type Children
- type DedupStore
- type FileWriter
- type ID
- type LastProcessedStore
- type Manager
- func (s *Manager) Done(id ID, lastProcessed interface{}) error
- func (s *Manager) GetModelType(id ID) string
- func (s *Manager) Progress(id ID, current, total int)
- func (s *Manager) Rollback(id ID) error
- func (s *Manager) Session(modelType string, parentSessionID ID, parentObjectID, parentObjectName string) (_ ID, lastProcessed interface{}, _ error)
- func (s *Manager) SessionFlex(export expin.Export, isTracking bool, name string, parentSessionID ID, ...) (_ ID, lastProcessed interface{}, _ error)
- func (s *Manager) SessionRoot(export expin.Export, modelType string) (_ ID, lastProcessed interface{}, _ error)
- func (s *Manager) SessionRootTracking(export expin.Export, modelType string) (_ ID, lastProcessed interface{}, _ error)
- func (s *Manager) SessionTracking(modelType string, parentSessionID ID, parentObjectID, parentObjectName string) (_ ID, lastProcessed interface{}, _ error)
- func (s *Manager) Write(id ID, objs []map[string]interface{}) error
- type MockWriter
- type MockWriters
- type NewWriterFunc
- type Node
- type Opts
- type ProgressLine
- type ProgressPath
- type ProgressPathComponent
- type ProgressStatus
- type ProgressTracker
- func (s *ProgressTracker) Done(path []string)
- func (s *ProgressTracker) InProgressString() string
- func (s *ProgressTracker) ProgressLines(pathSep string, skipDone bool) (res []ProgressLine)
- func (s *ProgressTracker) ProgressLinesNested(skipDone bool) *ProgressStatus
- func (s *ProgressTracker) ProgressLinesNestedMap(skipDone bool) map[string]interface{}
- func (s *ProgressTracker) Update(path []string, current, total int)
- type SendProgressDoneFunc
- type SendProgressFunc
- type Writer
- type WriterDedup
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type DedupStore ¶
type DedupStore interface { // MarkAsSent marks the object as sent, if it wasn't already. // And returns the bool if it was already sent before. // Safe for concurrent use. MarkAsSent(obj map[string]interface{}, modelName string) (wasAlreadySent bool, _ error) Save() error Stats() (new int, dups int) }
func NewDedupStore ¶
func NewDedupStore(loc string) (DedupStore, error)
type FileWriter ¶
type FileWriter struct {
// contains filtered or unexported fields
}
func NewFileWriter ¶
func NewFileWriter(modelType string, outputDir string, id ID) *FileWriter
func (*FileWriter) Close ¶
func (s *FileWriter) Close() error
func (*FileWriter) Rollback ¶
func (s *FileWriter) Rollback() error
type LastProcessedStore ¶
type LastProcessedStore interface { Get(key ...string) interface{} Set(value interface{}, key ...string) error }
LastProcessedStore is the interface for storing last processed information
type Manager ¶
type Manager struct {
// contains filtered or unexported fields
}
Manager is the struct that manages output sessions.
func (*Manager) GetModelType ¶
GetModelType returnes modelType used for session
func (*Manager) SessionFlex ¶
func (*Manager) SessionRoot ¶
func (*Manager) SessionRootTracking ¶
func (*Manager) SessionTracking ¶
type MockWriter ¶
func NewMockWriter ¶
func NewMockWriter() *MockWriter
func (*MockWriter) Close ¶
func (s *MockWriter) Close() error
func (*MockWriter) Rollback ¶
func (s *MockWriter) Rollback() error
type MockWriters ¶
type MockWriters struct {
// contains filtered or unexported fields
}
func NewMockWriters ¶
func NewMockWriters() *MockWriters
func (*MockWriters) Data ¶
func (s *MockWriters) Data() map[string][]map[string]interface{}
func (*MockWriters) DataByModel ¶
func (s *MockWriters) DataByModel(modelName string) (res []map[string]interface{})
type NewWriterFunc ¶
type Opts ¶
type Opts struct { Logger hclog.Logger LastProcessed LastProcessedStore NewWriter NewWriterFunc SendProgress SendProgressFunc SendProgressDone SendProgressDoneFunc }
Opts are options for New call
type ProgressLine ¶
type ProgressPath ¶
type ProgressPath []ProgressPathComponent
ProgressPath describes the path that is in progress.
Progress path example: organization/pinpoint/repo/test_repo/sourcecode.PullRequest/1
func (ProgressPath) Copy ¶
func (s ProgressPath) Copy() ProgressPath
func (ProgressPath) String ¶
func (s ProgressPath) String() string
func (ProgressPath) StringWithObjectNames ¶
func (s ProgressPath) StringWithObjectNames() string
func (ProgressPath) Strings ¶
func (s ProgressPath) Strings() (res []string)
func (ProgressPath) StringsWithObjectNames ¶
func (s ProgressPath) StringsWithObjectNames() (res []string)
type ProgressPathComponent ¶
type ProgressPathComponent struct { // ModelName is set for model sessions ModelName string // TrackingName is set for tracking sessions TrackingName string // ObjectName is to describe a specific object in model or tracking session ObjectName string // ObjectID is to describe a specific object in model or tracking session ObjectID string }
ProgressComponent describes one component of progress path.
type ProgressStatus ¶
type ProgressTracker ¶
type ProgressTracker struct {
// contains filtered or unexported fields
}
func NewProgressTracker ¶
func NewProgressTracker() *ProgressTracker
func (*ProgressTracker) Done ¶
func (s *ProgressTracker) Done(path []string)
func (*ProgressTracker) InProgressString ¶
func (s *ProgressTracker) InProgressString() string
func (*ProgressTracker) ProgressLines ¶
func (s *ProgressTracker) ProgressLines(pathSep string, skipDone bool) (res []ProgressLine)
func (*ProgressTracker) ProgressLinesNested ¶
func (s *ProgressTracker) ProgressLinesNested(skipDone bool) *ProgressStatus
func (*ProgressTracker) ProgressLinesNestedMap ¶
func (s *ProgressTracker) ProgressLinesNestedMap(skipDone bool) map[string]interface{}
func (*ProgressTracker) Update ¶
func (s *ProgressTracker) Update(path []string, current, total int)
type SendProgressDoneFunc ¶
type SendProgressDoneFunc func(pp ProgressPath)
type SendProgressFunc ¶
type SendProgressFunc func(pp ProgressPath, current, total int)
type WriterDedup ¶
type WriterDedup struct {
// contains filtered or unexported fields
}
func NewWriterDedup ¶
func NewWriterDedup(wr Writer, ds DedupStore, modelName string) *WriterDedup
func (*WriterDedup) Close ¶
func (s *WriterDedup) Close() error
func (*WriterDedup) Rollback ¶
func (s *WriterDedup) Rollback() error
Click to show internal directories.
Click to hide internal directories.