postgres

package
v0.0.0-...-a297e19 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(ctx context.Context, cfg *Config) (repo.Repo, error)

New creates a new postgres database connection

func NewNode

func NewNode(br *baseRepo) repo.NodeRepo

func NewRole

func NewRole(br *baseRepo) repo.RoleRepo

NewRole returns a new RoleRepo

func NewSpace

func NewSpace(br *baseRepo) repo.SpaceRepo

func NewUser

func NewUser(br *baseRepo) repo.UserRepo

Types

type Config

type Config struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	Database string `yaml:"database"`
	SSLMode  string `yaml:"ssl_mode"`
}

Config is the configuration for the postgres database

func (*Config) Validate

func (c *Config) Validate() error

Jump to

Keyboard shortcuts

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