postgres

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2026 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package postgres implements the ctrlplane store interface using PostgreSQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// DSN is the database connection string.
	DSN string `env:"CP_POSTGRES_DSN" json:"dsn"`
}

Config holds PostgreSQL connection configuration.

type Store

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

Store implements the aggregate store interface using PostgreSQL.

func New

func New(cfg Config) (*Store, error)

New creates a new PostgreSQL store.

func (*Store) Close

func (s *Store) Close() error

Close closes the database connection.

func (*Store) Migrate

func (s *Store) Migrate(_ context.Context) error

Migrate runs schema migrations.

func (*Store) Ping

func (s *Store) Ping(_ context.Context) error

Ping checks database connectivity.

Jump to

Keyboard shortcuts

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