Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Message ¶
type Message struct {
ID string `firestore:"id"`
Text string `firestore:"text"`
Image string `firestore:"image"`
UserID string `firestore:"userId"`
Username string `firestore:"-"`
CreatedAt time.Time `firestore:"createdAt"`
}
Message - チャットメッセージ エンティティ
type Repository ¶
type Repository interface {
ListRoom(ctx context.Context, p *firestore.Params, qs []*firestore.Query) (Rooms, error)
GetRoom(ctx context.Context, roomID string) (*Room, error)
CreateRoom(ctx context.Context, cr *Room) error
UpdateRoom(ctx context.Context, cr *Room) error
CreateMessage(ctx context.Context, roomID string, cm *Message) error
}
Repository - Chatレポジトリ
type Room ¶
type Room struct {
ID string `firestore:"id"`
UserIDs []string `firestore:"users"`
CreatedAt time.Time `firestore:"createdAt"`
UpdatedAt time.Time `firestore:"updatedAt"`
LatestMessage *Message `firestore:"latestMessage"`
InstanceIDs []string `firestore:"-"`
}
Room - チャットルーム エンティティ
Click to show internal directories.
Click to hide internal directories.