Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Backend ¶
type Backend interface { // Location returns this backend's location (the directory name). Location() string // Create the backend resources Create() error Save(Serializable) error }
type Collection ¶
type Collection struct { Entries []*Entry `json:"entries"` Category string `json:"category"` Filter string `json:"filter"` Username string `json:"username"` }
func NewCollection ¶
func NewCollection(entries []*Entry, Category, Filter, Username string) *Collection
func (*Collection) CSV ¶
func (c *Collection) CSV() []*Entry
func (*Collection) JSON ¶
func (c *Collection) JSON() interface{}
func (*Collection) Slug ¶
func (c *Collection) Slug() string
type Entry ¶
type Entry struct { ID string `json:"id"` Title string `json:"title"` OriginalTitle string `json:"original_title,omitempty"` Year int `json:"year,omitempty"` Authors []string `json:"authors"` Rating int `json:"rating,omitempty"` DoneDate string `json:"done_date,omitempty"` Comment string `json:"comment,omitempty"` Favorite bool `json:"favorite"` Genres []string `json:"genres,omitempty"` }
Entry represents an entry in a collection or list : a movie, series, books, etc...
type Formatter ¶
type Formatter interface { // Format the entries and save them to the backend Format(entries Serializable, writer io.Writer) error // Ext returns the file extension Ext() string }
type List ¶
type Serializable ¶
Click to show internal directories.
Click to hide internal directories.