importing

package
v0.0.0-...-01875d1 Latest Latest
Warning

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

Go to latest
Published: Oct 18, 2019 License: GPL-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ChunkAndCopy

type ChunkAndCopy struct {
	Blobstore blobs.Blobstore
}

func (*ChunkAndCopy) Run

func (ct *ChunkAndCopy) Run(state *ImportState) (*ImportState, ImportResult, error)

type ChunkAndTrack

type ChunkAndTrack struct {
	ExternalStore *bsexternal.Blobstore
}

func (*ChunkAndTrack) Run

type CommitStage

type CommitStage struct {
	CatalogServer *catalogs.Server
}

func (*CommitStage) Run

func (cs *CommitStage) Run(state *ImportState) (*ImportState, ImportResult, error)

type IdeaStage

type IdeaStage struct {
	IdeaStore content.IdeaStore
}

func (*IdeaStage) Run

func (is *IdeaStage) Run(state *ImportState) (*ImportState, ImportResult, error)

type ImportArgs

type ImportArgs struct {
	Input interface {
		io.ReadSeeker
		io.Closer
	}
	Filename     string
	ContentClass string
	KeepExternal bool
}

type ImportFailure

type ImportFailure struct {
	Reason string
}

type ImportPipeline

type ImportPipeline []ImportStage

func (ImportPipeline) Run

func (ip ImportPipeline) Run(ia *ImportArgs) (res ImportResult, err error)

type ImportResult

type ImportResult struct {
	*ImportSuccess
	*ImportFailure
}

type ImportStage

type ImportStage interface {
	Run(args *ImportState) (*ImportState, ImportResult, error)
}

Import stage takes in an import state, and returns either and import state, an import result, or and error.

type ImportState

type ImportState struct {
	ImportArgs

	Info           parsers.Info
	Chunks         []content.Chunk
	Idea           content.Idea
	IdeaID, ReprID blobs.ID
	Repr           content.Repr
}

type ImportSuccess

type ImportSuccess struct {
	IdeaID, ReprID blobs.ID
	TimeToComplete time.Duration
}

type IndexStage

type IndexStage struct {
	Indexes   map[string]index.Index
	Idea2Repr index.Index
	Root      index.Tree
}

func (*IndexStage) Run

func (is *IndexStage) Run(state *ImportState) (*ImportState, ImportResult, error)

type ParsingStage

type ParsingStage struct{}

func (*ParsingStage) Run

type ReprStage

type ReprStage struct {
	ReprStore content.ReprStore
}

func (*ReprStage) Run

func (rs *ReprStage) Run(state *ImportState) (*ImportState, ImportResult, error)

Jump to

Keyboard shortcuts

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