Documentation ¶
Index ¶
- Variables
- func NewElasticClient(region string, config EsAccessConfig) (*elastic.Client, error)
- type AWSSigningTransport
- type AggregateConceptModel
- type AggregateMembershipRole
- type BulkProcessorConfig
- type Concept
- type ConceptMetrics
- type ConceptModel
- type EsAccessConfig
- type EsConceptModel
- type EsConceptModelPatch
- type EsIDTypePair
- type EsMembershipModel
- type EsModel
- type EsPersonConceptModel
- type EsPersonConceptPatch
- type EsService
- type PayloadPatch
- type SourceConcept
Constants ¶
This section is empty.
Variables ¶
View Source
var (
ErrNoElasticClient = errors.New("no ElasticSearch client available")
)
Functions ¶
func NewElasticClient ¶
func NewElasticClient(region string, config EsAccessConfig) (*elastic.Client, error)
Types ¶
type AWSSigningTransport ¶
type AggregateConceptModel ¶
type AggregateConceptModel struct { // Required fields PrefUUID string `json:"prefUUID"` DirectType string `json:"type"` PrefLabel string `json:"prefLabel"` // Additional fields Aliases []string `json:"aliases,omitempty"` ScopeNote string `json:"scopeNote,omitempty"` // Membership MembershipRoles []AggregateMembershipRole `json:"membershipRoles,omitempty"` OrganisationUUID string `json:"organisationUUID,omitempty"` PersonUUID string `json:"personUUID,omitempty"` // Organisation CountryCode string `json:"countryCode,omitempty"` CountryOfIncorporation string `json:"countryOfIncorporation,omitempty"` IsDeprecated bool `json:"isDeprecated,omitempty"` // Source representations SourceRepresentations []SourceConcept `json:"sourceRepresentations"` }
func (AggregateConceptModel) ConcordedUUIDs ¶
func (c AggregateConceptModel) ConcordedUUIDs() []string
func (AggregateConceptModel) GetAuthorities ¶
func (c AggregateConceptModel) GetAuthorities() []string
func (AggregateConceptModel) PreferredUUID ¶
func (c AggregateConceptModel) PreferredUUID() string
type AggregateMembershipRole ¶
type BulkProcessorConfig ¶
type BulkProcessorConfig struct {
// contains filtered or unexported fields
}
func NewBulkProcessorConfig ¶
type Concept ¶
type Concept interface { // GetAuthorities returns an array containing all authorities that this concept is identified by GetAuthorities() []string // ConcordedUUIDs returns an array containing all concorded concept uuids - N.B. it will not contain the canonical prefUUID. ConcordedUUIDs() []string PreferredUUID() string }
Concept contains common function between both concept models
type ConceptMetrics ¶
type ConceptModel ¶
type ConceptModel struct { UUID string `json:"uuid"` DirectType string `json:"type"` PrefLabel string `json:"prefLabel"` Authority string `json:"authority,omitempty"` Aliases []string `json:"aliases,omitempty"` AlternativeIdentifiers map[string]interface{} `json:"alternativeIdentifiers,omitempty"` IsDeprecated bool `json:"isDeprecated,omitempty"` ScopeNote string `json:"scopeNote,omitempty"` }
func (ConceptModel) ConcordedUUIDs ¶
func (c ConceptModel) ConcordedUUIDs() []string
func (ConceptModel) GetAuthorities ¶
func (c ConceptModel) GetAuthorities() []string
func (ConceptModel) PreferredUUID ¶
func (c ConceptModel) PreferredUUID() string
type EsAccessConfig ¶
type EsAccessConfig struct {
// contains filtered or unexported fields
}
func NewAccessConfig ¶
func NewAccessConfig(accessKey string, secretKey string, endpoint string, tracelogging bool) EsAccessConfig
type EsConceptModel ¶
type EsConceptModel struct { Id string `json:"id"` ApiUrl string `json:"apiUrl"` PrefLabel string `json:"prefLabel"` Types []string `json:"types"` Authorities []string `json:"authorities"` DirectType string `json:"directType"` Aliases []string `json:"aliases,omitempty"` LastModified string `json:"lastModified"` PublishReference string `json:"publishReference"` IsDeprecated bool `json:"isDeprecated,omitempty"` // stored only if this is true ScopeNote string `json:"scopeNote,omitempty"` CountryCode string `json:"countryCode,omitempty"` CountryOfIncorporation string `json:"countryOfIncorporation,omitempty"` Metrics *ConceptMetrics `json:"metrics,omitempty"` }
type EsConceptModelPatch ¶
type EsConceptModelPatch struct {
Metrics *ConceptMetrics `json:"metrics"`
}
type EsIDTypePair ¶
type EsMembershipModel ¶
type EsModel ¶
type EsModel interface{}
func ConvertAggregateConceptToESConceptModel ¶
func ConvertAggregateConceptToESConceptModel(concept AggregateConceptModel, conceptType string, publishRef string) (esModel EsModel)
func ConvertConceptToESConceptModel ¶
func ConvertConceptToESConceptModel(concept ConceptModel, conceptType string, publishRef string) EsModel
type EsPersonConceptModel ¶
type EsPersonConceptModel struct { *EsConceptModel IsFTAuthor string `json:"isFTAuthor"` }
type EsPersonConceptPatch ¶
type EsPersonConceptPatch struct { Metrics *ConceptMetrics `json:"metrics"` IsFTAuthor string `json:"isFTAuthor"` }
type EsService ¶
type EsService interface { LoadData(ctx context.Context, conceptType string, uuid string, payload EsModel) (bool, *elastic.IndexResponse, error) ReadData(conceptType string, uuid string) (*elastic.GetResult, error) DeleteData(ctx context.Context, conceptType string, uuid string) (*elastic.DeleteResponse, error) LoadBulkData(conceptType string, uuid string, payload interface{}) CleanupData(ctx context.Context, concept Concept) PatchUpdateConcept(ctx context.Context, conceptType string, uuid string, payload PayloadPatch) CloseBulkProcessor() error GetClusterHealth() (*elastic.ClusterHealthResponse, error) IsIndexReadOnly() (bool, string, error) GetAllIds(ctx context.Context) chan EsIDTypePair }
func NewEsService ¶
func NewEsService(ch chan *elastic.Client, indexName string, bulkProcessorConfig *BulkProcessorConfig) EsService
type PayloadPatch ¶
type PayloadPatch interface{}
type SourceConcept ¶
Click to show internal directories.
Click to hide internal directories.