text

package
v0.5.11 Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2026 License: MIT Imports: 4 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

type Archive interface {
	arch.Packager

	// Load reads the prepared archive file line by line and feeds the lines
	// into the channel. It is assumed that each line contains one scientific
	// name. Context allows to cancel the process in case if it receives a Done
	// signal. The nomCode setting helps to interprete names according to
	// Botanical code, if needed. The method parses each name and feeds the
	// results into the channel as a NameUsage object. It returns error if
	// anything goes wrong.
	Load(
		ctx context.Context,
		ch chan<- coldp.NameUsage,
		jobsNum int,
		nomCode nomcode.Code,
	) error

	// Write receives NameUsage objects from the channel and writes them to
	// the text Archive file, one name per line. Context allows to cancel the
	// process if it receives a Done signal. It returns error if anything
	// goes wrong.
	Write(
		ctx context.Context,
		ch <-chan coldp.NameUsage,
	) error

	// FilePath returns the path to the file with scientific names.
	FilePath() string
}

Archive is the simplest biodiversity archive. It consists of a list of names separated by new lines.

Jump to

Keyboard shortcuts

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