Documentation ¶
Index ¶
- func NewPostgresDatabase(lc fx.Lifecycle, config common.PostgresDatabaseConfig) documents.DocumentRepository
- type PostgresDatabase
- func (r *PostgresDatabase) Delete(ctx context.Context, id string) error
- func (r *PostgresDatabase) FindAll(ctx context.Context, filter map[string]interface{}) (docs []*documents.Document, err error)
- func (r *PostgresDatabase) FindByID(ctx context.Context, id string) (*documents.Document, error)
- func (r *PostgresDatabase) Insert(ctx context.Context, doc *documents.Document) error
- func (r *PostgresDatabase) UpdateDocument(_ context.Context, doc documents.Document) (result documents.Document, err error)
- func (r *PostgresDatabase) UpsertStream(ctx context.Context, input <-chan *documents.Document) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewPostgresDatabase ¶
func NewPostgresDatabase(lc fx.Lifecycle, config common.PostgresDatabaseConfig) documents.DocumentRepository
Types ¶
type PostgresDatabase ¶
type PostgresDatabase struct {
// contains filtered or unexported fields
}
func (*PostgresDatabase) Delete ¶
func (r *PostgresDatabase) Delete(ctx context.Context, id string) error
func (*PostgresDatabase) UpdateDocument ¶
func (*PostgresDatabase) UpsertStream ¶
Click to show internal directories.
Click to hide internal directories.