Documentation
¶
Overview ¶
Package postgres implements AstraEngine repositories using pgx and PostgreSQL.
Index ¶
- type ChatRepo
- type SessionRepo
- type Store
- type UserRepo
- func (r *UserRepo) FindByID(ctx context.Context, id string) (*storage.User, error)
- func (r *UserRepo) FindByPlatformID(ctx context.Context, platform, platformID string) (*storage.User, error)
- func (r *UserRepo) List(ctx context.Context) ([]storage.User, error)
- func (r *UserRepo) Save(ctx context.Context, user *storage.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ChatRepo ¶
type ChatRepo struct {
// contains filtered or unexported fields
}
func (*ChatRepo) FindByPlatformID ¶
type SessionRepo ¶
type SessionRepo struct {
// contains filtered or unexported fields
}
type Store ¶
type Store struct {
// contains filtered or unexported fields
}
Store groups PostgreSQL-backed user, chat and session repositories.
func NewWithPool ¶
func (*Store) Chats ¶
func (s *Store) Chats() storage.ChatRepository
func (*Store) EnsureSchema ¶
EnsureSchema creates the standard AstraEngine tables when missing.
func (*Store) Sessions ¶
func (s *Store) Sessions() storage.SessionRepository
func (*Store) Users ¶
func (s *Store) Users() storage.UserRepository