postgressetup

package
v0.5.0 Latest Latest
Warning

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

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

Documentation

Overview

Package postgressetup provides the PostgreSQL identity setup shared by Substrate installers.

Index

Constants

View Source
const (
	Schema        = "substrate"
	OwnerRole     = "substrate_owner"
	OwnerUser     = "substrate_owner_user"
	ReadWriteRole = "substrate_readwrite"
	ReadWriteUser = "substrate_readwrite_user"
)

Variables

This section is empty.

Functions

func SQL

func SQL() string

SQL returns the parameterized psql script that creates Substrate's roles, users, and schema. The caller supplies Config.PSQLArgs and owns the surrounding transaction.

func Script

func Script() string

Script returns the psql script as a complete transaction for direct execution.

Types

type Config

type Config struct {
	Schema            string
	OwnerRole         string
	OwnerUser         string
	OwnerPassword     string
	ReadWriteRole     string
	ReadWriteUser     string
	ReadWritePassword string
}

Config names the schema and identities created by SQL.

func DefaultConfig

func DefaultConfig() Config

DefaultConfig returns the passwordless identities used by bundled installs.

func (Config) PSQLArgs

func (c Config) PSQLArgs() []string

PSQLArgs returns the psql variable arguments required by SQL.

Jump to

Keyboard shortcuts

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