Documentation ¶
Index ¶
- type InMemorySessionStore
- type MessageStore
- type PostgresMessageStore
- func (s *PostgresMessageStore) ListMessages(ctx context.Context, chatId uuid.UUID, createdAt time.Time, pageSize int) ([]model.Message, error)
- func (s *PostgresMessageStore) ListMessagesFirst(ctx context.Context, chatId uuid.UUID, pageSize int) ([]model.Message, error)
- func (s *PostgresMessageStore) SendMessage(ctx context.Context, message *model.Message) error
- type PostgresRoomStore
- func (s *PostgresRoomStore) Add(ctx context.Context, room *model.Room) error
- func (s *PostgresRoomStore) AddAndSendMessage(ctx context.Context, room *model.Room, message *model.Message) (*model.Room, error)
- func (s *PostgresRoomStore) FindByIds(ctx context.Context, ids ...uuid.UUID) ([]model.User, error)
- func (s *PostgresRoomStore) FindDialogRoom(ctx context.Context, userId1, userId2 uuid.UUID) (*model.Room, error)
- func (s *PostgresRoomStore) Get(ctx context.Context, id uuid.UUID) (*model.Room, error)
- func (s *PostgresRoomStore) ListRooms(ctx context.Context, userId uuid.UUID, lastMessageDate time.Time, pageSize int) ([]model.Room, error)
- func (s *PostgresRoomStore) ListRoomsFirst(ctx context.Context, userId uuid.UUID, pageSize int) ([]model.Room, error)
- func (s *PostgresRoomStore) UsersInRoom(ctx context.Context, id uuid.UUID) ([]uuid.UUID, error)
- type PostgresUserStore
- type RefreshTokenPostgresStore
- type RefreshTokenStore
- type RoomStore
- type SessionStore
- type UserStore
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type InMemorySessionStore ¶
type InMemorySessionStore struct {
// contains filtered or unexported fields
}
func NewInMemorySessionStore ¶
func NewInMemorySessionStore() *InMemorySessionStore
func (*InMemorySessionStore) Delete ¶
func (s *InMemorySessionStore) Delete(id uuid.UUID)
func (*InMemorySessionStore) Send ¶
func (s *InMemorySessionStore) Send(id uuid.UUID, messageStream *pb.MessageStreamResponse) error
type MessageStore ¶
type PostgresMessageStore ¶
type PostgresMessageStore struct {
// contains filtered or unexported fields
}
func NewPostgresMessageStore ¶
func NewPostgresMessageStore(db *sqlx.DB) *PostgresMessageStore
func (*PostgresMessageStore) ListMessages ¶
func (*PostgresMessageStore) ListMessagesFirst ¶
func (*PostgresMessageStore) SendMessage ¶
type PostgresRoomStore ¶
type PostgresRoomStore struct {
// contains filtered or unexported fields
}
func NewPostgresRoomStore ¶
func NewPostgresRoomStore(db *sqlx.DB) *PostgresRoomStore
func (*PostgresRoomStore) AddAndSendMessage ¶
func (*PostgresRoomStore) FindDialogRoom ¶
func (*PostgresRoomStore) ListRoomsFirst ¶
func (*PostgresRoomStore) UsersInRoom ¶
type PostgresUserStore ¶
type PostgresUserStore struct {
// contains filtered or unexported fields
}
func NewPostgresUserStore ¶
func NewPostgresUserStore(db *sqlx.DB) *PostgresUserStore
func (*PostgresUserStore) FindByUsername ¶
type RefreshTokenPostgresStore ¶
type RefreshTokenPostgresStore struct {
// contains filtered or unexported fields
}
func NewRefreshTokenPostgresStore ¶
func NewRefreshTokenPostgresStore(db *sqlx.DB) *RefreshTokenPostgresStore
func (*RefreshTokenPostgresStore) Add ¶
func (s *RefreshTokenPostgresStore) Add(ctx context.Context, token *model.RefreshToken) error
func (*RefreshTokenPostgresStore) Get ¶
func (s *RefreshTokenPostgresStore) Get(ctx context.Context, token uuid.UUID) (*model.RefreshToken, error)
type RefreshTokenStore ¶
type RoomStore ¶
type RoomStore interface { AddAndSendMessage(ctx context.Context, room *model.Room, message *model.Message) (*model.Room, error) Add(ctx context.Context, room *model.Room) error Get(ctx context.Context, id uuid.UUID) (*model.Room, error) FindDialogRoom(ctx context.Context, userId1, userId2 uuid.UUID) (*model.Room, error) UsersInRoom(ctx context.Context, id uuid.UUID) ([]uuid.UUID, error) FindByIds(ctx context.Context, ids ...uuid.UUID) ([]model.User, error) ListRooms(ctx context.Context, userId uuid.UUID, lastMessageDate time.Time, pageSize int) ([]model.Room, error) ListRoomsFirst(ctx context.Context, userId uuid.UUID, pageSize int) ([]model.Room, error) }
type SessionStore ¶
Click to show internal directories.
Click to hide internal directories.