gnames

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2023 License: MIT Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// Version of the gnames
	Version = "v1.1.7"
	// Build timestamp
	Build string
)

Functions

func FirstUpperCase

func FirstUpperCase(name string) string

Types

type GNames

type GNames interface {
	// Verify takes a slice of name-strings together with query parameters and
	// returns back results of verification.
	Verify(ctx context.Context, params verifier.Input) (verifier.Output, error)

	// Reconcile takes the result of verification and converts it into
	// lexical reconciliation groups.
	Reconcile(
		verif verifier.Output,
		qs map[string]reconciler.Query,
		ids []string,
	) reconciler.Output

	// ExtendReconcile takes an Extension query according to
	// Reconciliation Service API and returns back the
	// result according to the API corresponding schema.
	ExtendReconcile(
		reconciler.ExtendQuery,
	) (reconciler.ExtendOutput, error)

	// Search performs a faceted search using search parameters.
	Search(ctx context.Context, srch search.Input) search.Output

	// NameByID finds a name-string according to its UUID or exact spelling.
	NameByID(verifier.NameStringInput) (verifier.NameStringOutput, error)

	// Datasources take IDs of data-sourses and return back list of corresponding
	// metadata. If no IDs are given, it returns metadata for all data-sources.
	DataSources(ids ...int) ([]*verifier.DataSource, error)

	// GetConfig returns configuration of the GNames object.
	GetConfig() config.Config

	// GetVersion returns the version of GNames and a timestamp of its build.
	GetVersion() gnvers.Version
}

GNames is the main use-case interface of the app. Its purpose to provide metadata of registered DataSources and provide functionality for verification (resolution/reconciliation) of name-strings to known to gnames scientific names, as well as providing data where these names occur.

func NewGNames

func NewGNames(
	cfg config.Config,
	vf verifier.Verifier,
	fc facet.Facet,
) GNames

NewGNames is a constructor that returns implmentation of GNames interface.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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