Documentation
¶
Index ¶
Constants ¶
const ( MarkerRead MarkerUnread MarkerAny )
Markers identify the visibility status of entities
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIKey ¶
type APIKey struct {
ID ID `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"-"`
UpdatedAt time.Time `json:"-"`
Key string `json:"token"`
Type APIKeyType `json:"-"`
User User `json:"-"`
UserID ID `json:"-"`
Expires time.Time `json:"expires"`
}
APIKey represents an SQL schema for JSON Web Tokens created for User objects.
type APIKeyPair ¶
type APIKeyPair struct {
RefreshKey string `json:"refreshToken"`
AccessKey string `json:"accessToken"`
}
APIKeyPair collects a refresh and access token
type APIKeyType ¶
type APIKeyType = int
APIKeyType alias
const ( RefreshKey APIKeyType = iota AccessKey )
APIKeyTypes identifies the kind of access or purpose of a key
type Category ¶
type Category struct {
ID ID `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
User User `json:"-"`
UserID ID `json:"-"`
Feeds []Feed `json:"-"`
Name string `json:"name"`
}
Category represents a container for Feed entities.
type Entry ¶
type Entry struct {
ID ID `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
User User `json:"-"`
UserID ID `json:"-"`
Feed Feed `json:"-"`
FeedID ID `json:"-"`
Tags []Tag `json:"tags,omitempty" gorm:"many2many:entry_tags;"`
GUID string `json:"-"`
Title string `json:"title"`
Link string `json:"link"`
Author string `json:"author,omitempty"`
Published time.Time `json:"published"`
Saved bool `json:"isSaved"`
Mark Marker `json:"markedAs"`
}
Entry represents subscription items obtained from Feed objects.
type Feed ¶
type Feed struct {
ID ID `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Category Category `json:"category,omitempty"`
CategoryID ID `json:"-"`
User User `json:"-"`
UserID ID `json:"-"`
Entries []Entry `json:"-"`
Title string `json:"title"`
Description string `json:"description,omitempty"`
Subscription string `json:"subscription"`
Source string `json:"source,omitempty"`
TTL int `json:"ttl,omitempty"`
Etag string `json:"-"`
LastUpdated time.Time `json:"-"`
Status string `json:"status,omitempty"`
}
Feed represents an Atom or RSS feed subscription.
type Marker ¶
type Marker = int
Marker type alias
func MarkerFromString ¶
MarkerFromString converts a string to a Marker type
type OPMLBody ¶
type OPMLBody struct {
XMLName xml.Name `xml:"body"`
Items []OPMLOutline `xml:"outline"`
}
An OPMLBody represents an OPML Body element.
type OPMLOutline ¶
type OPMLOutline struct {
XMLName xml.Name `xml:"outline"`
Type string `xml:"type,attr"`
Text string `xml:"text,attr"`
Title string `xml:"title,attr"`
HTMLUrl string `xml:"htmlUrl,attr"`
XMLUrl string `xml:"xmlUrl,attr"`
Items []OPMLOutline `xml:"outline"`
}
An OPMLOutline represents an OPML Outline element.
type Stats ¶
type Stats struct {
Unread int `json:"unread"`
Read int `json:"read"`
Saved int `json:"saved"`
Total int `json:"total"`
}
Stats represents statistics related to various attributes of Feed, Entry, and Category objects.
type Tag ¶
type Tag struct {
ID ID `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
Name string `json:"name"`
User User `json:"-"`
UserID ID `json:"-"`
Entries []Entry `json:"entries,omitempty" gorm:"many2many:entry_tags;"`
}
Tag represents an identifier object that can be applied to Entry objects.
type User ¶
type User struct {
ID ID `json:"id" gorm:"primary_key"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
DeletedAt *time.Time `json:"deleted_at" sql:"index"`
Categories []Category `json:"categories,omitempty"`
Feeds []Feed `json:"feeds,omitempty"`
Entries []Entry `json:"entries,omitempty"`
APIKeys []APIKey `json:"-"`
Tags []Tag `json:"tags,omitempty"`
Username string `json:"username"`
Email string `json:"email"`
PasswordHash []byte `json:"-"`
PasswordSalt []byte `json:"-"`
}
User represents a user and owner of all other entities.