concept

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrUnexpectedResponse = errors.New("concept search API returned a non-200 HTTP status code")

Functions

This section is empty.

Types

type Concept

type Concept struct {
	ID         string `json:"id"`
	ApiUrl     string `json:"apiUrl,omitempty"`
	Type       string `json:"type,omitempty"`
	PrefLabel  string `json:"prefLabel,omitempty"`
	IsFTAuthor bool   `json:"isFTAuthor,omitempty"`
}

Concept models the concept data returned from the UPP concepts API

type ReadAPI

type ReadAPI interface {
	GetConceptsByIDs(ctx context.Context, ids []string) (map[string]Concept, error)
	Endpoint() string
	GTG() error
}

func NewReadAPI

func NewReadAPI(client *http.Client, endpoint string, username string, password string, batchSize int) ReadAPI

type SearchResult

type SearchResult struct {
	Concepts map[string]Concept `json:"concepts"`
}

SearchResult models the data returned from the UPP concepts API used (i.e. internal-concordances)

Jump to

Keyboard shortcuts

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