Documentation ¶
Index ¶
- Constants
- Variables
- func NewWsBookInfo(ctx context.Context, bookInfo BookBreadcrumb, isFromOpenLibrary bool) wsBookInfo
- func NewWsError(ctx context.Context, msg string) wsError
- func NewWsMessage(ctx context.Context, msg string) wsMessage
- type AppConfig
- type Authors
- type BookBreadcrumb
- type Created
- type GoodReadsAuthor
- type GoodReadsDescription
- type GoodReadsSearchBookResult
- type LastModified
- type LookupRequest
- type MorpheusEvent
- type OpenLibraryBook
- type OtherServiceIdentifiers
- type Type
- type UptimeResponse
- type Works
- type WsLiveStatus
Constants ¶
Variables ¶
View Source
var ( MGS_WS_MESSAGE_TYPE = "message" ERROR_WS_MESSAGE_TYPE = "error" BOOK_INFO_WS_MESSAGE_TYPE = "bookInfo" WS_LIVE_STATUS_WS_MESSAGE_TYPE = "liveStatus" MORPHEUS_EVENT_TYPE = "lofilibrarian" )
Functions ¶
func NewWsBookInfo ¶
func NewWsBookInfo(ctx context.Context, bookInfo BookBreadcrumb, isFromOpenLibrary bool) wsBookInfo
func NewWsError ¶
func NewWsMessage ¶
Types ¶
type BookBreadcrumb ¶
type BookBreadcrumb struct { Title string `json:"title"` Author string `json:"author"` Series string `json:"series"` MainCover string `json:"mainCover"` OtherCovers []string `json:"otherCovers"` Pages int `json:"pages"` Link string `json:"link"` Rating float64 `json:"rating"` RatingsCount int `json:"ratingsCount"` Genres []string `json:"genres"` ISBN string `json:"isbn"` }
type GoodReadsAuthor ¶
type GoodReadsDescription ¶
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 LastModified ¶
type LookupRequest ¶
type MorpheusEvent ¶
type MorpheusEvent struct { ID string `json:"id"` Timestamp int64 `json:"timestamp"` Type string `json:"type"` Level string `json:"level"` Msg string `json:"data"` }
Optional, only used when rabbitMQ is enabled
func NewMorpheusEvent ¶
func NewMorpheusEvent(msg, level string) MorpheusEvent
type OpenLibraryBook ¶
type OpenLibraryBook struct { Publishers []string `json:"publishers"` Identifiers OtherServiceIdentifiers `json:"identifiers"` Weight string `json:"weight"` Covers []int `json:"covers"` PhysicalFormat string `json:"physical_format"` Key string `json:"key"` Authors []Authors `json:"authors"` Ocaid string `json:"ocaid"` Subjects []string `json:"subjects"` SourceRecords []string `json:"source_records"` Title string `json:"title"` NumberOfPages int `json:"number_of_pages"` Isbn13 []string `json:"isbn_13"` Isbn10 []string `json:"isbn_10"` PublishDate string `json:"publish_date"` Works []Works `json:"works"` Type Type `json:"type"` PhysicalDimensions string `json:"physical_dimensions"` Lccn []string `json:"lccn"` LcClassifications []string `json:"lc_classifications"` LocalID []string `json:"local_id"` OclcNumbers []string `json:"oclc_numbers"` LatestRevision int `json:"latest_revision"` Revision int `json:"revision"` Created Created `json:"created"` LastModified LastModified `json:"last_modified"` }
type OtherServiceIdentifiers ¶
type UptimeResponse ¶
type WsLiveStatus ¶
type WsLiveStatus struct { Type string `json:"type"` ServerSentTime int64 `json:"serverSentTime"` ServerStartupTime int64 `json:"serverStartupTime,omitempty"` }
func NewWsLiveStatus ¶
func NewWsLiveStatus(appStartTime time.Time) WsLiveStatus
Click to show internal directories.
Click to hide internal directories.