server

package
v0.0.0-...-f3301ad Latest Latest
Warning

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

Go to latest
Published: Dec 24, 2024 License: MIT Imports: 15 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PSQLServerClient

type PSQLServerClient struct {
	Creds        config.Credentials
	SecretClient secrets.SecretClient
	Scheme       *runtime.Scheme
}

func NewPSQLServerClient

func NewPSQLServerClient(creds config.Credentials, secretclient secrets.SecretClient, scheme *runtime.Scheme) *PSQLServerClient

func (*PSQLServerClient) AddServerCredsToSecrets

func (c *PSQLServerClient) AddServerCredsToSecrets(ctx context.Context, secretClient secrets.SecretClient, data map[string][]byte, instance *v1alpha2.PostgreSQLServer) error

func (*PSQLServerClient) CheckServerNameAvailability

func (c *PSQLServerClient) CheckServerNameAvailability(ctx context.Context, servername string) (bool, error)

func (*PSQLServerClient) CreateServerIfValid

func (c *PSQLServerClient) CreateServerIfValid(ctx context.Context,
	instance v1alpha2.PostgreSQLServer,
	tags map[string]*string,
	skuInfo psql.Sku, adminlogin string,
	adminpassword string,
	createmode psql.CreateMode,
	hash string) (pollingURL string, server psql.Server, err error)

func (*PSQLServerClient) Delete

Delete deletes the Postgres server

func (*PSQLServerClient) DeleteServer

func (c *PSQLServerClient) DeleteServer(ctx context.Context, resourcegroup string, servername string) (status string, err error)

func (*PSQLServerClient) Ensure

Ensure creates the Postgres server

func (*PSQLServerClient) GetOrPrepareSecret

func (c *PSQLServerClient) GetOrPrepareSecret(ctx context.Context, secretClient secrets.SecretClient, instance *v1alpha2.PostgreSQLServer) (map[string][]byte, error)

func (*PSQLServerClient) GetParents

GetParents gets the resource's parents

func (*PSQLServerClient) GetServer

func (c *PSQLServerClient) GetServer(ctx context.Context, resourcegroup string, servername string) (server psql.Server, err error)

func (*PSQLServerClient) GetStatus

func (c *PSQLServerClient) GetStatus(obj runtime.Object) (*v1alpha1.ASOStatus, error)

GetStatus returns the status

func (*PSQLServerClient) UpdateSecretWithFullServerName

func (c *PSQLServerClient) UpdateSecretWithFullServerName(ctx context.Context, secretClient secrets.SecretClient, data map[string][]byte, instance *v1alpha2.PostgreSQLServer, fullServerName string) error

type PostgreSQLServerManager

type PostgreSQLServerManager interface {
	CheckServerNameAvailability(ctx context.Context,
		servername string) (bool, error)

	CreateServerIfValid(ctx context.Context,
		instance v1alpha2.PostgreSQLServer,
		tags map[string]*string,
		skuInfo psql.Sku,
		adminlogin string,
		adminpassword string,
		createmode string) (string, psql.Server, error)

	DeleteServer(ctx context.Context,
		resourcegroup string,
		servername string) (string, error)

	GetServer(ctx context.Context,
		resourcegroup string,
		servername string) (psql.Server, error)

	AddServerCredsToSecrets(ctx context.Context,
		secretName string,
		data map[string][]byte,
		instance *v1alpha2.PostgreSQLServer) error

	GetOrPrepareSecret(ctx context.Context,
		instance *v1alpha2.PostgreSQLServer) (map[string][]byte, error)

	// also embed async client methods
	resourcemanager.ARMClient
}

Jump to

Keyboard shortcuts

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