postgres

package
v0.1.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jan 7, 2026 License: MIT Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RunDbScripts

func RunDbScripts(db *sql.DB, schema string, isAdminSchema bool, ctx context.Context) error

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 (s *PostgresEventPublishing) GetLastPublishedEventPosition(ctx context.Context, boundary string) (orisun.Position, error)

func (*PostgresEventPublishing) InsertLastPublishedEvent

func (s *PostgresEventPublishing) InsertLastPublishedEvent(ctx context.Context,
	boundaryOfInterest string, transactionId int64, globalId int64) error

func (*PostgresEventPublishing) Schema

func (s *PostgresEventPublishing) Schema(boundary string) (string, error)

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 (*PostgresGetEvents) Schema

func (s *PostgresGetEvents) Schema(boundary string) (string, 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)

func (*PostgresSaveEvents) Schema

func (s *PostgresSaveEvents) Schema(boundary string) (string, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL