Documentation ¶
Index ¶
- Constants
- type Auth
- type Book
- type BookReview
- type BookReviewUser
- type BookReviews
- type Books
- type Bookshelf
- type ChatMessage
- type ChatRoom
- type ChatRooms
- type ChatUser
- type ChatUsers
- type Follow
- type Follower
- type Followers
- type Follows
- type MonthlyResult
- type MonthlyResults
- type UserProfile
- type UserProfileProduct
- type UserReview
- type UserReviewBook
- type UserReviews
Constants ¶
View Source
const ( ListLimitDefault = "100" // 一覧取得上限 ListOffsetDefault = "0" // 一覧取得開始位置 UnknownUserName = "unknown" // 不明なユーザーの表示名 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Auth ¶
type Auth struct { ID string `json:"id"` // ユーザーID Username string `json:"username"` // ユーザー名 Gender entity.Gender `json:"gender"` // 性別 Email string `json:"email"` // メールアドレス PhoneNumber string `json:"phoneNumber"` // 電話番号 ThumbnailURL string `json:"thumbnailUrl"` // サムネイルURL SelfIntroduction string `json:"selfIntroduction"` // 自己紹介 LastName string `json:"lastName"` // 姓 FirstName string `json:"firstName"` // 名 LastNameKana string `json:"lastNameKana"` // 姓(かな) FirstNameKana string `json:"firstNameKana"` // 名(かな) PostalCode string `json:"postalCode"` // 郵便番号 Prefecture string `json:"prefecture"` // 都道府県 City string `json:"city"` // 市区町村 AddressLine1 string `json:"addressLine1"` // 町名,番地 AddressLine2 string `json:"addressLine2"` // マンション・ビル名,号室 CreatedAt string `json:"createdAt"` // 作成日時 UpdatedAt string `json:"updatedAt"` // 更新日時 }
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:"published_on"` // 出版日 ThumbnailURL string `json:"thumbnailUrl"` // サムネイルURL RakutenURL string `json:"rakutenUrl"` // 楽天ショップURL Size string `json:"size"` // 楽天書籍サイズ Author string `json:"author"` // 著者名一覧 AuthorKana string `json:"authorKana"` // 著者名一覧(かな) Bookshelf *Bookshelf `json:"bookshelf,omitempty"` // ユーザーの本棚情報 CreatedAt string `json:"createdAt"` // 登録日時 UpdatedAt string `json:"updatedAt"` // 更新日時 }
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 Bookshelf ¶
type Bookshelf struct { ID int64 `json:"id"` // 本棚ID Status string `json:"status"` // 読書ステータス ReadOn string `json:"readOn"` // 読み終えた日 Impression string `json:"impression,omitempty"` // 感想 CreatedAt string `json:"createdAt"` // 登録日時 UpdatedAt string `json:"updatedAt"` // 更新日時 }
func NewBookshelf ¶
type ChatMessage ¶
type ChatMessage struct { Text string `json:"text"` // テキストメッセージ Image string `json:"image"` // 添付画像URL UserID string `json:"userId"` // ユーザーID User *ChatUser `json:"user"` // 送信者 CreatedAt string `json:"createdAt"` // 送信日時 }
func NewChatMessage ¶
func NewChatMessage(m *entity.ChatMessage, u *entity.User) *ChatMessage
type ChatRoom ¶
type ChatRoom struct { ID string `json:"id"` // チャットルームID Users ChatUsers `json:"usersList"` // 参加者一覧 LatestMessage *ChatMessage `json:"latestMessage"` // 最新のメッセージ CreatedAt string `json:"createdAt"` // 作成日時 UpdatedAt string `json:"updatedAt"` // 更新日時 }
type Follow ¶
type Follower ¶
type Follower struct { ID string `json:"id"` // ユーザーID Username string `json:"username"` // 表示名 ThumbnailURL string `json:"thumbnailUrl"` // サムネイルURL SelfIntroduction string `json:"selfIntroduction"` // 自己紹介 IsFollow bool `json:"isFollow"` // 自分がフォローしているか }
func NewFollower ¶
type MonthlyResult ¶
type MonthlyResult struct { Year int32 `json:"year"` // 年 Month int32 `json:"month"` // 月 ReadTotal int64 `json:"readTotal"` // 読んだ本の合計 }
func NewMonthlyResult ¶
func NewMonthlyResult(r *entity.MonthlyResult, date time.Time) *MonthlyResult
type MonthlyResults ¶
type MonthlyResults []*MonthlyResult
func NewMonthlyResults ¶
func NewMonthlyResults(rm map[string]*entity.MonthlyResult, now time.Time) MonthlyResults
type UserProfile ¶
type UserProfile struct { ID string `json:"id"` // ユーザーID Username string `json:"username"` // 表示名 ThumbnailURL string `json:"thumbnailUrl"` // サムネイルURL SelfIntroduction string `json:"selfIntroduction"` // 自己紹介 IsFollow bool `json:"isFollow"` // 自分がフォローしているか IsFollower bool `json:"isFollower"` // 自分がフォローされているか FollowCount int64 `json:"followCount"` // フォロー数 FollowerCount int64 `json:"followerCount"` // フォロワー数 Rating int32 `json:"rating"` // ユーザーからの平均評価 ReviewCount int64 `json:"reviewCount"` // ユーザーからのレビュー数 Products []*UserProfileProduct `json:"productsList"` // 出品商品一覧 }
func NewUserProfile ¶
func NewUserProfile(p *entity.UserProfile) *UserProfile
type UserProfileProduct ¶
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 ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.