Documentation ¶
Overview ¶
Package walla holds types for the on-wire data from Wallabag. As these types tend to not match with Go idioms (mainly: int as booleans, a non-standard compliant time representation), we try to hide here.
Index ¶
Constants ¶
View Source
const TimeLayout = "2006-01-02T15:04:05-0700"
TimeLayout is the original wallabag time layout.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Annotation ¶
type Annotation struct { SchemaVersion string `json:"annotator_schema_version"` CreatedAt Time `json:"created_at"` ID int `json:"id"` Quote string `json:"quote"` Ranges []Range `json:"ranges"` Text string `json:"text"` UpdatedAt Time `json:"updated_at"` User string `json:"user"` // User is only present in the GET entries call, but not in the GET anntotations/id call }
Annotation represents one annotation made to an article
func (*Annotation) FromSako ¶
func (a *Annotation) FromSako(sk sako.Annotation)
func (Annotation) ToSako ¶
func (a Annotation) ToSako() (sk sako.Annotation)
type Annotations ¶
type Annotations struct { Rows []Annotation `json:"rows"` Total int `json:"total"` }
type Client ¶
type Client struct { ID string `json:"client_id"` Secret string `json:"client_secret"` Name string `json:"name"` }
func (*Client) FromSako ¶
func (cli *Client) FromSako(sk sako.ClientAuth)
func (Client) ToSako ¶
func (cli Client) ToSako() sako.ClientAuth
type Entries ¶
type Entries struct { Page int64 `json:"page"` Limit int64 `json:"limit"` Pages int64 `json:"pages"` Total int64 `json:"total"` Links Links `json:"_links"` Embedded struct { Items []Entry `json:"items"` } `json:"_embedded"` }
func (*Entries) SetupEntriesLinks ¶ added in v0.3.0
type Entry ¶
type Entry struct { Links Links `json:"_links"` Annotations []Annotation `json:"annotations"` ArchivedAt Time `json:"archived_at"` CreatedAt Time `json:"created_at"` Content string `json:"content"` DomainName string `json:"domain_name"` GivenURL string `json:"given_url"` HashedGivenURL string `json:"hashed_given_url"` HashedURL string `json:"hashed_url"` ID int64 `json:"id"` IsArchived int `json:"is_archived"` IsPublic bool `json:"is_public"` IsStarred int `json:"is_starred"` Language string `json:"language"` Mimetype string `json:"mimetype"` OriginURL string `json:"origin_url"` PreviewPicture string `json:"preview_picture"` PublishedAt Time `json:"published_at"` PublishedBy []string `json:"published_by"` ReadingTime int `json:"reading_time"` StarredAt Time `json:"starred_at"` Tags []Tag `json:"tags"` Title string `json:"title"` UID string `json:"uid"` UpdatedAt Time `json:"updated_at"` URL string `json:"url"` UserEmail string `json:"user_email"` UserID int `json:"user_id"` UserName string `json:"user_name"` }
type Range ¶
type TaggingRule ¶
type TaggingRule = sako.TaggingRule
type Token ¶
type Token struct { AccessToken string `json:"access_token"` Expires int `json:"expires_in"` RefreshToken string `json:"refresh_token"` Scope string `json:"scope"` TokenType string `json:"token_type"` }
Token holds authentication informations.
Click to show internal directories.
Click to hide internal directories.