db

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jun 15, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConsolidateAlternativeLabels added in v1.5.0

func ConsolidateAlternativeLabels(aliases []string, formerNames []string, properName, shortName string, tradeNames []string) []string

Types

type Concept

type Concept struct {
	ID                           string
	UUID                         string
	PrefLabel                    string
	APIURL                       string
	Labels                       []string
	LeiCode                      string
	FactsetIDs                   []string
	FigiCodes                    []string
	NAICSIndustryClassifications []NAICSIndustryClassification
	AlternativeLabels            []string
	// AlternativeLabels contains the values of:
	Aliases     []string
	FormerNames []string
	ProperName  string
	ShortName   string
	TradeNames  []string
}

Concept is the model for the data read from the data source

type NAICSIndustryClassification added in v1.3.0

type NAICSIndustryClassification struct {
	IndustryIdentifier string `json:"id,omitempty"`
	Rank               int    `json:"rank,omitempty"`
}

type NeoService

type NeoService struct {
	Driver *cmneo4j.Driver
	NeoURL string
}

NeoService is the implementation of Service for Neo4j

func NewNeoService

func NewNeoService(driver *cmneo4j.Driver, neoURL string) *NeoService

Returns a new NeoService

func (*NeoService) CheckConnectivity

func (s *NeoService) CheckConnectivity() (string, error)

func (*NeoService) Read

func (s *NeoService) Read(conceptType string, conceptCh chan Concept) (int, bool, error)

type Service

type Service interface {
	Read(conceptType string, conceptCh chan Concept) (int, bool, error)
}

Service reads from a data source and uses a channel to iterate on the retrieved values for the given concept type

Jump to

Keyboard shortcuts

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