Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var FMap = map[string]string{
"created_at": "s.created_at",
"updated_at": "s.updated_at",
"depositor": "s.depositor",
"summary": "s.summary",
"id": "s.stock_id",
"gene": "s.genes",
"plasmid": "stock_prop.plasmid",
"species": "stock_prop.species",
"name": "stock_prop.names",
"label": "stock_prop.label",
"ontology": "cv.metadata.namespace",
"tag": "cvterm.label",
"parent": "parent",
"plasmid_name": "name",
}
FMap maps filters to database fields
Functions ¶
func NewStockRepo ¶
func NewStockRepo(connP *manager.ConnectParams, collP *CollectionParams, ontoP *ontoarango.CollectionParams, ) (repository.StockRepository, error)
NewStockRepo acts as constructor for database
Types ¶
type CollectionParams ¶
type CollectionParams struct {
// Stock is the collection for storing all stocks
Stock string `validate:"required"`
// Stockprop is the collection for storing stock properties
StockProp string `validate:"required"`
// StockKeyGenerator is the collection for generating unique stock IDs
StockKeyGenerator string `validate:"required"`
// StockType is the edge collection for connecting stocks to their types
StockType string `validate:"required"`
// ParentStrain is the edge collection for connecting strains to their parents
ParentStrain string `validate:"required"`
// StockPropTypeGraph is the named graph for connecting stock properties to types
StockPropTypeGraph string `validate:"required"`
// Strain2ParentGraph is the named graph for connecting strains to their parents
Strain2ParentGraph string `validate:"required"`
// KeyOffset is the initial offset for stock id generation. It is needed to
// maintain the previous stock identifiers.
KeyOffset int `validate:"required"`
// StockTerm is the edge collection for connecting stock with an ontology
// term
StockTerm string `validate:"required"`
// StockOntoGraph is the named graph for connecting stock
// with the ontology
StockOntoGraph string `validate:"required"`
// StrainOntology is the name ontology for storing strain group
StrainOntology string `validate:"required"`
// PlasmidOntology is the name ontology for storing plasmid keyword
PlasmidOntology string `validate:"required"`
}
CollectionParams are the arangodb collections required for storing stocks
type PairWiseIterator ¶
type PairWiseIterator struct {
// contains filtered or unexported fields
}
PairWiseIterator is the container for iterator
func NewPairWiseIterator ¶
func NewPairWiseIterator(m []*model.StockDoc) (*PairWiseIterator, error)
NewPairWiseIterator is the constructor, returns error in case of empty or slice with single element
func (*PairWiseIterator) NextPair ¶
func (p *PairWiseIterator) NextPair() bool
NextPair moves the iteration to the next pair. If NextPair() returns true the pair could be retrieved by Pair() method. If it is called for the first time it points to the first pair.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.