Documentation
¶
Index ¶
- func InitializePostgresDatabase(ctx context.Context, postgresDBConfig config.PostgresDBConfig, ...) (eventstore.EventsSaver, eventstore.EventsRetriever, eventstore.LockProvider, ...)
- func RunDbScripts(db *sql.DB, schema string, isAdminSchema bool, ctx context.Context) error
- type PostgresAdminDB
- func (p *PostgresAdminDB) DeleteUser(id string) error
- func (s *PostgresAdminDB) GetEventsCount(boundary string) (int, error)
- func (s *PostgresAdminDB) GetProjectorLastPosition(projectorName string) (*eventstore.Position, error)
- func (s *PostgresAdminDB) GetUserById(id string) (orisun.User, error)
- func (s *PostgresAdminDB) GetUserByUsername(username string) (orisun.User, error)
- func (s *PostgresAdminDB) GetUsersCount() (uint32, error)
- func (s *PostgresAdminDB) ListAdminUsers() ([]*orisun.User, error)
- func (s *PostgresAdminDB) SaveEventCount(event_count int, boundary string) error
- func (s *PostgresAdminDB) SaveUsersCount(users_count uint32) error
- func (p *PostgresAdminDB) UpdateProjectorPosition(name string, position *eventstore.Position) error
- func (s *PostgresAdminDB) UpsertUser(user orisun.User) error
- type PostgresEventPublishing
- func (s *PostgresEventPublishing) GetLastPublishedEventPosition(ctx context.Context, boundary string) (orisun.Position, error)
- func (s *PostgresEventPublishing) InsertLastPublishedEvent(ctx context.Context, boundaryOfInterest string, transactionId int64, ...) error
- func (s *PostgresEventPublishing) Schema(boundary string) (string, error)
- type PostgresGetEvents
- type PostgresSaveEvents
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func InitializePostgresDatabase ¶
func InitializePostgresDatabase( ctx context.Context, postgresDBConfig config.PostgresDBConfig, adminConfig config.AdminConfig, js jetstream.JetStream, logger logging.Logger, ) (eventstore.EventsSaver, eventstore.EventsRetriever, eventstore.LockProvider, common.DB, eventstore.EventPublishingTracker)
Types ¶
type PostgresAdminDB ¶
type PostgresAdminDB struct {
// contains filtered or unexported fields
}
func NewPostgresAdminDB ¶
func NewPostgresAdminDB(db *sql.DB, logger logging.Logger, schema string, boundarySchemaMappings map[string]config.BoundaryToPostgresSchemaMapping) *PostgresAdminDB
func (*PostgresAdminDB) DeleteUser ¶
func (p *PostgresAdminDB) DeleteUser(id string) error
func (*PostgresAdminDB) GetEventsCount ¶
func (s *PostgresAdminDB) GetEventsCount(boundary string) (int, error)
func (*PostgresAdminDB) GetProjectorLastPosition ¶
func (s *PostgresAdminDB) GetProjectorLastPosition(projectorName string) (*eventstore.Position, error)
func (*PostgresAdminDB) GetUserById ¶
func (s *PostgresAdminDB) GetUserById(id string) (orisun.User, error)
func (*PostgresAdminDB) GetUserByUsername ¶
func (s *PostgresAdminDB) GetUserByUsername(username string) (orisun.User, error)
func (*PostgresAdminDB) GetUsersCount ¶
func (s *PostgresAdminDB) GetUsersCount() (uint32, error)
func (*PostgresAdminDB) ListAdminUsers ¶
func (s *PostgresAdminDB) ListAdminUsers() ([]*orisun.User, error)
func (*PostgresAdminDB) SaveEventCount ¶
func (s *PostgresAdminDB) SaveEventCount(event_count int, boundary string) error
func (*PostgresAdminDB) SaveUsersCount ¶
func (s *PostgresAdminDB) SaveUsersCount(users_count uint32) error
func (*PostgresAdminDB) UpdateProjectorPosition ¶
func (p *PostgresAdminDB) UpdateProjectorPosition(name string, position *eventstore.Position) error
func (*PostgresAdminDB) UpsertUser ¶
func (s *PostgresAdminDB) UpsertUser(user orisun.User) error
type PostgresEventPublishing ¶
type PostgresEventPublishing struct {
// contains filtered or unexported fields
}
func NewPostgresEventPublishing ¶
func NewPostgresEventPublishing(db *sql.DB, logger logging.Logger, boundarySchemaMappings map[string]config.BoundaryToPostgresSchemaMapping) *PostgresEventPublishing
func (*PostgresEventPublishing) GetLastPublishedEventPosition ¶
func (*PostgresEventPublishing) InsertLastPublishedEvent ¶
type PostgresGetEvents ¶
type PostgresGetEvents struct {
// contains filtered or unexported fields
}
func NewPostgresGetEvents ¶
func NewPostgresGetEvents(db *sql.DB, logger logging.Logger, boundarySchemaMappings map[string]config.BoundaryToPostgresSchemaMapping) *PostgresGetEvents
func (*PostgresGetEvents) Get ¶
func (s *PostgresGetEvents) Get(ctx context.Context, req *eventstore.GetEventsRequest) (*eventstore.GetEventsResponse, error)
type PostgresSaveEvents ¶
type PostgresSaveEvents struct {
// contains filtered or unexported fields
}
func NewPostgresSaveEvents ¶
func NewPostgresSaveEvents( ctx context.Context, db *sql.DB, logger logging.Logger, boundarySchemaMappings map[string]config.BoundaryToPostgresSchemaMapping) *PostgresSaveEvents
func (*PostgresSaveEvents) Save ¶
func (s *PostgresSaveEvents) Save( ctx context.Context, events []eventstore.EventWithMapTags, boundary string, expectedPosition *eventstore.Position, streamConsistencyCondition *eventstore.Query) (transactionID string, globalID int64, err error)
Click to show internal directories.
Click to hide internal directories.