postgres
No long description provided.
Installation
dagger install github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536
Entrypoint
Return Type
Postgres
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
func (m *MyModule) Example() *dagger.Postgres {
return dag.
Postgres()
}
@function
def example() -> dagger.Postgres:
return (
dag.postgres()
)
@func()
example(): Postgres {
return dag
.postgres()
}
Types
Postgres 🔗
user() 🔗
Return Type
Secret !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
user
func (m *MyModule) Example() {
return dag.
Postgres().
User()
}
@function
def example() -> :
return (
dag.postgres()
.user()
)
@func()
example(): {
return dag
.postgres()
.user()
}
password() 🔗
Return Type
Secret !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
password
func (m *MyModule) Example() {
return dag.
Postgres().
Password()
}
@function
def example() -> :
return (
dag.postgres()
.password()
)
@func()
example(): {
return dag
.postgres()
.password()
}
name() 🔗
Return Type
StringKind !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
name
func (m *MyModule) Example() {
return dag.
Postgres().
Name()
}
@function
def example() -> :
return (
dag.postgres()
.name()
)
@func()
example(): {
return dag
.postgres()
.name()
}
port() 🔗
Return Type
IntegerKind !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
port
func (m *MyModule) Example() {
return dag.
Postgres().
Port()
}
@function
def example() -> :
return (
dag.postgres()
.port()
)
@func()
example(): {
return dag
.postgres()
.port()
}
version() 🔗
Return Type
StringKind !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
version
func (m *MyModule) Example() {
return dag.
Postgres().
Version()
}
@function
def example() -> :
return (
dag.postgres()
.version()
)
@func()
example(): {
return dag
.postgres()
.version()
}
configFile() 🔗
Return Type
File !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
config-file
func (m *MyModule) Example() {
return dag.
Postgres().
ConfigFile()
}
@function
def example() -> :
return (
dag.postgres()
.config_file()
)
@func()
example(): {
return dag
.postgres()
.configFile()
}
initScripts() 🔗
Return Type
[ObjectKind ! ] !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
init-scripts
func (m *MyModule) Example() {
return dag.
Postgres().
InitScripts()
}
@function
def example() -> :
return (
dag.postgres()
.init_scripts()
)
@func()
example(): {
return dag
.postgres()
.initScripts()
}
cache() 🔗
Return Type
BooleanKind !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
cache
func (m *MyModule) Example() {
return dag.
Postgres().
Cache()
}
@function
def example() -> :
return (
dag.postgres()
.cache()
)
@func()
example(): {
return dag
.postgres()
.cache()
}
withCredential() 🔗
WithCredential adds a user and a password configuration to the postgresSQL
database.
The values will be set in container as secret variables: POSTGRES_USER
POSTGRES_PASSWORD
.
Return Type
Postgres !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
user | Secret ! | - | No description provided |
password | Secret ! | - | No description provided |
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
with-credential
func (m *MyModule) Example(user , password ) {
return dag.
Postgres().
WithCredential(user, password)
}
@function
def example(user: , password: ) -> :
return (
dag.postgres()
.with_credential(user, password)
)
@func()
example(user: , password: ): {
return dag
.postgres()
.withCredential(user, password)
}
withPort() 🔗
WithPort configs an exposed port on the container.
Return Type
Postgres !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
port | IntegerKind ! | - | No description provided |
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
with-port
func (m *MyModule) Example(port ) {
return dag.
Postgres().
WithPort(port)
}
@function
def example(port: ) -> :
return (
dag.postgres()
.with_port(port)
)
@func()
example(port: ): {
return dag
.postgres()
.withPort(port)
}
withDatabaseName() 🔗
WithDatabaseName sets the name of the database that will be created on start.
It will be set in the container as POSTGRES_DB
, if it’s not set, the
database’s name will be the user’s one.
Return Type
Postgres !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | StringKind ! | - | No description provided |
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
with-database-name
func (m *MyModule) Example(name ) {
return dag.
Postgres().
WithDatabaseName(name)
}
@function
def example(name: ) -> :
return (
dag.postgres()
.with_database_name(name)
)
@func()
example(name: ): {
return dag
.postgres()
.withDatabaseName(name)
}
withCache() 🔗
Return Type
Postgres !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
cache | BooleanKind ! | - | No description provided |
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
with-cache
func (m *MyModule) Example(cache ) {
return dag.
Postgres().
WithCache(cache)
}
@function
def example(cache: ) -> :
return (
dag.postgres()
.with_cache(cache)
)
@func()
example(cache: ): {
return dag
.postgres()
.withCache(cache)
}
withVersion() 🔗
WithVersion sets the version of postgresql to pull from the registry.
Return Type
Postgres !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
version | StringKind ! | - | No description provided |
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
with-version
func (m *MyModule) Example(version ) {
return dag.
Postgres().
WithVersion(version)
}
@function
def example(version: ) -> :
return (
dag.postgres()
.with_version(version)
)
@func()
example(version: ): {
return dag
.postgres()
.withVersion(version)
}
withConfigFile() 🔗
WithConfigFile adds an extra config file to the postgres database.
This file will be copied in the container to
/usr/share/postgresql/postgresql.conf
Return Type
Postgres !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
file | File ! | - | No description provided |
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
with-config-file
func (m *MyModule) Example(file ) {
return dag.
Postgres().
WithConfigFile(file)
}
@function
def example(file: ) -> :
return (
dag.postgres()
.with_config_file(file)
)
@func()
example(file: ): {
return dag
.postgres()
.withConfigFile(file)
}
withInitScript() 🔗
WithInitScript adds a script to execute when the database is started.
You can call this function multiple times to add multiple scripts.
These scripts are stored in a map, so it’s recommended to name with a numeric
value at the beginning to make sure they are executed in the correct order.
For example 1-init.sql
, 2-new-tabs.sql
…
Theses files will be copied to /docker-entrypoint-initdb.db
Return Type
Postgres !
Arguments
Name | Type | Default Value | Description |
---|---|---|---|
name | StringKind ! | - | No description provided |
script | File ! | - | No description provided |
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
with-init-script
func (m *MyModule) Example(name , script ) {
return dag.
Postgres().
WithInitScript(name, script)
}
@function
def example(name: , script: ) -> :
return (
dag.postgres()
.with_init_script(name, script)
)
@func()
example(name: , script: ): {
return dag
.postgres()
.withInitScript(name, script)
}
client() 🔗
Return Type
Container !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
client
func (m *MyModule) Example() {
return dag.
Postgres().
Client()
}
@function
def example() -> :
return (
dag.postgres()
.client()
)
@func()
example(): {
return dag
.postgres()
.client()
}
database() 🔗
Database returns a ready to run Postgres container with all configuration applied.
Return Type
Container !
Example
dagger -m github.com/quartz-technology/daggerverse/postgres@5ea4bd87da08fc42ecc9f4c006fa25e829072536 call \
database
func (m *MyModule) Example() {
return dag.
Postgres().
Database()
}
@function
def example() -> :
return (
dag.postgres()
.database()
)
@func()
example(): {
return dag
.postgres()
.database()
}
InitScript 🔗
file() 🔗
Return Type
File !
Example
Function PostgresInitScript.File is not accessible from the postgres module
Function PostgresInitScript.File is not accessible from the postgres module
Function PostgresInitScript.File is not accessible from the postgres module
Function PostgresInitScript.File is not accessible from the postgres module
name() 🔗
Return Type
StringKind !
Example
Function PostgresInitScript.Name is not accessible from the postgres module
Function PostgresInitScript.Name is not accessible from the postgres module
Function PostgresInitScript.Name is not accessible from the postgres module
Function PostgresInitScript.Name is not accessible from the postgres module