Documentation ¶
Index ¶
Constants ¶
View Source
const ( ListLimitDefault = "100" // 一覧取得上限 ListOffsetDefault = "0" // 一覧取得開始位置 UnknownUserName = "unknown" // 不明なユーザーの表示名 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Book ¶
type Book struct { ID int64 `json:"id"` // 書籍ID Title string `json:"title"` // タイトル TitleKana string `json:"titleKana"` // タイトル(かな) Description string `json:"description"` // 説明 Isbn string `json:"isbn"` // ISBN Publisher string `json:"publisher"` // 出版社名 PublishedOn string `json:"publishedOn"` // 出版日 ThumbnailURL string `json:"thumbnailUrl"` // サムネイルURL RakutenURL string `json:"rakutenUrl"` // 楽天ショップURL Size string `json:"size"` // 楽天書籍サイズ Author string `json:"author"` // 著者名一覧 AuthorKana string `json:"authorKana"` // 著者名一覧(かな) Reviews BookReviews `json:"reviewsList"` // レビュー一覧 ReviewLimit int64 `json:"reviewLimit"` // レビュー取得上限 ReviewOffset int64 `json:"reviewOffset"` // レビュー取得開始位置 ReviewTotal int64 `json:"reviewTotal"` // レビュー検索一致件数 CreatedAt string `json:"createdAt"` // 登録日時 UpdatedAt string `json:"updatedAt"` // 更新日時 }
type BookOnBookshelf ¶
type BookOnBookshelf struct { ID int64 `json:"id"` // 書籍ID Title string `json:"title"` // タイトル TitleKana string `json:"titleKana"` // タイトル(かな) Description string `json:"description"` // 説明 Isbn string `json:"isbn"` // ISBN Publisher string `json:"publisher"` // 出版社名 PublishedOn string `json:"publishedOn"` // 出版日 ThumbnailURL string `json:"thumbnailUrl"` // サムネイルURL RakutenURL string `json:"rakutenUrl"` // 楽天ショップURL Size string `json:"size"` // 楽天書籍サイズ Author string `json:"author"` // 著者名一覧 AuthorKana string `json:"author_kana"` // 著者名一覧(かな) Bookshelf *Bookshelf `json:"bookshelf"` // ユーザーの本棚情報 Reviews BookReviews `json:"reviewsList,omitempty"` // レビュー一覧 ReviewLimit int64 `json:"reviewLimit,omitempty"` // レビュー取得上限 ReviewOffset int64 `json:"reviewOffset,omitempty"` // レビュー取得開始位置 ReviewTotal int64 `json:"reviewTotal,omitempty"` // レビュー検索一致件 CreatedAt string `json:"createdAt"` // 登録日時 UpdatedAt string `json:"updatedAt"` // 更新日時 }
func NewBookOnBookshelf ¶
func NewBookOnBookshelf(b *entity.Book, bs *entity.Bookshelf) *BookOnBookshelf
func (*BookOnBookshelf) Fill ¶
func (b *BookOnBookshelf) Fill(rs BookReviews, limit, offset, total int64)
type BookReview ¶
type BookReview struct { ID int64 `json:"id"` // レビューID Impression string `json:"impression"` // 感想 User *BookReviewUser `json:"user"` // 投稿者 CreatedAt string `json:"createdAt"` // 登録日時 UpdatedAt string `json:"updatedAt"` // 更新日時 }
func NewBookReview ¶
func NewBookReview(r *entity.Review, u *entity.User) *BookReview
type BookReviewUser ¶
type BooksOnBookshelf ¶
type BooksOnBookshelf []*BookOnBookshelf
func NewBooksOnBookshelf ¶
func NewBooksOnBookshelf(bm map[int64]*entity.Book, bss entity.Bookshelves) BooksOnBookshelf
type UserReview ¶
type UserReview struct { ID int64 `json:"id"` // レビューID Impression string `json:"impression"` // 感想 Book *UserReviewBook `json:"book"` // 書籍情報 CreatedAt string `json:"createdAt"` // 登録日時 UpdatedAt string `json:"updatedAt"` // 更新日時 }
func NewUserReview ¶
func NewUserReview(r *entity.Review, b *entity.Book) *UserReview
type UserReviewBook ¶
Click to show internal directories.
Click to hide internal directories.