datasource

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Oct 21, 2026 License: BSD-2-Clause Imports: 25 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewPublication

func NewPublication(
	p *PublicationParams,
) IOE.IOEither[error, *Publication]

NewPublication builds the publication source over the NCBI eUtils client. Configured identity values ride on every request per the NCBI usage policy.

Types

type Annotation

type Annotation struct {
	Client annotation.TaggedAnnotationServiceClient
}

func (*Annotation) GetBasicStrainInfo

func (an *Annotation) GetBasicStrainInfo(strains []*stock.Strain) ([][]string, error)

func (*Annotation) GetPlasmidInv

func (an *Annotation) GetPlasmidInv(plasmids []*stock.Plasmid) ([][]string, error)

func (*Annotation) GetStrainInfo

func (an *Annotation) GetStrainInfo(strains []*stock.Strain) ([][]string, error)

func (*Annotation) GetStrainInv

func (an *Annotation) GetStrainInv(strains []*stock.Strain) ([][]string, error)

type PubInfo

type PubInfo struct {
	AuthorStr string
	PubmedURL string
	DoiURL    string
}

PubInfo is the citation snippet rendered into an invoice row.

type Publication

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

Publication resolves PubMed identifiers into citation snippets.

func (*Publication) ParsedInfo

func (p *Publication) ParsedInfo(pmid string) IOE.IOEither[error, *PubInfo]

ParsedInfo fetches one article and formats its citation snippet.

type PublicationParams

type PublicationParams struct {
	APIKey string
	Tool   string
	Email  string
}

PublicationParams carries the optional NCBI request identity. Blank values leave the corresponding parameter out of every request, so an all-empty struct preserves the unauthenticated behavior.

type Sources

type Sources struct {
	AnnoSource  *Annotation
	StockSource *Stock
	PubSource   *Publication
}

func GrpcSources

func GrpcSources(mc map[string]*grpc.ClientConn) *Sources

type Stock

type Stock struct {
	Client stock.StockServiceClient
}

func (*Stock) GetBasicPlasmidInfo

func (st *Stock) GetBasicPlasmidInfo(plasmids []*stock.Plasmid) ([][]string, error)

func (*Stock) GetPlasmids

func (st *Stock) GetPlasmids(ids []string) ([]*stock.Plasmid, error)

func (*Stock) GetStrains

func (st *Stock) GetStrains(ids []string) ([]*stock.Strain, error)

func (*Stock) StocksFromItems

func (st *Stock) StocksFromItems(ord *order.Order, pattern string) []string

type StockServiceClient

type StockServiceClient struct {
	mock.Mock
}

StockServiceClient is an autogenerated mock type for the StockServiceClient type

func (*StockServiceClient) CreatePlasmid

func (_m *StockServiceClient) CreatePlasmid(ctx context.Context, in *stock.NewPlasmid, opts ...grpc.CallOption) (*stock.Plasmid, error)

CreatePlasmid provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) CreateStrain

func (_m *StockServiceClient) CreateStrain(ctx context.Context, in *stock.NewStrain, opts ...grpc.CallOption) (*stock.Strain, error)

CreateStrain provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) GetPlasmid

func (_m *StockServiceClient) GetPlasmid(ctx context.Context, in *stock.StockId, opts ...grpc.CallOption) (*stock.Plasmid, error)

GetPlasmid provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) GetStrain

func (_m *StockServiceClient) GetStrain(ctx context.Context, in *stock.StockId, opts ...grpc.CallOption) (*stock.Strain, error)

GetStrain provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) ListPlasmids

ListPlasmids provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) ListStrains

ListStrains provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) ListStrainsByIds

func (_m *StockServiceClient) ListStrainsByIds(ctx context.Context, in *stock.StockIdList, opts ...grpc.CallOption) (*stock.StrainList, error)

ListStrainsByIds provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) LoadPlasmid

func (_m *StockServiceClient) LoadPlasmid(ctx context.Context, in *stock.ExistingPlasmid, opts ...grpc.CallOption) (*stock.Plasmid, error)

LoadPlasmid provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) LoadStrain

func (_m *StockServiceClient) LoadStrain(ctx context.Context, in *stock.ExistingStrain, opts ...grpc.CallOption) (*stock.Strain, error)

LoadStrain provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) OboJSONFileUpload

OboJSONFileUpload provides a mock function with given fields: ctx, opts

func (*StockServiceClient) RemoveStock

func (_m *StockServiceClient) RemoveStock(ctx context.Context, in *stock.StockId, opts ...grpc.CallOption) (*empty.Empty, error)

RemoveStock provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) UpdatePlasmid

func (_m *StockServiceClient) UpdatePlasmid(ctx context.Context, in *stock.PlasmidUpdate, opts ...grpc.CallOption) (*stock.Plasmid, error)

UpdatePlasmid provides a mock function with given fields: ctx, in, opts

func (*StockServiceClient) UpdateStrain

func (_m *StockServiceClient) UpdateStrain(ctx context.Context, in *stock.StrainUpdate, opts ...grpc.CallOption) (*stock.Strain, error)

UpdateStrain provides a mock function with given fields: ctx, in, opts

type TaggedAnnotationServiceClient

type TaggedAnnotationServiceClient struct {
	mock.Mock
}

TaggedAnnotationServiceClient is an autogenerated mock type for the TaggedAnnotationServiceClient type

func (*TaggedAnnotationServiceClient) AddToAnnotationGroup

AddToAnnotationGroup provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) CreateAnnotation

CreateAnnotation provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) CreateAnnotationGroup

CreateAnnotationGroup provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) DeleteAnnotation

DeleteAnnotation provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) DeleteAnnotationGroup

func (_m *TaggedAnnotationServiceClient) DeleteAnnotationGroup(ctx context.Context, in *annotation.GroupEntryId, opts ...grpc.CallOption) (*empty.Empty, error)

DeleteAnnotationGroup provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) GetAnnotation

GetAnnotation provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) GetAnnotationGroup

GetAnnotationGroup provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) GetAnnotationTag

GetAnnotationTag provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) GetEntryAnnotation

GetEntryAnnotation provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) ListAnnotationGroups

ListAnnotationGroups provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) ListAnnotations

ListAnnotations provides a mock function with given fields: ctx, in, opts

func (*TaggedAnnotationServiceClient) OboJSONFileUpload

OboJSONFileUpload provides a mock function with given fields: ctx, opts

func (*TaggedAnnotationServiceClient) UpdateAnnotation

UpdateAnnotation provides a mock function with given fields: ctx, in, opts

Jump to

Keyboard shortcuts

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