annotations

package
v0.0.0-...-6afe3ea Latest Latest
Warning

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

Go to latest
Published: Feb 3, 2021 License: MIT Imports: 11 Imported by: 2

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Annotation

type Annotation struct {
	Predicate string `json:"predicate"`
	ID        string `json:"id"`
	PrefLabel string `json:"prefLabel"`
}

type AnnotationsAPI

type AnnotationsAPI interface {
	Get(ctx context.Context, contentUUID string) ([]Annotation, error)
	GTG() error
	Endpoint() string
}

func NewAnnotationsAPI

func NewAnnotationsAPI(endpoint string, apiKey string) AnnotationsAPI

type ByScore

type ByScore []suggest.Suggestion

func (ByScore) Len

func (a ByScore) Len() int

func (ByScore) Less

func (a ByScore) Less(i, j int) bool

func (ByScore) Swap

func (a ByScore) Swap(i, j int)

type Handler

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

func NewHandler

func NewHandler(api AnnotationsAPI, fwAPI *fotoware.FotowareAPI) *Handler

func (*Handler) ServeHTTP

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

type Result

type Result struct {
	Url         string   `json:"url"`
	Title       string   `json:"title"`
	Description string   `json:"description"`
	Tags        []string `json:"tags"`
}

type SuggestHandler

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

func NewSuggestHandler

func NewSuggestHandler(suggestAPI *suggest.SuggestAPI, fwAPI *fotoware.FotowareAPI) *SuggestHandler

func (*SuggestHandler) SuggestServeHTTP

func (h *SuggestHandler) SuggestServeHTTP(w http.ResponseWriter, r *http.Request)

Jump to

Keyboard shortcuts

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