Documentation ¶
Index ¶
- Variables
- func Cleanup()
- func ExtractDomainName(URL string) string
- func PrintAnime(object AnimeListElement)
- func PrintKnownActions()
- func PrintKnownLists()
- func PrintSetWidth(text, linePrefix, newlineSeq string, columnWidth int)
- func RequestInput(message string) string
- type AnimeListElement
- type BookListElement
- type GameListElement
- type InfoSource
- type ListElement
- func CreateListElement(elementType, url, name, description string, sourceRating float32) ListElement
- func SourceAmazonCanada(URL string) ListElement
- func SourceAmazonUS(URL string) ListElement
- func SourceIMDB(URL string) ListElement
- func SourceMetacritic(URL string) ListElement
- func SourceMyAnimeList(URL string) ListElement
- func SourceNull(URL string) ListElement
- func SourceSteamOnline(URL string) ListElement
- type ListElementFields
- type ManagerAction
- type MovieListElement
- type OrderedList
Constants ¶
This section is empty.
Variables ¶
View Source
var Actions = map[string]ManagerAction{
"scan": scan,
"load": scan,
"next": next,
"push": push,
"add": push,
"pop": pop,
"list": list,
"detail": detail,
"view": detail,
"info": detail,
"finished": finished,
"finish": finished,
"remove": remove,
"delete": remove,
"review": review,
"check": review,
"find": search,
"search": search,
"lists": enumerate,
"reconsider": reconsider,
"reorganize": reconsider,
"rate": reconsider,
"sort": reconsider,
"reactivate": reactivate,
}
Actions The functions that this program can do.
View Source
var RegisteredTypes = map[string]ListElement{ "anime": &AnimeListElement{}, "movies": &MovieListElement{}, "games": &GameListElement{}, "books": &BookListElement{}, }
RegisteredTypes Map of all usable types. Returns a pointer to the type
View Source
var Sources = map[string]InfoSource{ "myanimelist.net": SourceMyAnimeList, "store.steampowered.com": SourceSteamOnline, "www.amazon.ca": SourceAmazonCanada, "amazon.com": SourceAmazonUS, "www.metacritic.com": SourceMetacritic, }
Functions ¶
func ExtractDomainName ¶
func PrintAnime ¶
func PrintAnime(object AnimeListElement)
func PrintKnownActions ¶
func PrintKnownActions()
func PrintKnownLists ¶
func PrintKnownLists()
func PrintSetWidth ¶
func RequestInput ¶
Types ¶
type AnimeListElement ¶
type AnimeListElement struct { ID int Base ListElementFields `gorm:"polymorphic:Owner;"` NumEpisodes int AirTime time.Time }
type BookListElement ¶
type GameListElement ¶
type GameListElement struct { ID int Base ListElementFields `gorm:"polymorphic:Owner;"` Platform string ReleaseDate time.Time }
type InfoSource ¶
type InfoSource func(string) ListElement
InfoSource Defines the type signature of an information source that can be used to create and rate new ListElements
type ListElement ¶
type ListElement interface {
// contains filtered or unexported methods
}
func CreateListElement ¶
func CreateListElement(elementType, url, name, description string, sourceRating float32) ListElement
func SourceAmazonCanada ¶
func SourceAmazonCanada(URL string) ListElement
func SourceAmazonUS ¶
func SourceAmazonUS(URL string) ListElement
func SourceIMDB ¶
func SourceIMDB(URL string) ListElement
func SourceMetacritic ¶
func SourceMetacritic(URL string) ListElement
func SourceMyAnimeList ¶
func SourceMyAnimeList(URL string) ListElement
func SourceNull ¶
func SourceNull(URL string) ListElement
func SourceSteamOnline ¶
func SourceSteamOnline(URL string) ListElement
type ListElementFields ¶
type ListElementFields struct { gorm.Model URL string `sql:"unique;not null"` Name string `sql:"unique;not null"` Description string IsRated bool WasViewed bool WasRemoved bool SourceRating float32 HeuristicRating float32 OwnerId int OwnerType string }
func CreateListElementFields ¶
func CreateListElementFields(url, name, description string, sourceRating float32) ListElementFields
type ManagerAction ¶
ManagerAction Defines a type signature for all the Manager methods
type MovieListElement ¶
type MovieListElement struct { ID int Base ListElementFields `gorm:"polymorphic:Owner;"` ReviewCount int Duration int }
type OrderedList ¶
type OrderedList []ListElement
func (OrderedList) Len ¶
func (slice OrderedList) Len() int
func (OrderedList) Less ¶
func (slice OrderedList) Less(i, j int) bool
func (OrderedList) Swap ¶
func (slice OrderedList) Swap(i, j int)
Click to show internal directories.
Click to hide internal directories.