Documentation ¶
Index ¶
Constants ¶
View Source
const PAGESIZE = 50
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct { Id string `json:"id"` Created time.Time `json:"created"` Updated time.Time `json:"updated"` User string `json:"user"` Uri string `json:"uri"` Text string `json:"text,omitempty"` Tags []string `json:"tags,omitempty"` Group string `json:"group,omitempty"` Permissions Permission `json:"permissions,omitempty"` Target []Target `json:"target,omitempty"` Document Document `json:"document,omitempty"` Links Links `json:"links"` Flagged bool `json:"flagged"` Hidden bool `json:"hidden"` UserInfo map[string]string `json:"user_info,omitempty"` // contains filtered or unexported fields }
type AnnotationList ¶
type AnnotationList struct { Total int64 `toml:"total"` Rows []Annotation `toml:"rows"` }
type Group ¶
type Group struct { Id string `json:"id"` GroupID string `json:"groupid,omitempty"` Name string `json:"name"` Organization string `json:"organization,omitempty"` Public bool `json:"public"` Scoped bool `json:"scoped"` Type string `json:"type"` Links Links `json:"links,omitempty"` // contains filtered or unexported fields }
func (Group) GetAnnotations ¶
func (grp Group) GetAnnotations(callback func(ann Annotation) error) error
type Hypothesis ¶
type Hypothesis struct {
// contains filtered or unexported fields
}
func NewHypothesis ¶
func NewHypothesis(endpoint, apikey string, log *logging.Logger) (*Hypothesis, error)
func (*Hypothesis) GetGroups ¶
func (hy *Hypothesis) GetGroups(callback func(grp Group) error) error
func (*Hypothesis) Search ¶
func (hy *Hypothesis) Search(params map[string]string, callback func(ann Annotation) error) error
type Permission ¶
type RangeSelector ¶
type TextPositionSelector ¶
type TextQuoteSelector ¶
type User ¶
type User struct { Authority string `json:"authority"` Username string `json:"username"` Email string `json:"email,omitempty"` DisplayName string `json:"display_name"` Identities []Identity `json:"identities,omitempty"` UserId string `json:"userid"` // contains filtered or unexported fields }
func (User) GetAnnotations ¶
func (user User) GetAnnotations(callback func(ann Annotation) error) error
Click to show internal directories.
Click to hide internal directories.