concept

package
v1.91.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2020 License: MIT Imports: 24 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AggregateConceptHandler

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

func NewHandler

func NewHandler(svc Service, timeout time.Duration) AggregateConceptHandler

func (*AggregateConceptHandler) GetHandler

func (*AggregateConceptHandler) RegisterAdminHandlers

func (h *AggregateConceptHandler) RegisterAdminHandlers(router *mux.Router, healthService *HealthService, requestLoggingEnabled bool, fb chan bool) http.Handler

func (*AggregateConceptHandler) RegisterHandlers

func (h *AggregateConceptHandler) RegisterHandlers(router *mux.Router)

func (*AggregateConceptHandler) SendHandler

func (h *AggregateConceptHandler) SendHandler(w http.ResponseWriter, r *http.Request)

type AggregateService

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

func NewService

func NewService(
	S3Client s3.Client,
	conceptUpdatesSQSClient sqs.Client,
	eventsSQSClient sqs.Client,
	concordancesClient concordances.Client,
	kinesisClient kinesis.Client,
	neoAddress string,
	elasticsearchAddress string,
	varnishPurgerAddress string,
	typesToPurgeFromPublicEndpoints []string,
	httpClient httpClient,
	feedback <-chan bool,
	done <-chan struct{},
	processTimeout time.Duration) *AggregateService

func (*AggregateService) GetConcordedConcept

func (s *AggregateService) GetConcordedConcept(ctx context.Context, UUID string, bookmark string) (ConcordedConcept, string, error)

func (*AggregateService) Healthchecks

func (s *AggregateService) Healthchecks() []fthealth.Check

func (*AggregateService) ListenForNotifications

func (s *AggregateService) ListenForNotifications(ctx context.Context, workerID int)

func (*AggregateService) ProcessMessage

func (s *AggregateService) ProcessMessage(ctx context.Context, UUID string, bookmark string) error

func (*AggregateService) RWElasticsearchHealthCheck

func (s *AggregateService) RWElasticsearchHealthCheck() fthealth.Check

func (*AggregateService) RWNeo4JHealthCheck

func (s *AggregateService) RWNeo4JHealthCheck() fthealth.Check

func (*AggregateService) VarnishPurgerHealthCheck

func (s *AggregateService) VarnishPurgerHealthCheck() fthealth.Check

type ConcordedConcept

type ConcordedConcept struct {
	// Required fields
	PrefUUID  string `json:"prefUUID,omitempty"`
	PrefLabel string `json:"prefLabel,omitempty"`
	Type      string `json:"type,omitempty"`
	// Additional fields
	Aliases           []string `json:"aliases,omitempty"`
	ParentUUIDs       []string `json:"parentUUIDs,omitempty"`
	BroaderUUIDs      []string `json:"broaderUUIDs,omitempty"`
	RelatedUUIDs      []string `json:"relatedUUIDs,omitempty"`
	SupersededByUUIDs []string `json:"supersededByUUIDs,omitempty"`
	DescriptionXML    string   `json:"descriptionXML,omitempty"`
	ImageURL          string   `json:"_imageUrl,omitempty"`
	EmailAddress      string   `json:"emailAddress,omitempty"`
	FacebookPage      string   `json:"facebookPage,omitempty"`
	TwitterHandle     string   `json:"twitterHandle,omitempty"`
	ScopeNote         string   `json:"scopeNote,omitempty"`
	ShortLabel        string   `json:"shortLabel,omitempty"`
	// Brand
	Strapline string `json:"strapline,omitempty"`
	// Person
	Salutation string `json:"salutation,omitempty"`
	BirthYear  int    `json:"birthYear,omitempty"`
	// Financial Instrument
	FigiCode string `json:"figiCode,omitempty"`
	IssuedBy string `json:"issuedBy,omitempty"`
	// Membership
	InceptionDate    string           `json:"inceptionDate,omitempty"`
	MembershipRoles  []MembershipRole `json:"membershipRoles,omitempty"`
	OrganisationUUID string           `json:"organisationUUID,omitempty"`
	PersonUUID       string           `json:"personUUID,omitempty"`
	TerminationDate  string           `json:"terminationDate,omitempty"`
	// Organisation
	CountryCode            string   `json:"countryCode,omitempty"`
	CountryOfRisk          string   `json:"countryOfRisk,omitempty"`
	CountryOfIncorporation string   `json:"countryOfIncorporation,omitempty"`
	CountryOfOperations    string   `json:"countryOfOperations,omitempty"`
	FormerNames            []string `json:"formerNames,omitempty"`
	TradeNames             []string `json:"tradeNames,omitempty"`
	LeiCode                string   `json:"leiCode,omitempty"`
	PostalCode             string   `json:"postalCode,omitempty"`
	ProperName             string   `json:"properName,omitempty"`
	ShortName              string   `json:"shortName,omitempty"`
	YearFounded            int      `json:"yearFounded,omitempty"`
	IsDeprecated           bool     `json:"isDeprecated,omitempty"`
	// Location
	ISO31661 string `json:"iso31661,omitempty"`
	// Source representations
	SourceRepresentations []s3.Concept `json:"sourceRepresentations,omitempty"`
}

type HealthService

type HealthService struct {
	Checks []fthealth.Check
	// contains filtered or unexported fields
}

func NewHealthService

func NewHealthService(svc Service, appSystemCode string, appName string, port int, description string) *HealthService

func (*HealthService) GTG

func (svc *HealthService) GTG() gtg.Status

type MembershipRole

type MembershipRole struct {
	RoleUUID        string `json:"membershipRoleUUID,omitempty"`
	InceptionDate   string `json:"inceptionDate,omitempty"`
	TerminationDate string `json:"terminationDate,omitempty"`
}

type Service

type Service interface {
	ListenForNotifications(ctx context.Context, workerID int)
	ProcessMessage(ctx context.Context, UUID string, bookmark string) error
	GetConcordedConcept(ctx context.Context, UUID string, bookmark string) (ConcordedConcept, string, error)
	Healthchecks() []fthealth.Check
}

Jump to

Keyboard shortcuts

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