Documentation
¶
Overview ¶
Package shiori wraps REST API request bindings to the shiori gateway.
Index ¶
- Constants
- type Client
- func (c *Client) CreateLink(link *Link) (res *Link, err error)
- func (c *Client) Link(id int) (link *Link, err error)
- func (c *Client) Links(limit, offset int) (links []*Link, err error)
- func (c *Client) RemoveLink(id int) (err error)
- func (c *Client) Search(query string, limit, offset int) (sr *SearchResult, err error)
- func (c *Client) UpdateLink(link *Link) (res *Link, err error)
- type Link
- type SearchResult
Constants ¶
View Source
const (
// Package version
VERSION = "1.0.0"
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client provides a request client to execute REST API requests with.
func NewClient ¶
NewClient returns a new instance of client with the passed authorization token which connects to the passed endpoint URL of the siori gateway instance.
func (*Client) CreateLink ¶
CreateLink creates a new link object and returns it.
func (*Client) Links ¶
Links returns a list of links limited by the passed limit and offset by the passed offset.
func (*Client) RemoveLink ¶
RemoveLink removes a link by passed ID of the link.
type Link ¶
type Link struct {
Description string `json:"description"`
Id int `json:"id,omitempty"`
IdStr string `json:"id_str,omitempty"`
Tags []string `json:"tags"`
Url string `json:"url"`
}
Link request and response model.
type SearchResult ¶
type SearchResult struct {
Hits []*Link `json:"hits"`
ProcessingTimeMs int `json:"processing_time_ms"`
Query string `json:"query"`
}
SearchResult response model.
Click to show internal directories.
Click to hide internal directories.