postgres

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2026 License: MIT Imports: 18 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CurrentInterval

func CurrentInterval(db *sql.DB) cqrs.QueryHandlerFunc

func CurrentIntervalsList

func CurrentIntervalsList(db *sql.DB) cqrs.QueryHandlerFunc

func CurrentWorkshift

func CurrentWorkshift(db *sql.DB) cqrs.QueryHandlerFunc

func EquipmentTimeline

func EquipmentTimeline(db *sql.DB) cqrs.QueryHandlerFunc

func LineTopology

func LineTopology(db *sql.DB) cqrs.QueryHandlerFunc

func LinesList

func LinesList(db *sql.DB) cqrs.QueryHandlerFunc

Types

type EquipmentRepository

type EquipmentRepository struct {
	*EquipmentSaver
}

func NewEquipmentRepository

func NewEquipmentRepository(
	saver *EquipmentSaver,
) *EquipmentRepository

type EquipmentSaver

type EquipmentSaver struct {
	// contains filtered or unexported fields
}

func NewEquipmentSaver

func NewEquipmentSaver(db *sql.DB) *EquipmentSaver

func (*EquipmentSaver) Save

type IntervalReader

type IntervalReader struct {
	// contains filtered or unexported fields
}

func NewIntervalReader

func NewIntervalReader(db *sql.DB) *IntervalReader

func (*IntervalReader) Equipment

func (dr *IntervalReader) Equipment(ctx context.Context, id equipment.ID) (*intervals.Equipment, error)

type IntervalSaver

type IntervalSaver struct {
	// contains filtered or unexported fields
}

func NewIntervalSaver

func NewIntervalSaver(db *sql.DB) *IntervalSaver

func (*IntervalSaver) Save

func (ds *IntervalSaver) Save(ctx context.Context, equipment *intervals.Equipment) error

type IntervalsRepository

type IntervalsRepository struct {
	*IntervalReader
	*IntervalSaver
}

func NewIntervalsRepository

func NewIntervalsRepository(
	reader *IntervalReader,
	saver *IntervalSaver,
) *IntervalsRepository

type LineReader

type LineReader struct {
	// contains filtered or unexported fields
}

func NewLineReader

func NewLineReader(db *sql.DB) *LineReader

func (*LineReader) Line

func (lr *LineReader) Line(ctx context.Context, id lines.ID) (*lines.Line, error)

Line implements [commands.AddEquipmentToLineRepositoryPort].

type LineSaver

type LineSaver struct {
	// contains filtered or unexported fields
}

func NewLineSaver

func NewLineSaver(db *sql.DB) *LineSaver

func (*LineSaver) Save

func (ls *LineSaver) Save(ctx context.Context, line *lines.Line) error

Save implements [commands.AddEquipmentToLineRepositoryPort].

type LinesRepository

type LinesRepository struct {
	*LineReader
	*LineSaver
}

func NewLinesRepository

func NewLinesRepository(reader *LineReader, saver *LineSaver) *LinesRepository

type OeeMetricsBuilder

type OeeMetricsBuilder struct {
	// contains filtered or unexported fields
}

func NewOeeMetricsBuilder

func NewOeeMetricsBuilder(
	logger *slog.Logger,
	db *sql.DB,
) *OeeMetricsBuilder

func (*OeeMetricsBuilder) HandleEvent

func (omb *OeeMetricsBuilder) HandleEvent(ctx context.Context, e cqrs.Event)

HandleEvent implements cqrs.Projection.

func (*OeeMetricsBuilder) Types

func (o *OeeMetricsBuilder) Types() []cqrs.EventType

Types implements cqrs.Projection.

type ProductionReader

type ProductionReader struct {
	// contains filtered or unexported fields
}

func NewProductionReader

func NewProductionReader(db *sql.DB) *ProductionReader

func (*ProductionReader) Counter

func (pr *ProductionReader) Counter(ctx context.Context,
	equipmentID equipment.ID,
	category production.Category,
) (*production.Counter, error)

type ProductionRepository

type ProductionRepository struct {
	*ProductionReader
	*ProductionSaver
}

func NewProductionRepository

func NewProductionRepository(
	reader *ProductionReader,
	saver *ProductionSaver,
) *ProductionRepository

type ProductionSaver

type ProductionSaver struct {
	// contains filtered or unexported fields
}

func NewProductionSaver

func NewProductionSaver(db *sql.DB) *ProductionSaver

func (*ProductionSaver) Save

func (ps *ProductionSaver) Save(ctx context.Context, counter *production.Counter) error

type QualificationDowntimeReader

type QualificationDowntimeReader struct {
	// contains filtered or unexported fields
}

func NewQualificationDowntimeReader

func NewQualificationDowntimeReader(db *sql.DB) *QualificationDowntimeReader

func (*QualificationDowntimeReader) Downtime

type QualificationReader

type QualificationReader struct {
	// contains filtered or unexported fields
}

func NewQualificationReader

func NewQualificationReader(db *sql.DB) *QualificationReader

func (*QualificationReader) Qualification

type QualificationSaver

type QualificationSaver struct {
	// contains filtered or unexported fields
}

func NewQualificationSaver

func NewQualificationSaver(db *sql.DB) *QualificationSaver

func (*QualificationSaver) Save

Save implements [commands.QualifyDowntimeRepositoryPort].

type QualificationSpecificationReader

type QualificationSpecificationReader struct {
	// contains filtered or unexported fields
}

func NewQualificationSpecificationReader

func NewQualificationSpecificationReader(db *sql.DB) *QualificationSpecificationReader

func (*QualificationSpecificationReader) Specification

type SpecificationReader

type SpecificationReader struct {
	// contains filtered or unexported fields
}

func NewSpecificationReader

func NewSpecificationReader(db *sql.DB) *SpecificationReader

func (*SpecificationReader) Specification

Specification implements [commands.DeprecateSpecificationRepositoryPort].

type SpecificationSaver

type SpecificationSaver struct {
	// contains filtered or unexported fields
}

func NewSpecificationSaver

func NewSpecificationSaver(db *sql.DB) *SpecificationSaver

func (*SpecificationSaver) Save

func (ss *SpecificationSaver) Save(ctx context.Context, specification *specifications.Specification) error

Save implements [commands.CreateSpecificationRepositoryPort].

type SpecificationsRepository

type SpecificationsRepository struct {
	*SpecificationReader
	*SpecificationSaver
}

func NewSpecificationsRepository

func NewSpecificationsRepository(
	reader *SpecificationReader,
	saver *SpecificationSaver,
) *SpecificationsRepository

type WorkshiftProductionCounter

type WorkshiftProductionCounter struct {
	// contains filtered or unexported fields
}

func NewWorkshiftProductionCounter

func NewWorkshiftProductionCounter(
	logger *slog.Logger,
	db *sql.DB,
) *WorkshiftProductionCounter

func (*WorkshiftProductionCounter) HandleEvent

func (wpc *WorkshiftProductionCounter) HandleEvent(ctx context.Context, e cqrs.Event)

HandleEvent implements cqrs.Projection.

func (*WorkshiftProductionCounter) Types

func (wpc *WorkshiftProductionCounter) Types() []cqrs.EventType

Types implements cqrs.Projection.

type WorkshiftsIntervalsProjection

type WorkshiftsIntervalsProjection struct {
	// contains filtered or unexported fields
}

func NewWorkshiftsIntervalsProjection

func NewWorkshiftsIntervalsProjection(
	logger *slog.Logger,
	db *sql.DB,
) *WorkshiftsIntervalsProjection

func (*WorkshiftsIntervalsProjection) HandleEvent

func (wip *WorkshiftsIntervalsProjection) HandleEvent(ctx context.Context, event cqrs.Event)

func (*WorkshiftsIntervalsProjection) Types

type WorkshiftsReader

type WorkshiftsReader struct {
	// contains filtered or unexported fields
}

func NewWorkshiftsReader

func NewWorkshiftsReader(db *sql.DB) *WorkshiftsReader

func (*WorkshiftsReader) Changeover

func (wr *WorkshiftsReader) Changeover(ctx context.Context) (*workshifts.Changeover, error)

type WorkshiftsRepository

type WorkshiftsRepository struct {
	*WorkshiftsReader
	*WorkshiftsSaver
}

func NewWorkshiftsRepository

func NewWorkshiftsRepository(
	reader *WorkshiftsReader,
	saver *WorkshiftsSaver,
) *WorkshiftsRepository

type WorkshiftsSaver

type WorkshiftsSaver struct {
	// contains filtered or unexported fields
}

func NewWorkshiftsSaver

func NewWorkshiftsSaver(db *sql.DB) *WorkshiftsSaver

func (*WorkshiftsSaver) Save

func (ws *WorkshiftsSaver) Save(ctx context.Context, changeover *workshifts.Changeover) error

Save implements [commands.StartWorkshiftRepositoryPort].

Jump to

Keyboard shortcuts

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