Documentation ¶
Index ¶
Constants ¶
View Source
const ContentTypeJSONLD = "application/ld+json; profile=\"http://www.w3.org/ns/anno.jsonld\""
ContentTypeJSONLD ...
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct { Context string `json:"@context"` Type string `json:"type"` Creator string `json:"creator"` Created time.Time `json:"created"` Generator string `json:"generator"` Generated time.Time `json:"generated"` Body interface{} `json:"body"` Target interface{} `json:"target"` Motivation string `json:"motivation"` // contains filtered or unexported fields }
Annotation W3C Annotation Model representation
type AnnotationContainer ¶
type AnnotationContainer struct { Context []string `json:"@context"` Type []string `json:"type"` Label string `json:"label"` Total int `json:"total,omitempty"` }
AnnotationContainer ...
type AnnotationContent ¶
type AnnotationContent struct { ID string `json:"id,omitempty"` Type []string `json:"type,omitempty"` ConformsTo string `json:"conformsTo,omitempty"` Format string `json:"format,omitempty"` Value string `json:"value,omitempty"` Selector *AnnotationContent `json:"selector,omitempty"` Generator string `json:"generator,omitempty"` }
AnnotationContent ...
type AnnotationContentArray ¶
type AnnotationContentArray []AnnotationContent
AnnotationContentArray ...
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client ...
func (*Client) CreateCollection ¶
CreateCollection ...
func (*Client) Post ¶
func (c *Client) Post(anno *Annotation, collection string) (string, error)
Post ...
func (*Client) SearchByTargetID ¶
func (c *Client) SearchByTargetID(id string, generator string) (*SingleTypeAnnotationContainer, error)
SearchByTargetID ...
type ClientInterface ¶
type ClientInterface interface { Post(anno *Annotation, collection string) (string, error) CreateCollection(collection string) error SearchByTargetID(id string, generator string) (*SingleTypeAnnotationContainer, error) }
ClientInterface ...
type DefaultAnnotator ¶
type DefaultAnnotator struct{}
DefaultAnnotator ...
func (*DefaultAnnotator) CreateAnnotations ¶
func (a *DefaultAnnotator) CreateAnnotations(url string) ([]string, error)
CreateAnnotations ...
Click to show internal directories.
Click to hide internal directories.