concordances

package
v1.8.2 Latest Latest
Warning

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

Go to latest
Published: May 7, 2024 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AuthorityFromURI

func AuthorityFromURI(uri string) (string, bool)

func AuthorityToURI

func AuthorityToURI(authority string) (string, bool)

Types

type Concept

type Concept struct {
	ID     string `json:"id"`
	APIURL string `json:"apiUrl"`
}

Concept is a concept equivilant to a thing

type Concordance

type Concordance struct {
	Concept    Concept    `json:"concept,omitempty"`
	Identifier Identifier `json:"identifier,omitempty"`
}

Concordance is the structure used for the people API

type Concordances

type Concordances struct {
	Concordance []Concordance `json:"concordances,omitempty"`
}

Concordances is a list of concordances wrapped like this for parity in the JSON currently produced

type CypherDriver

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

CypherDriver struct

func NewCypherDriver

func NewCypherDriver(driver *cmneo4j.Driver, publicAPIURL string) (CypherDriver, error)

NewCypherDriver instantiate driver

func (CypherDriver) CheckConnectivity

func (cd CypherDriver) CheckConnectivity() error

CheckConnectivity tests neo4j by running a simple cypher query

func (CypherDriver) ReadByAuthority

func (cd CypherDriver) ReadByAuthority(authority string, identifierValues []string) (concordances Concordances, found bool, err error)

func (CypherDriver) ReadByConceptID

func (cd CypherDriver) ReadByConceptID(identifiers []string) (concordances Concordances, found bool, err error)

type Driver

type Driver interface {
	ReadByConceptID(ids []string) (concordances Concordances, found bool, err error)
	ReadByAuthority(authority string, ids []string) (concordances Concordances, found bool, err error)
	CheckConnectivity() error
}

Driver interface

type HTTPHandler added in v1.5.0

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

func NewHTTPHandler added in v1.5.0

func NewHTTPHandler(log *logger.UPPLogger, driver Driver, cacheControlHeader string) *HTTPHandler

func (*HTTPHandler) GTG added in v1.5.1

func (hh *HTTPHandler) GTG() gtg.Status

GTG lightly checks the application and conforms to the FT standard GTG format

func (*HTTPHandler) GetConcordances added in v1.5.0

func (hh *HTTPHandler) GetConcordances(w http.ResponseWriter, r *http.Request)

GetConcordances is the public API

func (*HTTPHandler) HealthCheck added in v1.5.1

func (hh *HTTPHandler) HealthCheck(serviceName string) fthealth.TimedHealthCheck

HealthCheck provides an FT standard timed healthcheck for the /__health endpoint

type Identifier

type Identifier struct {
	Authority       string `json:"authority"`
	IdentifierValue string `json:"identifierValue"`
}

Identifier identifies the concept with alternative identity

Jump to

Keyboard shortcuts

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