dtos

package
v0.0.0-...-86f5664 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 24, 2023 License: GPL-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TITLE_MATCH = iota
	AUTHOR_MATCH
	SERIES_MATCH
)

Variables

This section is empty.

Functions

This section is empty.

Types

type AllBookshopBooksSearchResults

type AllBookshopBooksSearchResults map[string]BookShopBookSearchResult

type AppConfig

type AppConfig struct {
	ApplicationStartUpTime time.Time
}

type AutomatedCrawlReport

type AutomatedCrawlReport struct {
	BooksSearched int   `json:"booksSearched"`
	MatchesFound  int   `json:"matchesFound"`
	NewBooksFound int   `json:"newBooksFound"`
	TimeStarted   int64 `json:"timeStarted"`
	TimeCompleted int64 `json:"timeCompleted"`
}

type AutomatedShelfCheckURLResponse

type AutomatedShelfCheckURLResponse struct {
	ShelURL string `json:"shelfURL"`
}

type AvailableBook

type AvailableBook struct {
	BookInfo             BasicGoodReadsBook `json:"bookInfo"`
	BookPurchaseInfo     TheBookshopBook    `json:"bookPurchaseInfo"`
	BookFoundFrom        int                `json:"bookFoundFrom"`
	Ignore               bool               `json:"ignore"`
	LastCheckedTimeStamp int64              `json:"lastCheckedTimeStamp"`
}

type BasicGoodReadsBook

type BasicGoodReadsBook struct {
	ID            string  `json:"id"`
	Title         string  `json:"title"`
	Author        string  `json:"author"`
	SeriesText    string  `json:"seriesText"`
	Link          string  `json:"link"`
	Cover         string  `json:"cover"`
	Isbn13        string  `json:"isbn13"`
	Asin          string  `json:"asin"`
	Rating        float32 `json:"rating"`
	PublishedYear int     `json:"published"`

	// BooksBooksBooks specific meta data
	IsFromSeriesSearch bool `json:"isFromSeriesSearch"`
}

type BookShopBookSearchResult

type BookShopBookSearchResult struct {
	SearchResultBooks []TheBookshopBook `json:"searchResultBooks"`
}

type BooleanSettingStatusResponse

type BooleanSettingStatusResponse struct {
	Enabled bool `json:"enabled"`
}

type CrawlStats

type CrawlStats struct {
	TotalBooks     int `json:"totalBooks"`
	BooksCrawled   int `json:"booksCrawled"`
	BooksSearched  int `json:"booksSearched"`
	BookMatchFound int `json:"bookMatchFound"`
}

type DiscordEmbed

type DiscordEmbed struct {
	Title       string       `json:"title,omitempty"`
	EmbedType   string       `json:"type,omitempty"`
	Description string       `json:"description,omitempty"`
	URL         string       `json:"url,omitempty"`
	Timestamp   string       `json:"timestamp,omitempty"`
	Color       int          `json:"color,omitempty"`
	Image       EmbedImage   `json:"image,omitempty"`
	Thumbnail   EmbedImage   `json:"thumbnail,omitempty"`
	Fields      []EmbedField `json:"fields,omitempty"`
	Author      EmbedAuthor  `json:"author,omitempty"`
	Footer      EmbedFooter  `json:"footer,omitempty"`
}

type DiscordMsg

type DiscordMsg struct {
	Content    string         `json:"content,omitempty"`
	Username   string         `json:"username,omitempty"`
	Avatar_url string         `json:"avatar_url,omitempty"`
	Embed      []DiscordEmbed `json:"embeds"`
}

type EmbedAuthor

type EmbedAuthor struct {
	Name    string `json:"name,omitempty"`
	IconURL string `json:"icon_url,omitempty"`
	URL     string `json:"url,omitempty"`
}

type EmbedField

type EmbedField struct {
	Name   string `json:"name,omitempty"`
	Value  string `json:"value,omitempty"`
	Inline bool   `json:"inline,omitempty"`
}

type EmbedFooter

type EmbedFooter struct {
	Text    string `json:"text,omitempty"`
	IconURL string `json:"icon_url,omitempty"`
}

type EmbedImage

type EmbedImage struct {
	URL      string `json:"url,omitempty"`
	ProxyURL string `json:"proxy_url,omitempty"`
	Height   string `json:"height,omitempty"`
	Width    string `json:"width,omitempty"`
}

type EnchancedSearchResult

type EnchancedSearchResult struct {
	SearchBook    BasicGoodReadsBook `json:"searchBook"`
	AuthorMatches []TheBookshopBook  `json:"authorMatches"`
	TitleMatches  []TheBookshopBook  `json:"titleMatches"`
}

type GetAutomatedCrawlTimeResponse

type GetAutomatedCrawlTimeResponse struct {
	Time string `json:"time"`
}

type GetDiscordMessageFormatResponse

type GetDiscordMessageFormatResponse struct {
	Format string `json:"format"`
}

type GetDiscordWebhookResponse

type GetDiscordWebhookResponse struct {
	WebHook string `json:"webhook"`
}

type GetKnownAuthorsResponse

type GetKnownAuthorsResponse struct {
	Authors []string `json:"authors"`
}

type GetPreviewForShelfResponse

type GetPreviewForShelfResponse struct {
	ShelfToCrawl ShelfToCrawl `json:"shelfToCrawlPreview"`
}

type GetPreviewsForShelvesResponse

type GetPreviewsForShelvesResponse struct {
	ShelvesToCrawl []ShelfToCrawl `json:"shelvesToCrawlPreviews"`
}

type GetRecentCrawlReportsResponse

type GetRecentCrawlReportsResponse struct {
	Reports []AutomatedCrawlReport `json:"reports"`
}

type GoodReadsAuthor

type GoodReadsAuthor struct {
	ID                int    `json:"id"`
	Name              string `json:"name"`
	IsGoodreadsAuthor bool   `json:"isGoodreadsAuthor"`
	ProfileURL        string `json:"profileUrl"`
	WorksListURL      string `json:"worksListUrl"`
}

type GoodReadsDescription

type GoodReadsDescription struct {
	HTML           string `json:"html"`
	Truncated      bool   `json:"truncated"`
	FullContentURL string `json:"fullContentUrl"`
}

type GoodReadsSearchBookResult

type GoodReadsSearchBookResult struct {
	ImageURL      string               `json:"imageUrl"`
	BookID        string               `json:"bookId"`
	WorkID        string               `json:"workId"`
	BookURL       string               `json:"bookUrl"`
	FromSearch    bool                 `json:"from_search"`
	FromSrp       bool                 `json:"from_srp"`
	Qid           string               `json:"qid"`
	Rank          int                  `json:"rank"`
	Title         string               `json:"title"`
	BookTitleBare string               `json:"bookTitleBare"`
	NumPages      int                  `json:"numPages"`
	AvgRating     string               `json:"avgRating"`
	RatingsCount  int                  `json:"ratingsCount"`
	Author        GoodReadsAuthor      `json:"author"`
	KcrPreviewURL string               `json:"kcrPreviewUrl"`
	Description   GoodReadsDescription `json:"description"`
}

type KnownAuthor

type KnownAuthor struct {
	Name   string `json:"name"`
	Ignore bool   `json:"ignore"`
}

type NewBookInSeries

type NewBookInSeries struct {
	SeriesBaseTitle string `json:"seriesBaseTitle"`
}

type RecentCrawlBreadcrumb

type RecentCrawlBreadcrumb struct {
	CrawlKey     string `json:"crawlKey"`
	ShelfURL     string `json:"shelfURL"`
	BookCount    int    `json:"bookCount"`
	MatchesCount int    `json:"matchesCount"`
}

type Series

type Series struct {
	ID           string       `json:"id"`
	Author       string       `json:"author"`
	Title        string       `json:"title"`
	PrimaryWorks int          `json:"primaryWorks"`
	TotalWorks   int          `json:"totalWorks"`
	Link         string       `json:"link"`
	Books        []SeriesBook `json:"books"`
	Ignore       bool         `json:"ignore"`
}

type SeriesBook

type SeriesBook struct {
	BookSeriesText   string             `json:"bookSeriesText"`
	RealBookOrder    int                `json:"realBookOrder"`
	BookInfo         BasicGoodReadsBook `json:"bookInfo"`
	TheBookshopMatch TheBookshopBook    `json:"theBookshopMatch"`
}

type SeriesCrawlStats

type SeriesCrawlStats struct {
	BooksInShelf               int `json:"booksInShelf"`
	SeriesCount                int `json:"seriesCount"`
	TotalBooksInSeries         int `json:"totalBooksInSeries"`
	BooksSearchedOnTheBookshop int `json:"booksSearchedOnTheBookshop"`
	SeriesLookedUp             int `json:"seriesLookedUp"`
	BookMatchesFound           int `json:"bookMatchesFound"`
}

type ShelfToCrawl

type ShelfToCrawl struct {
	CrawlKey  string   `json:"crawlKey"`
	ShelfURL  string   `json:"shelfURL"`
	BookCount int      `json:"bookCount"`
	Covers    []string `json:"coversPreview"`
}

type TheBookshopBook

type TheBookshopBook struct {
	Title  string `json:"title"`
	Author string `json:"author"`
	Price  string `json:"price"`
	Link   string `json:"link"`
	Cover  string `json:"cover"`
}

type UptimeResponse

type UptimeResponse struct {
	Status      string        `json:"status,omitempty"`
	Uptime      time.Duration `json:"uptime,omitempty"`
	StartUpTime int64         `json:"startuptime,omitempty"`
}

type WorkerInteralData

type WorkerInteralData struct {
	SearchedGoodReadsBooks map[string]bool
	SearchedSeries         map[string]bool
	Lock                   *sync.Mutex
}

type WsBookshopSearchResult

type WsBookshopSearchResult struct {
	SearchResult EnchancedSearchResult `json:"searchResult"`
	CrawlStats   CrawlStats            `json:"crawlStats"`
}

type WsErrorMsg

type WsErrorMsg struct {
	Error string `json:"error"`
}

type WsGoodreadsBook

type WsGoodreadsBook struct {
	BookInfo   BasicGoodReadsBook `json:"bookinfo"`
	CrawlStats CrawlStats         `json:"crawlStats"`
}

type WsNewBookAvailable

type WsNewBookAvailable struct {
	Book       TheBookshopBook `json:"newAvailableBook"`
	CrawlStats CrawlStats      `json:"crawlStats"`
}

type WsNewSeries

type WsNewSeries struct {
	Series     Series           `json:"series"`
	CrawlStats SeriesCrawlStats `json:"seriesCrawlStats"`
}

type WsSearchResultReturned

type WsSearchResultReturned struct {
	SearchBook BasicGoodReadsBook `json:"searchBook"`
	Match      TheBookshopBook    `json:"match"`
	CrawlStats SeriesCrawlStats   `json:"seriesCrawlStats"`
}

type WsSeriesCrawlStats

type WsSeriesCrawlStats struct {
	CrawlStats SeriesCrawlStats `json:"seriesCrawlStats"`
}

type WsTotalBooks

type WsTotalBooks struct {
	TotalBooks int        `json:"totalBooks"`
	CrawlStats CrawlStats `json:"crawlStats"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL