postgresql

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Apr 28, 2026 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Createpostmigrationoids

func Createpostmigrationoids(ctx context.Context, c *client.Client, tracer trace.Tracer, postgreSQLId string, requestBody []*models.OIdObjectPair) client.Response[client.Nothing]

Createpostmigrationoids

Update databases, schemas and tables OIDs for a given PostgreSQL addon after migration with pairs created before migration

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • postgreSQLId: PostgreSQL ID
  • requestBody: the request payload

Returns the operation result or an error

Example:

response := postgresql.Createpostmigrationoids(ctx, client, tracer, postgreSQLId, requestBody)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: createPostMigrationOids

func Createpremigrationoids

func Createpremigrationoids(ctx context.Context, c *client.Client, tracer trace.Tracer, postgreSQLId string, requestBody []*models.OIdObjectPair) client.Response[client.Nothing]

Createpremigrationoids

Create OID pairs for each database, schema and table for a given PostgreSQL addon before migration

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • postgreSQLId: PostgreSQL ID
  • requestBody: the request payload

Returns the operation result or an error

Example:

response := postgresql.Createpremigrationoids(ctx, client, tracer, postgreSQLId, requestBody)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: createPreMigrationOids

func Createrotateuserpassword

func Createrotateuserpassword(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, pgUserId string) client.Response[models.PgUserData]

Createrotateuserpassword

Change the user's password in the given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • pgUserId: PostgreSQL User ID

Returns the operation result or an error

Example:

response := postgresql.Createrotateuserpassword(ctx, client, tracer, ownerId, postgreSQLId, pgUserId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: createRotateUserPassword

func Createuser

func Createuser(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string) client.Response[models.PgUserData]

Createuser

Create a new user in the given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID

Returns the operation result or an error

Example:

response := postgresql.Createuser(ctx, client, tracer, ownerId, postgreSQLId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: createUser

func Deleteuser

func Deleteuser(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, pgUserId string) client.Response[client.Nothing]

Deleteuser

Delete the user in the given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • pgUserId: PostgreSQL User ID

Returns the operation result or an error

Example:

response := postgresql.Deleteuser(ctx, client, tracer, ownerId, postgreSQLId, pgUserId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: deleteUser

func Getdatabase

func Getdatabase(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, databaseId string) client.Response[models.PostgreSQLDatabase1]

Getdatabase

Get a single database information in a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • databaseId: Database ID

Returns the operation result or an error

Example:

response := postgresql.Getdatabase(ctx, client, tracer, ownerId, postgreSQLId, databaseId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: getDatabase

func Getoidpairs

func Getoidpairs(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string) client.Response[models.OIdPairs]

Getoidpairs

Get databases, schemas and tables OIDs for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID

Returns the operation result or an error

Example:

response := postgresql.Getoidpairs(ctx, client, tracer, ownerId, postgreSQLId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: getOIdPairs

func Listdatabaseoids added in v0.2.3

func Listdatabaseoids(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string) client.Response[[]models.OIdDatabasePair]

Listdatabaseoids

Get databases OIDs for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID

Returns the operation result or an error

Example:

response := postgresql.Listdatabaseoids(ctx, client, tracer, ownerId, postgreSQLId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listDatabaseOids

func Listdatabases added in v0.2.3

func Listdatabases(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string) client.Response[[]models.PostgreSQLDatabase1]

Listdatabases

Get databases information in a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID

Returns the operation result or an error

Example:

response := postgresql.Listdatabases(ctx, client, tracer, ownerId, postgreSQLId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listDatabases

func Listdatabasesprivileges added in v0.2.3

func Listdatabasesprivileges(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, opts ...Option) client.Response[[]models.PgDatabasePrivileges]

Listdatabasesprivileges

Get users databases privileges for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • opts: optional query parameters

Returns the operation result or an error

Example:

response := postgresql.Listdatabasesprivileges(ctx, client, tracer, ownerId, postgreSQLId, opts...)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listDatabasesPrivileges

func Listpostgresqlmigrationprivileges added in v0.2.3

func Listpostgresqlmigrationprivileges(ctx context.Context, c *client.Client, tracer trace.Tracer, postgreSQLId string) client.Response[[]models.PostgreSQLDatabasePrivileges]

Listpostgresqlmigrationprivileges

Get the privileges snapshot for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • postgreSQLId: PostgreSQL ID

Returns the operation result or an error

Example:

response := postgresql.Listpostgresqlmigrationprivileges(ctx, client, tracer, postgreSQLId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listPostgreSQLMigrationPrivileges

func Listpostgresqlmigrationusers added in v0.2.3

func Listpostgresqlmigrationusers(ctx context.Context, c *client.Client, tracer trace.Tracer, postgreSQLId string) client.Response[[]models.PgUserData]

Listpostgresqlmigrationusers

Get the users snapshot for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • postgreSQLId: PostgreSQL ID

Returns the operation result or an error

Example:

response := postgresql.Listpostgresqlmigrationusers(ctx, client, tracer, postgreSQLId)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listPostgreSQLMigrationUsers

func Listschemaoids added in v0.2.3

func Listschemaoids(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, opts ...Option) client.Response[[]models.OIdSchemaPair]

Listschemaoids

Get schemas OIDs for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • opts: optional query parameters

Returns the operation result or an error

Example:

response := postgresql.Listschemaoids(ctx, client, tracer, ownerId, postgreSQLId, opts...)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listSchemaOids

func Listschemasprivileges added in v0.2.3

func Listschemasprivileges(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, opts ...Option) client.Response[[]models.PgSchemaPrivileges]

Listschemasprivileges

Get users schemas privileges for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • opts: optional query parameters

Returns the operation result or an error

Example:

response := postgresql.Listschemasprivileges(ctx, client, tracer, ownerId, postgreSQLId, opts...)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listSchemasPrivileges

func Listtableoids added in v0.2.3

func Listtableoids(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, opts ...Option) client.Response[[]models.OIdTablePair]

Listtableoids

Get tables OIDs for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • opts: optional query parameters

Returns the operation result or an error

Example:

response := postgresql.Listtableoids(ctx, client, tracer, ownerId, postgreSQLId, opts...)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listTableOids

func Listtablesprivileges added in v0.2.3

func Listtablesprivileges(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, opts ...Option) client.Response[[]models.PgTablePrivileges]

Listtablesprivileges

Get users tables perivileges for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • opts: optional query parameters

Returns the operation result or an error

Example:

response := postgresql.Listtablesprivileges(ctx, client, tracer, ownerId, postgreSQLId, opts...)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listTablesPrivileges

func Listusers added in v0.2.3

func Listusers(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, opts ...Option) client.Response[[]models.PgUserData]

Listusers

Get users and their privileges for a given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • opts: optional query parameters

Returns the operation result or an error

Example:

response := postgresql.Listusers(ctx, client, tracer, ownerId, postgreSQLId, opts...)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: listUsers

func Updatedatabase

func Updatedatabase(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, databaseId string, requestBody *models.WannaPatchPostgreSQLDatabase, opts ...Option) client.Response[models.PostgreSQLDatabase1]

Updatedatabase

Update the read/write mode of the database

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • databaseId: Database ID
  • requestBody: the request payload
  • opts: optional query parameters

Returns the operation result or an error

Example:

response := postgresql.Updatedatabase(ctx, client, tracer, ownerId, postgreSQLId, databaseId, requestBody, opts...)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: updateDatabase

func Updatedatabasesprivileges

func Updatedatabasesprivileges(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, pgUserId string, objectId int, requestBody *models.ReadPrivilege) client.Response[models.PgDatabasePrivileges]

Updatedatabasesprivileges

Update the user's database privileges in the given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • pgUserId: PostgreSQL User ID
  • objectId: PostgreSQL Object ID
  • requestBody: the request payload

Returns the operation result or an error

Example:

response := postgresql.Updatedatabasesprivileges(ctx, client, tracer, ownerId, postgreSQLId, pgUserId, objectId, requestBody)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: updateDatabasesPrivileges

func Updateschemasprivileges

func Updateschemasprivileges(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, pgUserId string, objectId int, requestBody *models.SchemaPrivilegePatch) client.Response[models.PgSchemaPrivileges]

Updateschemasprivileges

Update the user's schema privileges in the given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • pgUserId: PostgreSQL User ID
  • objectId: PostgreSQL Object ID
  • requestBody: the request payload

Returns the operation result or an error

Example:

response := postgresql.Updateschemasprivileges(ctx, client, tracer, ownerId, postgreSQLId, pgUserId, objectId, requestBody)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: updateSchemasPrivileges

func Updatetablesprivileges

func Updatetablesprivileges(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, pgUserId string, objectId int, requestBody *models.ReadWritePrivileges) client.Response[models.PgTablePrivileges]

Updatetablesprivileges

Update the user's table privileges in the given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • pgUserId: PostgreSQL User ID
  • objectId: PostgreSQL Object ID
  • requestBody: the request payload

Returns the operation result or an error

Example:

response := postgresql.Updatetablesprivileges(ctx, client, tracer, ownerId, postgreSQLId, pgUserId, objectId, requestBody)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: updateTablesPrivileges

func Updateuser

func Updateuser(ctx context.Context, c *client.Client, tracer trace.Tracer, ownerId string, postgreSQLId string, pgUserId string, requestBody *models.PatchUser) client.Response[models.PgUserData]

Updateuser

Update the user's privileges in the given PostgreSQL addon

Parameters:

  • ctx: context for the request
  • client: the Clever Cloud client
  • tracer: OpenTelemetry tracer for observability
  • ownerId:
  • postgreSQLId: PostgreSQL ID
  • pgUserId: PostgreSQL User ID
  • requestBody: the request payload

Returns the operation result or an error

Example:

response := postgresql.Updateuser(ctx, client, tracer, ownerId, postgreSQLId, pgUserId, requestBody)
if response.HasError() {
	// Handle error
}
result := response.Payload()

x-service: postgresql operationId: updateUser

Types

type Option

type Option func(*Options)

Option defines a functional option for postgresql operations

func WithDatabase

func WithDatabase(database string) Option

WithDatabase sets the database query parameter

func WithDatabaseoid

func WithDatabaseoid(databaseOId int) Option

WithDatabaseoid sets the databaseOId query parameter

func WithKeepconnections

func WithKeepconnections(keepConnections bool) Option

WithKeepconnections sets the keepConnections query parameter

func WithOid

func WithOid(oid int) Option

WithOid sets the oid query parameter

func WithSchema

func WithSchema(schema string) Option

WithSchema sets the schema query parameter

func WithSchemaoid

func WithSchemaoid(schemaOId int) Option

WithSchemaoid sets the schemaOId query parameter

func WithUserid

func WithUserid(userId string) Option

WithUserid sets the userId query parameter

type Options

type Options struct {
	Database        *string `url:"database,omitempty"`
	Databaseoid     *int    `url:"databaseOId,omitempty"`
	Keepconnections *bool   `url:"keepConnections,omitempty"`
	Oid             *int    `url:"oid,omitempty"`
	Schema          *string `url:"schema,omitempty"`
	Schemaoid       *int    `url:"schemaOId,omitempty"`
	Userid          *string `url:"userId,omitempty"`
}

Options holds query parameters for postgresql operations

Jump to

Keyboard shortcuts

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