public-people-api: Index | Files

package people

import ""


Package Files

converter.go handlers.go healthcheck.go models.go

type ChangeEvent Uses

type ChangeEvent struct {
    StartedAt string `json:"startedAt,omitempty"`
    EndedAt   string `json:"endedAt,omitempty"`

ChangeEvent represent when something started or ended

type Concept Uses

type Concept struct {
    ID        string `json:"id"`
    APIURL    string `json:"apiUrl"`
    Type      string `json:"type"`
    PrefLabel string `json:"prefLabel"`
    // Additional fields
    Description string `json:"description,omitempty"`
    ImageURL    string `json:"imageURL,omitempty"`
    // Account contains the values of:
    // * emailAddress
    // * facebookPage
    // * twitterHandle
    Account []TypedValue `json:"account,omitempty"`
    // AlternativeLabels contains the values of:
    // * aliases
    // * formerNames
    // * hiddenLabel
    // * legalName
    // * properName
    // * shortName
    // * tradeNames
    AlternativeLabels []TypedValue  `json:"alternativeLabels,omitempty"`
    ChangeEvents      []ChangeEvent `json:"changeEvents,omitempty"`
    // Person
    Salutation     string `json:"salutation,omitempty"`
    BirthYear      int    `json:"birthYear,omitempty"`
    DescriptionXML string `json:"descriptionXML,omitempty"`
    // Membership
    InceptionDate   string `json:"inceptionDate,omitempty"`
    TerminationDate string `json:"terminationDate,omitempty"`
    // Organisation
    CountryCode            string `json:"countryCode,omitempty"`
    CountryOfIncorporation string `json:"countryOfIncorporation,omitempty"`
    LeiCode                string `json:"leiCode,omitempty"`
    PostalCode             string `json:"postalCode,omitempty"`
    YearFounded            int    `json:"yearFounded,omitempty"`
    // Relations
    BroaderConcepts  []PredicateConcept `json:"broaderConcepts,omitempty"`
    NarrowerConcepts []PredicateConcept `json:"narrowerConcepts,omitempty"`
    RelatedConcepts  []PredicateConcept `json:"relatedConcepts,omitempty"`
    IsDeprecated     bool               `json:"isDeprecated,omitempty"`

type Handler Uses

type Handler struct {
    // contains filtered or unexported fields

func NewHandler Uses

func NewHandler(cacheDuration time.Duration, publicConceptsApiURL string, c *http.Client) *Handler

func (*Handler) Checker Uses

func (h *Handler) Checker() (string, error)

func (*Handler) GetPerson Uses

func (h *Handler) GetPerson(w http.ResponseWriter, r *http.Request)

GetPerson is the public API

func (*Handler) Healthchecks Uses

func (h *Handler) Healthchecks() fthealth.Check

func (*Handler) RegisterHandlers Uses

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

type HealthConfig Uses

type HealthConfig struct {
    AppSystemCode     string
    AppName           string
    Description       string
    ReqLoggingEnabled bool

type HealthcheckService Uses

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

func NewHealthCheckService Uses

func NewHealthCheckService(checks []fthealth.Check, config HealthConfig) *HealthcheckService

func (HealthcheckService) RegisterAdminHandlers Uses

func (s HealthcheckService) RegisterAdminHandlers(router *mux.Router) http.Handler

type Membership Uses

type Membership struct {
    Title        string        `json:"title,omitempty"`
    Types        []string      `json:"types"`
    DirectType   string        `json:"directType,omitempty"`
    Organisation Organisation  `json:"organisation"`
    ChangeEvents []ChangeEvent `json:"changeEvents,omitempty"`
    Roles        []Role        `json:"roles"`

Membership represents the relationship between a person and their roles associated with an organisation

type Organisation Uses

type Organisation struct {
    Types      []string `json:"types"`
    DirectType string   `json:"directType,omitempty"`
    Labels     []string `json:"labels,omitempty"`

Organisation simplified representation used in Person API

type Person Uses

type Person struct {
    Types           []string     `json:"types"`
    DirectType      string       `json:"directType,omitempty"`
    Labels          []string     `json:"labels,omitempty"`
    Memberships     []Membership `json:"memberships,omitempty"`
    Salutation      string       `json:"salutation,omitempty"`
    BirthYear       int          `json:"birthYear,omitempty"`
    EmailAddress    string       `json:"emailAddress,omitempty"`
    TwitterHandle   string       `json:"twitterHandle,omitempty"`
    FacebookProfile string       `json:"facebookProfile,omitempty"`
    Description     string       `json:"description,omitempty"`
    DescriptionXML  string       `json:"descriptionXML,omitempty"`
    ImageURL        string       `json:"_imageUrl,omitempty"` // TODO we should implement this properly as an imageset
    IsDeprecated    bool         `json:"isDeprecated,omitempty"`

Person is the structure used for the people API

type PredicateConcept Uses

type PredicateConcept struct {
    Concept   Concept `json:"concept"`
    Predicate string  `json:"predicate"`

type Role Uses

type Role struct {
    Types        []string      `json:"types"`
    DirectType   string        `json:"directType,omitempty"`
    ChangeEvents []ChangeEvent `json:"changeEvents,omitempty"`

Role represents the capacity or funciton that a person performs for an organisation

type Thing Uses

type Thing struct {
    ID        string `json:"id"`
    APIURL    string `json:"apiUrl"` // self ?
    PrefLabel string `json:"prefLabel,omitempty"`

Thing is the base entity, all nodes in neo4j should have these properties

type TypedValue Uses

type TypedValue struct {
    Type  string      `json:"type"`
    Value interface{} `json:"value"`

Package people imports 21 packages (graph). Updated 2018-11-02. Refresh now. Tools for package owners.