Versions in this module Expand all Collapse all v0 v0.0.1 Sep 22, 2026 Changes in this version + const SchemaVersion + var AllRoles = []Role + var Build = "n/a" + var ErrBHLnamesNoMatch = bhlnames.ErrNoMatch + var ErrBibTeXParse = bibtex.ErrParse + var ErrConflict = errors.New("core: conflict") + var ErrExists = errors.New("core: archive already exists") + var ErrNotFound = errors.New("core: not found") + var ErrOpenAlexNotFound = openalex.ErrNotFound + var ErrReadOnly = errors.New("core: archive is read-only") + var ErrValidation = errors.New("core: validation failed") + var RuleFixtures = buildRuleFixtures() + var Schema string + var Version = "v0.0.1" + func ActorFromContext(ctx context.Context) string + func BHLnames() *bhlnames.Client + func GetVersion() gnvers.Version + func ItalicForRank(rankID string) bool + func NameRawStatus(nameID string) string + func NomenCodePrefix(sfgaCodeID string) string + func NomenDowncast(uri string) string + func NomenLabelFor(uri string) string + func OpenAlex() *openalex.Client + func ParseBibTeX(input string) (*coldp.Reference, error) + func ParseNomStatus(s string) coldp.NomStatus + func ParseRank(s string) coldp.Rank + func PrimaryReferenceID(raw string) string + func ReferenceLabel(r *coldp.Reference) string + func SeedNomenIntoNomStatus(ctx context.Context, db *sql.DB) error + func WithActor(ctx context.Context, actor string) context.Context + type Agent struct + City string + Country string + Department string + Email string + Family string + Given string + ID int + Note string + Orcid string + Organisation string + Role Role + RorID string + State string + URL string + func FromActor(role Role, a coldp.Actor) Agent + func (a Agent) ToActor() coldp.Actor + type Archive struct + func Create(path string) (*Archive, error) + func Open(path string, opts ...OpenOption) (*Archive, error) + func (a *Archive) Ancestors(ctx context.Context, id string) ([]string, error) + func (a *Archive) Classification(ctx context.Context, id string) ([]TaxonHit, error) + func (a *Archive) ClearRuleConfig(ctx context.Context, ruleID string) error + func (a *Archive) ClearRulesetConfig(ctx context.Context, name string) error + func (a *Archive) Close() error + func (a *Archive) CodeForParent(ctx context.Context, parentID string) (string, error) + func (a *Archive) CreateNamePrefix(ctx context.Context, parentID string) (string, error) + func (a *Archive) DB() *sql.DB + func (a *Archive) GetAgent(ctx context.Context, role Role, id int) (*Agent, error) + func (a *Archive) GetDistribution(ctx context.Context, rowid int64) (*DistributionHit, error) + func (a *Archive) GetMetadata(ctx context.Context) (*Metadata, error) + func (a *Archive) GetName(ctx context.Context, id string) (*coldp.Name, error) + func (a *Archive) GetReference(ctx context.Context, id string) (*coldp.Reference, error) + func (a *Archive) GetRuleConfig(ctx context.Context, ruleID string) (*RuleConfig, error) + func (a *Archive) GetRulesetConfig(ctx context.Context, name string) (*RulesetConfig, error) + func (a *Archive) GetSpeciesInteraction(ctx context.Context, rowid int64) (*SpeciesInteractionHit, error) + func (a *Archive) GetSynonym(ctx context.Context, taxonID, nameID string) (*coldp.Synonym, error) + func (a *Archive) GetTaxon(ctx context.Context, id string) (*coldp.Taxon, error) + func (a *Archive) GetTypeMaterial(ctx context.Context, rowid int64) (*TypeMaterialHit, error) + func (a *Archive) GetVernacular(ctx context.Context, rowid int64) (*VernacularHit, error) + func (a *Archive) IsReadOnly() bool + func (a *Archive) IssueSummary(ctx context.Context) ([]IssueSummaryRow, error) + func (a *Archive) ListAgents(ctx context.Context, role Role) ([]Agent, error) + func (a *Archive) ListChildren(ctx context.Context, parentID string) ([]TaxonHit, error) + func (a *Archive) ListChildrenPage(ctx context.Context, parentID string, limit, offset int) ([]TaxonHit, int, error) + func (a *Archive) ListDistributions(ctx context.Context, taxonID string) ([]DistributionHit, error) + func (a *Archive) ListIssues(ctx context.Context, f IssueFilter, limit, offset int) ([]Issue, int, error) + func (a *Archive) ListNameRelations(ctx context.Context, id string) ([]NameRelationHit, error) + func (a *Archive) ListReferencesPage(ctx context.Context, limit, offset int) ([]ReferenceHit, int, error) + func (a *Archive) ListRuleConfigs(ctx context.Context) ([]RuleConfig, error) + func (a *Archive) ListRulesetConfigs(ctx context.Context) ([]RulesetConfig, error) + func (a *Archive) ListSpeciesInteractionTypes(ctx context.Context) ([]VocabTermDetail, error) + func (a *Archive) ListSpeciesInteractions(ctx context.Context, taxonID string) ([]SpeciesInteractionHit, error) + func (a *Archive) ListSynonymHits(ctx context.Context, taxonID string) ([]SynonymHit, error) + func (a *Archive) ListSynonyms(ctx context.Context, taxonID string) ([]coldp.Synonym, error) + func (a *Archive) ListTypeMaterials(ctx context.Context, nameID string) ([]TypeMaterialHit, error) + func (a *Archive) ListVernaculars(ctx context.Context, taxonID string) ([]VernacularHit, error) + func (a *Archive) MetadataWarnings(ctx context.Context, metadataID int) []ValidationWarning + func (a *Archive) NameDependencies(ctx context.Context, nameID string) (NameDependencies, error) + func (a *Archive) NameRef(ctx context.Context, id string) (Ref, error) + func (a *Archive) NameWarnings(ctx context.Context, nameID string) []ValidationWarning + func (a *Archive) NomenclaturalHistory(ctx context.Context, taxonID string) (*NomenclaturalHistory, error) + func (a *Archive) ParseNamePreview(codeID, verbatim string) (*coldp.Name, string) + func (a *Archive) Path() string + func (a *Archive) RefreshTimeBasedIssues(ctx context.Context) error + func (a *Archive) ReindexValidation(ctx context.Context, progress func(ReindexProgress)) error + func (a *Archive) SchemaVersion(ctx context.Context) (string, error) + func (a *Archive) SearchNames(ctx context.Context, q string, limit int) ([]NameHit, error) + func (a *Archive) SearchReferences(ctx context.Context, q string, limit int) ([]ReferenceHit, error) + func (a *Archive) SearchTaxa(ctx context.Context, q string, opts SearchOpts) ([]TaxonHit, error) + func (a *Archive) SetRuleConfig(ctx context.Context, cfg RuleConfig) error + func (a *Archive) SetRulesetConfig(ctx context.Context, name string, enabled bool) error + func (a *Archive) Sflib() sfga.Archive + func (a *Archive) SynonymPartners(ctx context.Context, synonymID string) ([]string, error) + func (a *Archive) TaxonDeletePreview(ctx context.Context, id string) (TaxonDeletePreview, error) + func (a *Archive) TaxonRef(ctx context.Context, id string) (Ref, error) + func (a *Archive) TaxonWarnings(ctx context.Context, taxonID string) []ValidationWarning + func (a *Archive) ValidChildRanks(ctx context.Context, parentID string) ([]ui.ChildRank, error) + func (a *Archive) ValidateName(ctx context.Context, nameID string) ([]*domain.Result, error) + func (a *Archive) Vocabulary(ctx context.Context) (*Vocabulary, error) + func (a *Archive) WithTx(ctx context.Context, fn func(*Tx) error) error + type BHLnameHit = bhlnames.Hit + type BHLnameLookupOpts = bhlnames.LookupOpts + type Country struct + Alpha3 string + Continent string + ID string + Name string + func Countries() ([]Country, error) + type DistributionHit struct + Area string + AreaID string + Gazetteer coldp.GazetteerEnt + IssueCount int + MaxSeverity string + Modified string + ModifiedBy string + ReferenceID string + Remarks string + RowID int64 + SourceID string + Status coldp.DistrStatus + TaxonID string + type FixtureCase struct + Note string + Setup func(context.Context, *Archive) error + type Issue struct + AcknowledgedAt string + AcknowledgedBy string + ActualValue string + CreatedAt string + Enforcement string + ExpectedValue string + FieldName string + ID string + LinkTaxonID string + Message string + RecordID string + RecordLabel string + RuleID string + RuleName string + Severity string + TableName string + type IssueFilter struct + HideAcknowledged bool + RecordID string + RuleID string + Severities []string + TableName string + type IssueSummary struct + Count int + MaxSeverity string + type IssueSummaryRow struct + Count int + RuleID string + RuleName string + Severity string + TableName string + type Label struct + HTML string + Text string + func BuildLabel(canonical, authorship, rankID string, extinct bool) Label + type Language struct + ID string + Name string + func Languages() ([]Language, error) + type Metadata struct + Alias string + Citation string + Completeness *int + Confidence *int + DOI string + Description string + GeographicScope string + ID int + Issued string + Keywords string + Label string + License string + Logo string + Private *bool + TaxonomicScope string + TemporalScope string + Title string + URL string + Version string + type NameDependencies struct + NameRelationCount int + SynonymCount int + TaxonCount int + func (d NameDependencies) Total() int + type NameHit struct + Authorship string + Code string + Full string + ID string + Rank string + Scientific string + Status string + type NameRelationHit struct + CounterpartID string + Direction string + Page string + ReferenceID string + Remarks string + RowID int64 + Type string + type NomenCluster struct + Names []NomenName + Role string + type NomenName struct + Authorship string + BasionymAuthorship string + BasionymAuthorshipYear string + CombinationAuthorship string + CombinationAuthorshipYear string + Involvement string + IsBasionym bool + IssueCount int + Label Label + MaxSeverity string + NameID string + Rank string + ReferenceID string + SynonymID string + Year string + type NomenTerm struct + Class string + Code string + ColStatus string + Comment string + GbifStatus string + ID string + Kind string + Label string + Local string + Parent string + Popular bool + func Nomen() ([]NomenTerm, error) + type NomenclaturalHistory struct + Clusters []NomenCluster + type OpenOption func(*openOpts) + func ReadOnly() OpenOption + type Ref struct + ID string + Label Label + type ReferenceHit struct + Author string + Citation string + ID string + IssueCount int + MaxSeverity string + Title string + Type string + Year string + type ReindexProgress struct + Current string + Done int + Table string + Total int + type Role string + const RoleContact + const RoleContributor + const RoleCreator + const RoleEditor + const RolePublisher + func ParseRole(s string) (Role, error) + type RuleConfig struct + Enabled *bool + RuleID string + SeverityOverride string + UpdatedAt string + UpdatedBy string + type RuleFixture struct + Bad []FixtureCase + Description string + Good []FixtureCase + RuleID string + type RulesetConfig struct + Enabled bool + RulesetName string + UpdatedAt string + UpdatedBy string + type SearchMode string + const SearchModeFuzzy + const SearchModePartial + const SearchModePrefix + type SearchOpts struct + IncludeSynonyms bool + Limit int + Mode SearchMode + type SexTerm struct + Description string + ID string + Name string + Symbol string + func SexTerms() ([]SexTerm, error) + type SpeciesInteractionHit struct + IssueCount int + Modified string + ModifiedBy string + ReferenceID string + RelatedTaxonID string + RelatedTaxonLabel Label + RelatedTaxonScientificName string + Remarks string + RowID int64 + SourceID string + TaxonID string + Type coldp.SpInteractionType + TypeRaw string + type SynonymHit struct + ID string + Label Label + Link string + Modified string + ModifiedBy string + NameID string + NamePhrase string + ReferenceID string + Remarks string + Status string + TaxonID string + type TaxonDeletePreview struct + DescendantCount int + DirectChildCount int + DistributionCount int + MediaCount int + ParentID string + SpeciesEstimateCount int + SpeciesInteractionCount int + SynonymCount int + TaxonConceptRelationCount int + TaxonPropertyCount int + TreatmentCount int + VernacularCount int + type TaxonHit struct + Authorship string + Extinct sql.NullBool + HasChildren bool + ID string + IsSynonym bool + Label Label + MatchedName string + Name string + NameID string + ParentAuthorship string + ParentID string + ParentLabel Label + ParentName string + ParentRank string + Rank string + Status string + type Tx struct + func (t *Tx) Actor() string + func (t *Tx) AddDistribution(d coldp.Distribution) (int64, error) + func (t *Tx) AddSpeciesInteraction(s coldp.SpeciesInteraction, typeRaw string) (int64, error) + func (t *Tx) AddSpeciesInteractionType(term VocabTermDetail) error + func (t *Tx) AddSynonym(s coldp.Synonym) (string, error) + func (t *Tx) AddSynonymTaxon(synonymID, additionalTaxonID string) error + func (t *Tx) AddTypeMaterial(m coldp.TypeMaterial) (int64, error) + func (t *Tx) AddVernacular(v coldp.Vernacular) (int64, error) + func (t *Tx) BackfillAuthorshipYears(nameID string) error + func (t *Tx) CascadeDeleteTaxon(id string) error + func (t *Tx) Context() context.Context + func (t *Tx) CopyAgentToRole(fromRole Role, id int, toRole Role, blankNote bool) (int, error) + func (t *Tx) CreateAgent(ag Agent) (int, error) + func (t *Tx) CreateName(n coldp.Name) (string, error) + func (t *Tx) CreateReference(r coldp.Reference) (string, error) + func (t *Tx) CreateTaxon(taxon coldp.Taxon) (string, error) + func (t *Tx) DeleteAgent(role Role, id int) error + func (t *Tx) DeleteDistribution(rowid int64) error + func (t *Tx) DeleteName(id string) error + func (t *Tx) DeleteReference(id string) error + func (t *Tx) DeleteSpeciesInteraction(rowid int64) error + func (t *Tx) DeleteSpeciesInteractionType(id string) error + func (t *Tx) DeleteTaxon(id string) error + func (t *Tx) DeleteTypeMaterial(rowid int64) error + func (t *Tx) DeleteVernacular(rowid int64) error + func (t *Tx) LinkNameRelation(n coldp.NameRelation) error + func (t *Tx) MoveAgentToRole(fromRole Role, id int, toRole Role, blankNote bool) (int, error) + func (t *Tx) MoveSynonym(id, newTaxonID string) error + func (t *Tx) MoveTaxon(id, newParentID string) error + func (t *Tx) RemoveSynonym(taxonID, nameID string) error + func (t *Tx) RemoveSynonymByID(id string) (taxonID, nameID string, err error) + func (t *Tx) ReparentAndDeleteTaxon(id string) error + func (t *Tx) SQL() *sql.Tx + func (t *Tx) SetNameStatus(nameID, status string) error + func (t *Tx) UnlinkNameRelation(rowid int64) error + func (t *Tx) UpdateAgent(ag Agent) error + func (t *Tx) UpdateDistribution(rowid int64, d coldp.Distribution) error + func (t *Tx) UpdateMetadata(m Metadata) error + func (t *Tx) UpdateName(n coldp.Name) error + func (t *Tx) UpdateReference(r coldp.Reference) error + func (t *Tx) UpdateSpeciesInteraction(rowid int64, s coldp.SpeciesInteraction, typeRaw string) error + func (t *Tx) UpdateSpeciesInteractionType(term VocabTermDetail) error + func (t *Tx) UpdateSynonym(s coldp.Synonym) error + func (t *Tx) UpdateTaxon(taxon coldp.Taxon) error + func (t *Tx) UpdateTypeMaterial(rowid int64, m coldp.TypeMaterial) error + func (t *Tx) UpdateVernacular(rowid int64, v coldp.Vernacular) error + type TypeMaterialHit struct + Altitude sql.NullInt64 + AssociatedSequences string + CatalogNumber string + Citation string + Collector string + Country string + Date string + Host string + InstitutionCode string + IssueCount int + Latitude sql.NullFloat64 + Link string + Locality string + Longitude sql.NullFloat64 + MaxSeverity string + Modified string + ModifiedBy string + NameID string + ReferenceID string + Remarks string + RowID int64 + Sex coldp.Sex + SourceID string + SpecimenID string + Status coldp.TypeStatus + type ValidationWarning struct + FieldName string + Message string + RuleID string + RuleName string + Severity string + type VernacularHit struct + Area string + Country string + IssueCount int + Language string + MaxSeverity string + Modified string + ModifiedBy string + Name string + Preferred sql.NullBool + ReferenceID string + Remarks string + RowID int64 + Sex coldp.Sex + SourceID string + TaxonID string + Transliteration string + type VocabTerm struct + ID string + Name string + type VocabTermDetail struct + Description string + ID string + Inverse string + Name string + Obo string + SuperTypes string + Symmetrical bool + type Vocabulary struct + DistributionStatus []VocabTerm + EstimateType []VocabTerm + Gazetteer []VocabTerm + Gender []VocabTerm + GeoTime []VocabTerm + Licenses []VocabTerm + MatchType []VocabTerm + NamePart []VocabTerm + NomCode []VocabTerm + NomRelType []VocabTerm + NomStatus []VocabTerm + Rank []VocabTerm + ReferenceType []VocabTerm + Sex []VocabTerm + SpeciesInteractionType []VocabTerm + TaxonConceptRelType []VocabTerm + TaxonomicStatus []VocabTerm + TypeStatus []VocabTerm